github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/directconnect/hostedConnection.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package directconnect 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a hosted connection on the specified interconnect or a link aggregation group (LAG) of interconnects. Intended for use by AWS Direct Connect Partners only. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := directconnect.NewHostedConnection(ctx, "hosted", &directconnect.HostedConnectionArgs{ 33 // ConnectionId: pulumi.String("dxcon-ffabc123"), 34 // Bandwidth: pulumi.String("100Mbps"), 35 // Name: pulumi.String("tf-dx-hosted-connection"), 36 // OwnerAccountId: pulumi.String("123456789012"), 37 // Vlan: pulumi.Int(1), 38 // }) 39 // if err != nil { 40 // return err 41 // } 42 // return nil 43 // }) 44 // } 45 // 46 // ``` 47 // <!--End PulumiCodeChooser --> 48 type HostedConnection struct { 49 pulumi.CustomResourceState 50 51 // The Direct Connect endpoint on which the physical connection terminates. 52 AwsDevice pulumi.StringOutput `pulumi:"awsDevice"` 53 // The bandwidth of the connection. Valid values for dedicated connections: 1Gbps, 10Gbps. Valid values for hosted connections: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps and 10Gbps. Case sensitive. 54 Bandwidth pulumi.StringOutput `pulumi:"bandwidth"` 55 // The ID of the interconnect or LAG. 56 ConnectionId pulumi.StringOutput `pulumi:"connectionId"` 57 // Indicates whether the connection supports a secondary BGP peer in the same address family (IPv4/IPv6). 58 HasLogicalRedundancy pulumi.StringOutput `pulumi:"hasLogicalRedundancy"` 59 // Boolean value representing if jumbo frames have been enabled for this connection. 60 JumboFrameCapable pulumi.BoolOutput `pulumi:"jumboFrameCapable"` 61 // The ID of the LAG. 62 LagId pulumi.StringOutput `pulumi:"lagId"` 63 // The time of the most recent call to [DescribeLoa](https://docs.aws.amazon.com/directconnect/latest/APIReference/API_DescribeLoa.html) for this connection. 64 LoaIssueTime pulumi.StringOutput `pulumi:"loaIssueTime"` 65 // The location of the connection. 66 Location pulumi.StringOutput `pulumi:"location"` 67 // The name of the connection. 68 Name pulumi.StringOutput `pulumi:"name"` 69 // The ID of the AWS account of the customer for the connection. 70 OwnerAccountId pulumi.StringOutput `pulumi:"ownerAccountId"` 71 // The name of the AWS Direct Connect service provider associated with the connection. 72 PartnerName pulumi.StringOutput `pulumi:"partnerName"` 73 // The name of the service provider associated with the connection. 74 ProviderName pulumi.StringOutput `pulumi:"providerName"` 75 // The AWS Region where the connection is located. 76 Region pulumi.StringOutput `pulumi:"region"` 77 // The state of the connection. Possible values include: ordering, requested, pending, available, down, deleting, deleted, rejected, unknown. See [AllocateHostedConnection](https://docs.aws.amazon.com/directconnect/latest/APIReference/API_AllocateHostedConnection.html) for a description of each connection state. 78 State pulumi.StringOutput `pulumi:"state"` 79 // The dedicated VLAN provisioned to the hosted connection. 80 Vlan pulumi.IntOutput `pulumi:"vlan"` 81 } 82 83 // NewHostedConnection registers a new resource with the given unique name, arguments, and options. 84 func NewHostedConnection(ctx *pulumi.Context, 85 name string, args *HostedConnectionArgs, opts ...pulumi.ResourceOption) (*HostedConnection, error) { 86 if args == nil { 87 return nil, errors.New("missing one or more required arguments") 88 } 89 90 if args.Bandwidth == nil { 91 return nil, errors.New("invalid value for required argument 'Bandwidth'") 92 } 93 if args.ConnectionId == nil { 94 return nil, errors.New("invalid value for required argument 'ConnectionId'") 95 } 96 if args.OwnerAccountId == nil { 97 return nil, errors.New("invalid value for required argument 'OwnerAccountId'") 98 } 99 if args.Vlan == nil { 100 return nil, errors.New("invalid value for required argument 'Vlan'") 101 } 102 opts = internal.PkgResourceDefaultOpts(opts) 103 var resource HostedConnection 104 err := ctx.RegisterResource("aws:directconnect/hostedConnection:HostedConnection", name, args, &resource, opts...) 105 if err != nil { 106 return nil, err 107 } 108 return &resource, nil 109 } 110 111 // GetHostedConnection gets an existing HostedConnection resource's state with the given name, ID, and optional 112 // state properties that are used to uniquely qualify the lookup (nil if not required). 113 func GetHostedConnection(ctx *pulumi.Context, 114 name string, id pulumi.IDInput, state *HostedConnectionState, opts ...pulumi.ResourceOption) (*HostedConnection, error) { 115 var resource HostedConnection 116 err := ctx.ReadResource("aws:directconnect/hostedConnection:HostedConnection", name, id, state, &resource, opts...) 117 if err != nil { 118 return nil, err 119 } 120 return &resource, nil 121 } 122 123 // Input properties used for looking up and filtering HostedConnection resources. 124 type hostedConnectionState struct { 125 // The Direct Connect endpoint on which the physical connection terminates. 126 AwsDevice *string `pulumi:"awsDevice"` 127 // The bandwidth of the connection. Valid values for dedicated connections: 1Gbps, 10Gbps. Valid values for hosted connections: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps and 10Gbps. Case sensitive. 128 Bandwidth *string `pulumi:"bandwidth"` 129 // The ID of the interconnect or LAG. 130 ConnectionId *string `pulumi:"connectionId"` 131 // Indicates whether the connection supports a secondary BGP peer in the same address family (IPv4/IPv6). 132 HasLogicalRedundancy *string `pulumi:"hasLogicalRedundancy"` 133 // Boolean value representing if jumbo frames have been enabled for this connection. 134 JumboFrameCapable *bool `pulumi:"jumboFrameCapable"` 135 // The ID of the LAG. 136 LagId *string `pulumi:"lagId"` 137 // The time of the most recent call to [DescribeLoa](https://docs.aws.amazon.com/directconnect/latest/APIReference/API_DescribeLoa.html) for this connection. 138 LoaIssueTime *string `pulumi:"loaIssueTime"` 139 // The location of the connection. 140 Location *string `pulumi:"location"` 141 // The name of the connection. 142 Name *string `pulumi:"name"` 143 // The ID of the AWS account of the customer for the connection. 144 OwnerAccountId *string `pulumi:"ownerAccountId"` 145 // The name of the AWS Direct Connect service provider associated with the connection. 146 PartnerName *string `pulumi:"partnerName"` 147 // The name of the service provider associated with the connection. 148 ProviderName *string `pulumi:"providerName"` 149 // The AWS Region where the connection is located. 150 Region *string `pulumi:"region"` 151 // The state of the connection. Possible values include: ordering, requested, pending, available, down, deleting, deleted, rejected, unknown. See [AllocateHostedConnection](https://docs.aws.amazon.com/directconnect/latest/APIReference/API_AllocateHostedConnection.html) for a description of each connection state. 152 State *string `pulumi:"state"` 153 // The dedicated VLAN provisioned to the hosted connection. 154 Vlan *int `pulumi:"vlan"` 155 } 156 157 type HostedConnectionState struct { 158 // The Direct Connect endpoint on which the physical connection terminates. 159 AwsDevice pulumi.StringPtrInput 160 // The bandwidth of the connection. Valid values for dedicated connections: 1Gbps, 10Gbps. Valid values for hosted connections: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps and 10Gbps. Case sensitive. 161 Bandwidth pulumi.StringPtrInput 162 // The ID of the interconnect or LAG. 163 ConnectionId pulumi.StringPtrInput 164 // Indicates whether the connection supports a secondary BGP peer in the same address family (IPv4/IPv6). 165 HasLogicalRedundancy pulumi.StringPtrInput 166 // Boolean value representing if jumbo frames have been enabled for this connection. 167 JumboFrameCapable pulumi.BoolPtrInput 168 // The ID of the LAG. 169 LagId pulumi.StringPtrInput 170 // The time of the most recent call to [DescribeLoa](https://docs.aws.amazon.com/directconnect/latest/APIReference/API_DescribeLoa.html) for this connection. 171 LoaIssueTime pulumi.StringPtrInput 172 // The location of the connection. 173 Location pulumi.StringPtrInput 174 // The name of the connection. 175 Name pulumi.StringPtrInput 176 // The ID of the AWS account of the customer for the connection. 177 OwnerAccountId pulumi.StringPtrInput 178 // The name of the AWS Direct Connect service provider associated with the connection. 179 PartnerName pulumi.StringPtrInput 180 // The name of the service provider associated with the connection. 181 ProviderName pulumi.StringPtrInput 182 // The AWS Region where the connection is located. 183 Region pulumi.StringPtrInput 184 // The state of the connection. Possible values include: ordering, requested, pending, available, down, deleting, deleted, rejected, unknown. See [AllocateHostedConnection](https://docs.aws.amazon.com/directconnect/latest/APIReference/API_AllocateHostedConnection.html) for a description of each connection state. 185 State pulumi.StringPtrInput 186 // The dedicated VLAN provisioned to the hosted connection. 187 Vlan pulumi.IntPtrInput 188 } 189 190 func (HostedConnectionState) ElementType() reflect.Type { 191 return reflect.TypeOf((*hostedConnectionState)(nil)).Elem() 192 } 193 194 type hostedConnectionArgs struct { 195 // The bandwidth of the connection. Valid values for dedicated connections: 1Gbps, 10Gbps. Valid values for hosted connections: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps and 10Gbps. Case sensitive. 196 Bandwidth string `pulumi:"bandwidth"` 197 // The ID of the interconnect or LAG. 198 ConnectionId string `pulumi:"connectionId"` 199 // The name of the connection. 200 Name *string `pulumi:"name"` 201 // The ID of the AWS account of the customer for the connection. 202 OwnerAccountId string `pulumi:"ownerAccountId"` 203 // The dedicated VLAN provisioned to the hosted connection. 204 Vlan int `pulumi:"vlan"` 205 } 206 207 // The set of arguments for constructing a HostedConnection resource. 208 type HostedConnectionArgs struct { 209 // The bandwidth of the connection. Valid values for dedicated connections: 1Gbps, 10Gbps. Valid values for hosted connections: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps and 10Gbps. Case sensitive. 210 Bandwidth pulumi.StringInput 211 // The ID of the interconnect or LAG. 212 ConnectionId pulumi.StringInput 213 // The name of the connection. 214 Name pulumi.StringPtrInput 215 // The ID of the AWS account of the customer for the connection. 216 OwnerAccountId pulumi.StringInput 217 // The dedicated VLAN provisioned to the hosted connection. 218 Vlan pulumi.IntInput 219 } 220 221 func (HostedConnectionArgs) ElementType() reflect.Type { 222 return reflect.TypeOf((*hostedConnectionArgs)(nil)).Elem() 223 } 224 225 type HostedConnectionInput interface { 226 pulumi.Input 227 228 ToHostedConnectionOutput() HostedConnectionOutput 229 ToHostedConnectionOutputWithContext(ctx context.Context) HostedConnectionOutput 230 } 231 232 func (*HostedConnection) ElementType() reflect.Type { 233 return reflect.TypeOf((**HostedConnection)(nil)).Elem() 234 } 235 236 func (i *HostedConnection) ToHostedConnectionOutput() HostedConnectionOutput { 237 return i.ToHostedConnectionOutputWithContext(context.Background()) 238 } 239 240 func (i *HostedConnection) ToHostedConnectionOutputWithContext(ctx context.Context) HostedConnectionOutput { 241 return pulumi.ToOutputWithContext(ctx, i).(HostedConnectionOutput) 242 } 243 244 // HostedConnectionArrayInput is an input type that accepts HostedConnectionArray and HostedConnectionArrayOutput values. 245 // You can construct a concrete instance of `HostedConnectionArrayInput` via: 246 // 247 // HostedConnectionArray{ HostedConnectionArgs{...} } 248 type HostedConnectionArrayInput interface { 249 pulumi.Input 250 251 ToHostedConnectionArrayOutput() HostedConnectionArrayOutput 252 ToHostedConnectionArrayOutputWithContext(context.Context) HostedConnectionArrayOutput 253 } 254 255 type HostedConnectionArray []HostedConnectionInput 256 257 func (HostedConnectionArray) ElementType() reflect.Type { 258 return reflect.TypeOf((*[]*HostedConnection)(nil)).Elem() 259 } 260 261 func (i HostedConnectionArray) ToHostedConnectionArrayOutput() HostedConnectionArrayOutput { 262 return i.ToHostedConnectionArrayOutputWithContext(context.Background()) 263 } 264 265 func (i HostedConnectionArray) ToHostedConnectionArrayOutputWithContext(ctx context.Context) HostedConnectionArrayOutput { 266 return pulumi.ToOutputWithContext(ctx, i).(HostedConnectionArrayOutput) 267 } 268 269 // HostedConnectionMapInput is an input type that accepts HostedConnectionMap and HostedConnectionMapOutput values. 270 // You can construct a concrete instance of `HostedConnectionMapInput` via: 271 // 272 // HostedConnectionMap{ "key": HostedConnectionArgs{...} } 273 type HostedConnectionMapInput interface { 274 pulumi.Input 275 276 ToHostedConnectionMapOutput() HostedConnectionMapOutput 277 ToHostedConnectionMapOutputWithContext(context.Context) HostedConnectionMapOutput 278 } 279 280 type HostedConnectionMap map[string]HostedConnectionInput 281 282 func (HostedConnectionMap) ElementType() reflect.Type { 283 return reflect.TypeOf((*map[string]*HostedConnection)(nil)).Elem() 284 } 285 286 func (i HostedConnectionMap) ToHostedConnectionMapOutput() HostedConnectionMapOutput { 287 return i.ToHostedConnectionMapOutputWithContext(context.Background()) 288 } 289 290 func (i HostedConnectionMap) ToHostedConnectionMapOutputWithContext(ctx context.Context) HostedConnectionMapOutput { 291 return pulumi.ToOutputWithContext(ctx, i).(HostedConnectionMapOutput) 292 } 293 294 type HostedConnectionOutput struct{ *pulumi.OutputState } 295 296 func (HostedConnectionOutput) ElementType() reflect.Type { 297 return reflect.TypeOf((**HostedConnection)(nil)).Elem() 298 } 299 300 func (o HostedConnectionOutput) ToHostedConnectionOutput() HostedConnectionOutput { 301 return o 302 } 303 304 func (o HostedConnectionOutput) ToHostedConnectionOutputWithContext(ctx context.Context) HostedConnectionOutput { 305 return o 306 } 307 308 // The Direct Connect endpoint on which the physical connection terminates. 309 func (o HostedConnectionOutput) AwsDevice() pulumi.StringOutput { 310 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.AwsDevice }).(pulumi.StringOutput) 311 } 312 313 // The bandwidth of the connection. Valid values for dedicated connections: 1Gbps, 10Gbps. Valid values for hosted connections: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps and 10Gbps. Case sensitive. 314 func (o HostedConnectionOutput) Bandwidth() pulumi.StringOutput { 315 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.Bandwidth }).(pulumi.StringOutput) 316 } 317 318 // The ID of the interconnect or LAG. 319 func (o HostedConnectionOutput) ConnectionId() pulumi.StringOutput { 320 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.ConnectionId }).(pulumi.StringOutput) 321 } 322 323 // Indicates whether the connection supports a secondary BGP peer in the same address family (IPv4/IPv6). 324 func (o HostedConnectionOutput) HasLogicalRedundancy() pulumi.StringOutput { 325 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.HasLogicalRedundancy }).(pulumi.StringOutput) 326 } 327 328 // Boolean value representing if jumbo frames have been enabled for this connection. 329 func (o HostedConnectionOutput) JumboFrameCapable() pulumi.BoolOutput { 330 return o.ApplyT(func(v *HostedConnection) pulumi.BoolOutput { return v.JumboFrameCapable }).(pulumi.BoolOutput) 331 } 332 333 // The ID of the LAG. 334 func (o HostedConnectionOutput) LagId() pulumi.StringOutput { 335 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.LagId }).(pulumi.StringOutput) 336 } 337 338 // The time of the most recent call to [DescribeLoa](https://docs.aws.amazon.com/directconnect/latest/APIReference/API_DescribeLoa.html) for this connection. 339 func (o HostedConnectionOutput) LoaIssueTime() pulumi.StringOutput { 340 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.LoaIssueTime }).(pulumi.StringOutput) 341 } 342 343 // The location of the connection. 344 func (o HostedConnectionOutput) Location() pulumi.StringOutput { 345 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) 346 } 347 348 // The name of the connection. 349 func (o HostedConnectionOutput) Name() pulumi.StringOutput { 350 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 351 } 352 353 // The ID of the AWS account of the customer for the connection. 354 func (o HostedConnectionOutput) OwnerAccountId() pulumi.StringOutput { 355 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.OwnerAccountId }).(pulumi.StringOutput) 356 } 357 358 // The name of the AWS Direct Connect service provider associated with the connection. 359 func (o HostedConnectionOutput) PartnerName() pulumi.StringOutput { 360 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.PartnerName }).(pulumi.StringOutput) 361 } 362 363 // The name of the service provider associated with the connection. 364 func (o HostedConnectionOutput) ProviderName() pulumi.StringOutput { 365 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.ProviderName }).(pulumi.StringOutput) 366 } 367 368 // The AWS Region where the connection is located. 369 func (o HostedConnectionOutput) Region() pulumi.StringOutput { 370 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput) 371 } 372 373 // The state of the connection. Possible values include: ordering, requested, pending, available, down, deleting, deleted, rejected, unknown. See [AllocateHostedConnection](https://docs.aws.amazon.com/directconnect/latest/APIReference/API_AllocateHostedConnection.html) for a description of each connection state. 374 func (o HostedConnectionOutput) State() pulumi.StringOutput { 375 return o.ApplyT(func(v *HostedConnection) pulumi.StringOutput { return v.State }).(pulumi.StringOutput) 376 } 377 378 // The dedicated VLAN provisioned to the hosted connection. 379 func (o HostedConnectionOutput) Vlan() pulumi.IntOutput { 380 return o.ApplyT(func(v *HostedConnection) pulumi.IntOutput { return v.Vlan }).(pulumi.IntOutput) 381 } 382 383 type HostedConnectionArrayOutput struct{ *pulumi.OutputState } 384 385 func (HostedConnectionArrayOutput) ElementType() reflect.Type { 386 return reflect.TypeOf((*[]*HostedConnection)(nil)).Elem() 387 } 388 389 func (o HostedConnectionArrayOutput) ToHostedConnectionArrayOutput() HostedConnectionArrayOutput { 390 return o 391 } 392 393 func (o HostedConnectionArrayOutput) ToHostedConnectionArrayOutputWithContext(ctx context.Context) HostedConnectionArrayOutput { 394 return o 395 } 396 397 func (o HostedConnectionArrayOutput) Index(i pulumi.IntInput) HostedConnectionOutput { 398 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HostedConnection { 399 return vs[0].([]*HostedConnection)[vs[1].(int)] 400 }).(HostedConnectionOutput) 401 } 402 403 type HostedConnectionMapOutput struct{ *pulumi.OutputState } 404 405 func (HostedConnectionMapOutput) ElementType() reflect.Type { 406 return reflect.TypeOf((*map[string]*HostedConnection)(nil)).Elem() 407 } 408 409 func (o HostedConnectionMapOutput) ToHostedConnectionMapOutput() HostedConnectionMapOutput { 410 return o 411 } 412 413 func (o HostedConnectionMapOutput) ToHostedConnectionMapOutputWithContext(ctx context.Context) HostedConnectionMapOutput { 414 return o 415 } 416 417 func (o HostedConnectionMapOutput) MapIndex(k pulumi.StringInput) HostedConnectionOutput { 418 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HostedConnection { 419 return vs[0].(map[string]*HostedConnection)[vs[1].(string)] 420 }).(HostedConnectionOutput) 421 } 422 423 func init() { 424 pulumi.RegisterInputType(reflect.TypeOf((*HostedConnectionInput)(nil)).Elem(), &HostedConnection{}) 425 pulumi.RegisterInputType(reflect.TypeOf((*HostedConnectionArrayInput)(nil)).Elem(), HostedConnectionArray{}) 426 pulumi.RegisterInputType(reflect.TypeOf((*HostedConnectionMapInput)(nil)).Elem(), HostedConnectionMap{}) 427 pulumi.RegisterOutputType(HostedConnectionOutput{}) 428 pulumi.RegisterOutputType(HostedConnectionArrayOutput{}) 429 pulumi.RegisterOutputType(HostedConnectionMapOutput{}) 430 }