1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package directconnect 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/aws-sdk-go-v2/service/directconnect/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 "time" 13) 14 15// Deprecated. Use AllocateHostedConnection instead. Creates a hosted connection on 16// an interconnect. Allocates a VLAN number and a specified amount of bandwidth for 17// use by a hosted connection on the specified interconnect. Intended for use by 18// AWS Direct Connect Partners only. 19// 20// Deprecated: This operation has been deprecated. 21func (c *Client) AllocateConnectionOnInterconnect(ctx context.Context, params *AllocateConnectionOnInterconnectInput, optFns ...func(*Options)) (*AllocateConnectionOnInterconnectOutput, error) { 22 if params == nil { 23 params = &AllocateConnectionOnInterconnectInput{} 24 } 25 26 result, metadata, err := c.invokeOperation(ctx, "AllocateConnectionOnInterconnect", params, optFns, addOperationAllocateConnectionOnInterconnectMiddlewares) 27 if err != nil { 28 return nil, err 29 } 30 31 out := result.(*AllocateConnectionOnInterconnectOutput) 32 out.ResultMetadata = metadata 33 return out, nil 34} 35 36type AllocateConnectionOnInterconnectInput struct { 37 38 // The bandwidth of the connection. The possible values are 50Mbps, 100Mbps, 39 // 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, and 10Gbps. Note that 40 // only those AWS Direct Connect Partners who have met specific requirements are 41 // allowed to create a 1Gbps, 2Gbps, 5Gbps or 10Gbps hosted connection. 42 // 43 // This member is required. 44 Bandwidth *string 45 46 // The name of the provisioned connection. 47 // 48 // This member is required. 49 ConnectionName *string 50 51 // The ID of the interconnect on which the connection will be provisioned. 52 // 53 // This member is required. 54 InterconnectId *string 55 56 // The ID of the AWS account of the customer for whom the connection will be 57 // provisioned. 58 // 59 // This member is required. 60 OwnerAccount *string 61 62 // The dedicated VLAN provisioned to the connection. 63 // 64 // This member is required. 65 Vlan int32 66} 67 68// Information about an AWS Direct Connect connection. 69type AllocateConnectionOnInterconnectOutput struct { 70 71 // The Direct Connect endpoint on which the physical connection terminates. 72 // 73 // Deprecated: This member has been deprecated. 74 AwsDevice *string 75 76 // The Direct Connect endpoint on which the physical connection terminates. 77 AwsDeviceV2 *string 78 79 // The bandwidth of the connection. 80 Bandwidth *string 81 82 // The ID of the connection. 83 ConnectionId *string 84 85 // The name of the connection. 86 ConnectionName *string 87 88 // The state of the connection. The following are the possible values: 89 // 90 // * ordering: 91 // The initial state of a hosted connection provisioned on an interconnect. The 92 // connection stays in the ordering state until the owner of the hosted connection 93 // confirms or declines the connection order. 94 // 95 // * requested: The initial state of a 96 // standard connection. The connection stays in the requested state until the 97 // Letter of Authorization (LOA) is sent to the customer. 98 // 99 // * pending: The 100 // connection has been approved and is being initialized. 101 // 102 // * available: The network 103 // link is up and the connection is ready for use. 104 // 105 // * down: The network link is 106 // down. 107 // 108 // * deleting: The connection is being deleted. 109 // 110 // * deleted: The connection 111 // has been deleted. 112 // 113 // * rejected: A hosted connection in the ordering state enters 114 // the rejected state if it is deleted by the customer. 115 // 116 // * unknown: The state of 117 // the connection is not available. 118 ConnectionState types.ConnectionState 119 120 // The MAC Security (MACsec) connection encryption mode. The valid values are 121 // no_encrypt, should_encrypt, and must_encrypt. 122 EncryptionMode *string 123 124 // Indicates whether the connection supports a secondary BGP peer in the same 125 // address family (IPv4/IPv6). 126 HasLogicalRedundancy types.HasLogicalRedundancy 127 128 // Indicates whether jumbo frames (9001 MTU) are supported. 129 JumboFrameCapable *bool 130 131 // The ID of the LAG. 132 LagId *string 133 134 // The time of the most recent call to DescribeLoa for this connection. 135 LoaIssueTime *time.Time 136 137 // The location of the connection. 138 Location *string 139 140 // Indicates whether the connection supports MAC Security (MACsec). 141 MacSecCapable *bool 142 143 // The MAC Security (MACsec) security keys associated with the connection. 144 MacSecKeys []types.MacSecKey 145 146 // The ID of the AWS account that owns the connection. 147 OwnerAccount *string 148 149 // The name of the AWS Direct Connect service provider associated with the 150 // connection. 151 PartnerName *string 152 153 // The MAC Security (MACsec) port link status of the connection. The valid values 154 // are Encryption Up, which means that there is an active Connection Key Name, or 155 // Encryption Down. 156 PortEncryptionStatus *string 157 158 // The name of the service provider associated with the connection. 159 ProviderName *string 160 161 // The AWS Region where the connection is located. 162 Region *string 163 164 // The tags associated with the connection. 165 Tags []types.Tag 166 167 // The ID of the VLAN. 168 Vlan int32 169 170 // Metadata pertaining to the operation's result. 171 ResultMetadata middleware.Metadata 172} 173 174func addOperationAllocateConnectionOnInterconnectMiddlewares(stack *middleware.Stack, options Options) (err error) { 175 err = stack.Serialize.Add(&awsAwsjson11_serializeOpAllocateConnectionOnInterconnect{}, middleware.After) 176 if err != nil { 177 return err 178 } 179 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAllocateConnectionOnInterconnect{}, middleware.After) 180 if err != nil { 181 return err 182 } 183 if err = addSetLoggerMiddleware(stack, options); err != nil { 184 return err 185 } 186 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 187 return err 188 } 189 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 190 return err 191 } 192 if err = addResolveEndpointMiddleware(stack, options); err != nil { 193 return err 194 } 195 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 196 return err 197 } 198 if err = addRetryMiddlewares(stack, options); err != nil { 199 return err 200 } 201 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 202 return err 203 } 204 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 205 return err 206 } 207 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 208 return err 209 } 210 if err = addClientUserAgent(stack); err != nil { 211 return err 212 } 213 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 214 return err 215 } 216 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 217 return err 218 } 219 if err = addOpAllocateConnectionOnInterconnectValidationMiddleware(stack); err != nil { 220 return err 221 } 222 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAllocateConnectionOnInterconnect(options.Region), middleware.Before); err != nil { 223 return err 224 } 225 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 226 return err 227 } 228 if err = addResponseErrorMiddleware(stack); err != nil { 229 return err 230 } 231 if err = addRequestResponseLogging(stack, options); err != nil { 232 return err 233 } 234 return nil 235} 236 237func newServiceMetadataMiddleware_opAllocateConnectionOnInterconnect(region string) *awsmiddleware.RegisterServiceMetadata { 238 return &awsmiddleware.RegisterServiceMetadata{ 239 Region: region, 240 ServiceID: ServiceID, 241 SigningName: "directconnect", 242 OperationName: "AllocateConnectionOnInterconnect", 243 } 244} 245