github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/directconnect/hostedPrivateVirtualInterface.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 Direct Connect hosted private virtual interface resource. This resource represents the allocator's side of the hosted virtual interface. 16 // A hosted virtual interface is a virtual interface that is owned by another AWS account. 17 // 18 // ## Example Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := directconnect.NewHostedPrivateVirtualInterface(ctx, "foo", &directconnect.HostedPrivateVirtualInterfaceArgs{ 34 // ConnectionId: pulumi.String("dxcon-zzzzzzzz"), 35 // Name: pulumi.String("vif-foo"), 36 // Vlan: pulumi.Int(4094), 37 // AddressFamily: pulumi.String("ipv4"), 38 // BgpAsn: pulumi.Int(65352), 39 // }) 40 // if err != nil { 41 // return err 42 // } 43 // return nil 44 // }) 45 // } 46 // 47 // ``` 48 // <!--End PulumiCodeChooser --> 49 // 50 // ## Import 51 // 52 // Using `pulumi import`, import Direct Connect hosted private virtual interfaces using the VIF `id`. For example: 53 // 54 // ```sh 55 // $ pulumi import aws:directconnect/hostedPrivateVirtualInterface:HostedPrivateVirtualInterface test dxvif-33cc44dd 56 // ``` 57 type HostedPrivateVirtualInterface struct { 58 pulumi.CustomResourceState 59 60 // The address family for the BGP peer. ` ipv4 ` or `ipv6`. 61 AddressFamily pulumi.StringOutput `pulumi:"addressFamily"` 62 // The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. 63 AmazonAddress pulumi.StringOutput `pulumi:"amazonAddress"` 64 AmazonSideAsn pulumi.StringOutput `pulumi:"amazonSideAsn"` 65 // The ARN of the virtual interface. 66 Arn pulumi.StringOutput `pulumi:"arn"` 67 // The Direct Connect endpoint on which the virtual interface terminates. 68 AwsDevice pulumi.StringOutput `pulumi:"awsDevice"` 69 // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. 70 BgpAsn pulumi.IntOutput `pulumi:"bgpAsn"` 71 // The authentication key for BGP configuration. 72 BgpAuthKey pulumi.StringOutput `pulumi:"bgpAuthKey"` 73 // The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. 74 ConnectionId pulumi.StringOutput `pulumi:"connectionId"` 75 // The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. 76 CustomerAddress pulumi.StringOutput `pulumi:"customerAddress"` 77 // Indicates whether jumbo frames (9001 MTU) are supported. 78 JumboFrameCapable pulumi.BoolOutput `pulumi:"jumboFrameCapable"` 79 // The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`. 80 Mtu pulumi.IntPtrOutput `pulumi:"mtu"` 81 // The name for the virtual interface. 82 Name pulumi.StringOutput `pulumi:"name"` 83 // The AWS account that will own the new virtual interface. 84 OwnerAccountId pulumi.StringOutput `pulumi:"ownerAccountId"` 85 // The VLAN ID. 86 Vlan pulumi.IntOutput `pulumi:"vlan"` 87 } 88 89 // NewHostedPrivateVirtualInterface registers a new resource with the given unique name, arguments, and options. 90 func NewHostedPrivateVirtualInterface(ctx *pulumi.Context, 91 name string, args *HostedPrivateVirtualInterfaceArgs, opts ...pulumi.ResourceOption) (*HostedPrivateVirtualInterface, error) { 92 if args == nil { 93 return nil, errors.New("missing one or more required arguments") 94 } 95 96 if args.AddressFamily == nil { 97 return nil, errors.New("invalid value for required argument 'AddressFamily'") 98 } 99 if args.BgpAsn == nil { 100 return nil, errors.New("invalid value for required argument 'BgpAsn'") 101 } 102 if args.ConnectionId == nil { 103 return nil, errors.New("invalid value for required argument 'ConnectionId'") 104 } 105 if args.OwnerAccountId == nil { 106 return nil, errors.New("invalid value for required argument 'OwnerAccountId'") 107 } 108 if args.Vlan == nil { 109 return nil, errors.New("invalid value for required argument 'Vlan'") 110 } 111 opts = internal.PkgResourceDefaultOpts(opts) 112 var resource HostedPrivateVirtualInterface 113 err := ctx.RegisterResource("aws:directconnect/hostedPrivateVirtualInterface:HostedPrivateVirtualInterface", name, args, &resource, opts...) 114 if err != nil { 115 return nil, err 116 } 117 return &resource, nil 118 } 119 120 // GetHostedPrivateVirtualInterface gets an existing HostedPrivateVirtualInterface resource's state with the given name, ID, and optional 121 // state properties that are used to uniquely qualify the lookup (nil if not required). 122 func GetHostedPrivateVirtualInterface(ctx *pulumi.Context, 123 name string, id pulumi.IDInput, state *HostedPrivateVirtualInterfaceState, opts ...pulumi.ResourceOption) (*HostedPrivateVirtualInterface, error) { 124 var resource HostedPrivateVirtualInterface 125 err := ctx.ReadResource("aws:directconnect/hostedPrivateVirtualInterface:HostedPrivateVirtualInterface", name, id, state, &resource, opts...) 126 if err != nil { 127 return nil, err 128 } 129 return &resource, nil 130 } 131 132 // Input properties used for looking up and filtering HostedPrivateVirtualInterface resources. 133 type hostedPrivateVirtualInterfaceState struct { 134 // The address family for the BGP peer. ` ipv4 ` or `ipv6`. 135 AddressFamily *string `pulumi:"addressFamily"` 136 // The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. 137 AmazonAddress *string `pulumi:"amazonAddress"` 138 AmazonSideAsn *string `pulumi:"amazonSideAsn"` 139 // The ARN of the virtual interface. 140 Arn *string `pulumi:"arn"` 141 // The Direct Connect endpoint on which the virtual interface terminates. 142 AwsDevice *string `pulumi:"awsDevice"` 143 // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. 144 BgpAsn *int `pulumi:"bgpAsn"` 145 // The authentication key for BGP configuration. 146 BgpAuthKey *string `pulumi:"bgpAuthKey"` 147 // The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. 148 ConnectionId *string `pulumi:"connectionId"` 149 // The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. 150 CustomerAddress *string `pulumi:"customerAddress"` 151 // Indicates whether jumbo frames (9001 MTU) are supported. 152 JumboFrameCapable *bool `pulumi:"jumboFrameCapable"` 153 // The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`. 154 Mtu *int `pulumi:"mtu"` 155 // The name for the virtual interface. 156 Name *string `pulumi:"name"` 157 // The AWS account that will own the new virtual interface. 158 OwnerAccountId *string `pulumi:"ownerAccountId"` 159 // The VLAN ID. 160 Vlan *int `pulumi:"vlan"` 161 } 162 163 type HostedPrivateVirtualInterfaceState struct { 164 // The address family for the BGP peer. ` ipv4 ` or `ipv6`. 165 AddressFamily pulumi.StringPtrInput 166 // The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. 167 AmazonAddress pulumi.StringPtrInput 168 AmazonSideAsn pulumi.StringPtrInput 169 // The ARN of the virtual interface. 170 Arn pulumi.StringPtrInput 171 // The Direct Connect endpoint on which the virtual interface terminates. 172 AwsDevice pulumi.StringPtrInput 173 // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. 174 BgpAsn pulumi.IntPtrInput 175 // The authentication key for BGP configuration. 176 BgpAuthKey pulumi.StringPtrInput 177 // The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. 178 ConnectionId pulumi.StringPtrInput 179 // The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. 180 CustomerAddress pulumi.StringPtrInput 181 // Indicates whether jumbo frames (9001 MTU) are supported. 182 JumboFrameCapable pulumi.BoolPtrInput 183 // The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`. 184 Mtu pulumi.IntPtrInput 185 // The name for the virtual interface. 186 Name pulumi.StringPtrInput 187 // The AWS account that will own the new virtual interface. 188 OwnerAccountId pulumi.StringPtrInput 189 // The VLAN ID. 190 Vlan pulumi.IntPtrInput 191 } 192 193 func (HostedPrivateVirtualInterfaceState) ElementType() reflect.Type { 194 return reflect.TypeOf((*hostedPrivateVirtualInterfaceState)(nil)).Elem() 195 } 196 197 type hostedPrivateVirtualInterfaceArgs struct { 198 // The address family for the BGP peer. ` ipv4 ` or `ipv6`. 199 AddressFamily string `pulumi:"addressFamily"` 200 // The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. 201 AmazonAddress *string `pulumi:"amazonAddress"` 202 // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. 203 BgpAsn int `pulumi:"bgpAsn"` 204 // The authentication key for BGP configuration. 205 BgpAuthKey *string `pulumi:"bgpAuthKey"` 206 // The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. 207 ConnectionId string `pulumi:"connectionId"` 208 // The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. 209 CustomerAddress *string `pulumi:"customerAddress"` 210 // The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`. 211 Mtu *int `pulumi:"mtu"` 212 // The name for the virtual interface. 213 Name *string `pulumi:"name"` 214 // The AWS account that will own the new virtual interface. 215 OwnerAccountId string `pulumi:"ownerAccountId"` 216 // The VLAN ID. 217 Vlan int `pulumi:"vlan"` 218 } 219 220 // The set of arguments for constructing a HostedPrivateVirtualInterface resource. 221 type HostedPrivateVirtualInterfaceArgs struct { 222 // The address family for the BGP peer. ` ipv4 ` or `ipv6`. 223 AddressFamily pulumi.StringInput 224 // The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. 225 AmazonAddress pulumi.StringPtrInput 226 // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. 227 BgpAsn pulumi.IntInput 228 // The authentication key for BGP configuration. 229 BgpAuthKey pulumi.StringPtrInput 230 // The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. 231 ConnectionId pulumi.StringInput 232 // The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. 233 CustomerAddress pulumi.StringPtrInput 234 // The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`. 235 Mtu pulumi.IntPtrInput 236 // The name for the virtual interface. 237 Name pulumi.StringPtrInput 238 // The AWS account that will own the new virtual interface. 239 OwnerAccountId pulumi.StringInput 240 // The VLAN ID. 241 Vlan pulumi.IntInput 242 } 243 244 func (HostedPrivateVirtualInterfaceArgs) ElementType() reflect.Type { 245 return reflect.TypeOf((*hostedPrivateVirtualInterfaceArgs)(nil)).Elem() 246 } 247 248 type HostedPrivateVirtualInterfaceInput interface { 249 pulumi.Input 250 251 ToHostedPrivateVirtualInterfaceOutput() HostedPrivateVirtualInterfaceOutput 252 ToHostedPrivateVirtualInterfaceOutputWithContext(ctx context.Context) HostedPrivateVirtualInterfaceOutput 253 } 254 255 func (*HostedPrivateVirtualInterface) ElementType() reflect.Type { 256 return reflect.TypeOf((**HostedPrivateVirtualInterface)(nil)).Elem() 257 } 258 259 func (i *HostedPrivateVirtualInterface) ToHostedPrivateVirtualInterfaceOutput() HostedPrivateVirtualInterfaceOutput { 260 return i.ToHostedPrivateVirtualInterfaceOutputWithContext(context.Background()) 261 } 262 263 func (i *HostedPrivateVirtualInterface) ToHostedPrivateVirtualInterfaceOutputWithContext(ctx context.Context) HostedPrivateVirtualInterfaceOutput { 264 return pulumi.ToOutputWithContext(ctx, i).(HostedPrivateVirtualInterfaceOutput) 265 } 266 267 // HostedPrivateVirtualInterfaceArrayInput is an input type that accepts HostedPrivateVirtualInterfaceArray and HostedPrivateVirtualInterfaceArrayOutput values. 268 // You can construct a concrete instance of `HostedPrivateVirtualInterfaceArrayInput` via: 269 // 270 // HostedPrivateVirtualInterfaceArray{ HostedPrivateVirtualInterfaceArgs{...} } 271 type HostedPrivateVirtualInterfaceArrayInput interface { 272 pulumi.Input 273 274 ToHostedPrivateVirtualInterfaceArrayOutput() HostedPrivateVirtualInterfaceArrayOutput 275 ToHostedPrivateVirtualInterfaceArrayOutputWithContext(context.Context) HostedPrivateVirtualInterfaceArrayOutput 276 } 277 278 type HostedPrivateVirtualInterfaceArray []HostedPrivateVirtualInterfaceInput 279 280 func (HostedPrivateVirtualInterfaceArray) ElementType() reflect.Type { 281 return reflect.TypeOf((*[]*HostedPrivateVirtualInterface)(nil)).Elem() 282 } 283 284 func (i HostedPrivateVirtualInterfaceArray) ToHostedPrivateVirtualInterfaceArrayOutput() HostedPrivateVirtualInterfaceArrayOutput { 285 return i.ToHostedPrivateVirtualInterfaceArrayOutputWithContext(context.Background()) 286 } 287 288 func (i HostedPrivateVirtualInterfaceArray) ToHostedPrivateVirtualInterfaceArrayOutputWithContext(ctx context.Context) HostedPrivateVirtualInterfaceArrayOutput { 289 return pulumi.ToOutputWithContext(ctx, i).(HostedPrivateVirtualInterfaceArrayOutput) 290 } 291 292 // HostedPrivateVirtualInterfaceMapInput is an input type that accepts HostedPrivateVirtualInterfaceMap and HostedPrivateVirtualInterfaceMapOutput values. 293 // You can construct a concrete instance of `HostedPrivateVirtualInterfaceMapInput` via: 294 // 295 // HostedPrivateVirtualInterfaceMap{ "key": HostedPrivateVirtualInterfaceArgs{...} } 296 type HostedPrivateVirtualInterfaceMapInput interface { 297 pulumi.Input 298 299 ToHostedPrivateVirtualInterfaceMapOutput() HostedPrivateVirtualInterfaceMapOutput 300 ToHostedPrivateVirtualInterfaceMapOutputWithContext(context.Context) HostedPrivateVirtualInterfaceMapOutput 301 } 302 303 type HostedPrivateVirtualInterfaceMap map[string]HostedPrivateVirtualInterfaceInput 304 305 func (HostedPrivateVirtualInterfaceMap) ElementType() reflect.Type { 306 return reflect.TypeOf((*map[string]*HostedPrivateVirtualInterface)(nil)).Elem() 307 } 308 309 func (i HostedPrivateVirtualInterfaceMap) ToHostedPrivateVirtualInterfaceMapOutput() HostedPrivateVirtualInterfaceMapOutput { 310 return i.ToHostedPrivateVirtualInterfaceMapOutputWithContext(context.Background()) 311 } 312 313 func (i HostedPrivateVirtualInterfaceMap) ToHostedPrivateVirtualInterfaceMapOutputWithContext(ctx context.Context) HostedPrivateVirtualInterfaceMapOutput { 314 return pulumi.ToOutputWithContext(ctx, i).(HostedPrivateVirtualInterfaceMapOutput) 315 } 316 317 type HostedPrivateVirtualInterfaceOutput struct{ *pulumi.OutputState } 318 319 func (HostedPrivateVirtualInterfaceOutput) ElementType() reflect.Type { 320 return reflect.TypeOf((**HostedPrivateVirtualInterface)(nil)).Elem() 321 } 322 323 func (o HostedPrivateVirtualInterfaceOutput) ToHostedPrivateVirtualInterfaceOutput() HostedPrivateVirtualInterfaceOutput { 324 return o 325 } 326 327 func (o HostedPrivateVirtualInterfaceOutput) ToHostedPrivateVirtualInterfaceOutputWithContext(ctx context.Context) HostedPrivateVirtualInterfaceOutput { 328 return o 329 } 330 331 // The address family for the BGP peer. ` ipv4 ` or `ipv6`. 332 func (o HostedPrivateVirtualInterfaceOutput) AddressFamily() pulumi.StringOutput { 333 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.AddressFamily }).(pulumi.StringOutput) 334 } 335 336 // The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. 337 func (o HostedPrivateVirtualInterfaceOutput) AmazonAddress() pulumi.StringOutput { 338 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.AmazonAddress }).(pulumi.StringOutput) 339 } 340 341 func (o HostedPrivateVirtualInterfaceOutput) AmazonSideAsn() pulumi.StringOutput { 342 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.AmazonSideAsn }).(pulumi.StringOutput) 343 } 344 345 // The ARN of the virtual interface. 346 func (o HostedPrivateVirtualInterfaceOutput) Arn() pulumi.StringOutput { 347 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 348 } 349 350 // The Direct Connect endpoint on which the virtual interface terminates. 351 func (o HostedPrivateVirtualInterfaceOutput) AwsDevice() pulumi.StringOutput { 352 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.AwsDevice }).(pulumi.StringOutput) 353 } 354 355 // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. 356 func (o HostedPrivateVirtualInterfaceOutput) BgpAsn() pulumi.IntOutput { 357 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.IntOutput { return v.BgpAsn }).(pulumi.IntOutput) 358 } 359 360 // The authentication key for BGP configuration. 361 func (o HostedPrivateVirtualInterfaceOutput) BgpAuthKey() pulumi.StringOutput { 362 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.BgpAuthKey }).(pulumi.StringOutput) 363 } 364 365 // The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. 366 func (o HostedPrivateVirtualInterfaceOutput) ConnectionId() pulumi.StringOutput { 367 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.ConnectionId }).(pulumi.StringOutput) 368 } 369 370 // The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. 371 func (o HostedPrivateVirtualInterfaceOutput) CustomerAddress() pulumi.StringOutput { 372 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.CustomerAddress }).(pulumi.StringOutput) 373 } 374 375 // Indicates whether jumbo frames (9001 MTU) are supported. 376 func (o HostedPrivateVirtualInterfaceOutput) JumboFrameCapable() pulumi.BoolOutput { 377 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.BoolOutput { return v.JumboFrameCapable }).(pulumi.BoolOutput) 378 } 379 380 // The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`. 381 func (o HostedPrivateVirtualInterfaceOutput) Mtu() pulumi.IntPtrOutput { 382 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.IntPtrOutput { return v.Mtu }).(pulumi.IntPtrOutput) 383 } 384 385 // The name for the virtual interface. 386 func (o HostedPrivateVirtualInterfaceOutput) Name() pulumi.StringOutput { 387 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 388 } 389 390 // The AWS account that will own the new virtual interface. 391 func (o HostedPrivateVirtualInterfaceOutput) OwnerAccountId() pulumi.StringOutput { 392 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.StringOutput { return v.OwnerAccountId }).(pulumi.StringOutput) 393 } 394 395 // The VLAN ID. 396 func (o HostedPrivateVirtualInterfaceOutput) Vlan() pulumi.IntOutput { 397 return o.ApplyT(func(v *HostedPrivateVirtualInterface) pulumi.IntOutput { return v.Vlan }).(pulumi.IntOutput) 398 } 399 400 type HostedPrivateVirtualInterfaceArrayOutput struct{ *pulumi.OutputState } 401 402 func (HostedPrivateVirtualInterfaceArrayOutput) ElementType() reflect.Type { 403 return reflect.TypeOf((*[]*HostedPrivateVirtualInterface)(nil)).Elem() 404 } 405 406 func (o HostedPrivateVirtualInterfaceArrayOutput) ToHostedPrivateVirtualInterfaceArrayOutput() HostedPrivateVirtualInterfaceArrayOutput { 407 return o 408 } 409 410 func (o HostedPrivateVirtualInterfaceArrayOutput) ToHostedPrivateVirtualInterfaceArrayOutputWithContext(ctx context.Context) HostedPrivateVirtualInterfaceArrayOutput { 411 return o 412 } 413 414 func (o HostedPrivateVirtualInterfaceArrayOutput) Index(i pulumi.IntInput) HostedPrivateVirtualInterfaceOutput { 415 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HostedPrivateVirtualInterface { 416 return vs[0].([]*HostedPrivateVirtualInterface)[vs[1].(int)] 417 }).(HostedPrivateVirtualInterfaceOutput) 418 } 419 420 type HostedPrivateVirtualInterfaceMapOutput struct{ *pulumi.OutputState } 421 422 func (HostedPrivateVirtualInterfaceMapOutput) ElementType() reflect.Type { 423 return reflect.TypeOf((*map[string]*HostedPrivateVirtualInterface)(nil)).Elem() 424 } 425 426 func (o HostedPrivateVirtualInterfaceMapOutput) ToHostedPrivateVirtualInterfaceMapOutput() HostedPrivateVirtualInterfaceMapOutput { 427 return o 428 } 429 430 func (o HostedPrivateVirtualInterfaceMapOutput) ToHostedPrivateVirtualInterfaceMapOutputWithContext(ctx context.Context) HostedPrivateVirtualInterfaceMapOutput { 431 return o 432 } 433 434 func (o HostedPrivateVirtualInterfaceMapOutput) MapIndex(k pulumi.StringInput) HostedPrivateVirtualInterfaceOutput { 435 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HostedPrivateVirtualInterface { 436 return vs[0].(map[string]*HostedPrivateVirtualInterface)[vs[1].(string)] 437 }).(HostedPrivateVirtualInterfaceOutput) 438 } 439 440 func init() { 441 pulumi.RegisterInputType(reflect.TypeOf((*HostedPrivateVirtualInterfaceInput)(nil)).Elem(), &HostedPrivateVirtualInterface{}) 442 pulumi.RegisterInputType(reflect.TypeOf((*HostedPrivateVirtualInterfaceArrayInput)(nil)).Elem(), HostedPrivateVirtualInterfaceArray{}) 443 pulumi.RegisterInputType(reflect.TypeOf((*HostedPrivateVirtualInterfaceMapInput)(nil)).Elem(), HostedPrivateVirtualInterfaceMap{}) 444 pulumi.RegisterOutputType(HostedPrivateVirtualInterfaceOutput{}) 445 pulumi.RegisterOutputType(HostedPrivateVirtualInterfaceArrayOutput{}) 446 pulumi.RegisterOutputType(HostedPrivateVirtualInterfaceMapOutput{}) 447 }