github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ebs/volume.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 ebs 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 // Manages a single EBS volume. 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/ebs" 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 := ebs.NewVolume(ctx, "example", &ebs.VolumeArgs{ 33 // AvailabilityZone: pulumi.String("us-west-2a"), 34 // Size: pulumi.Int(40), 35 // Tags: pulumi.StringMap{ 36 // "Name": pulumi.String("HelloWorld"), 37 // }, 38 // }) 39 // if err != nil { 40 // return err 41 // } 42 // return nil 43 // }) 44 // } 45 // 46 // ``` 47 // <!--End PulumiCodeChooser --> 48 // 49 // > **NOTE:** At least one of `size` or `snapshotId` is required when specifying an EBS volume 50 // 51 // ## Import 52 // 53 // Using `pulumi import`, import EBS Volumes using the `id`. For example: 54 // 55 // ```sh 56 // $ pulumi import aws:ebs/volume:Volume id vol-049df61146c4d7901 57 // ``` 58 type Volume struct { 59 pulumi.CustomResourceState 60 61 // The volume ARN (e.g., arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e). 62 Arn pulumi.StringOutput `pulumi:"arn"` 63 // The AZ where the EBS volume will exist. 64 AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"` 65 // If true, the disk will be encrypted. 66 Encrypted pulumi.BoolOutput `pulumi:"encrypted"` 67 // If true, snapshot will be created before volume deletion. Any tags on the volume will be migrated to the snapshot. By default set to false 68 FinalSnapshot pulumi.BoolPtrOutput `pulumi:"finalSnapshot"` 69 // The amount of IOPS to provision for the disk. Only valid for `type` of `io1`, `io2` or `gp3`. 70 Iops pulumi.IntOutput `pulumi:"iops"` 71 // The ARN for the KMS encryption key. When specifying `kmsKeyId`, `encrypted` needs to be set to true. Note: The provider must be running with credentials which have the `GenerateDataKeyWithoutPlaintext` permission on the specified KMS key as required by the [EBS KMS CMK volume provisioning process](https://docs.aws.amazon.com/kms/latest/developerguide/services-ebs.html#ebs-cmk) to prevent a volume from being created and almost immediately deleted. 72 KmsKeyId pulumi.StringOutput `pulumi:"kmsKeyId"` 73 // Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported on `io1` and `io2` volumes. 74 MultiAttachEnabled pulumi.BoolPtrOutput `pulumi:"multiAttachEnabled"` 75 // The Amazon Resource Name (ARN) of the Outpost. 76 OutpostArn pulumi.StringPtrOutput `pulumi:"outpostArn"` 77 // The size of the drive in GiBs. 78 Size pulumi.IntOutput `pulumi:"size"` 79 // A snapshot to base the EBS volume off of. 80 SnapshotId pulumi.StringOutput `pulumi:"snapshotId"` 81 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 82 Tags pulumi.StringMapOutput `pulumi:"tags"` 83 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 84 // 85 // Deprecated: Please use `tags` instead. 86 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 87 // The throughput that the volume supports, in MiB/s. Only valid for `type` of `gp3`. 88 // 89 // > **NOTE:** When changing the `size`, `iops` or `type` of an instance, there are [considerations](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/considerations.html) to be aware of. 90 Throughput pulumi.IntOutput `pulumi:"throughput"` 91 // The type of EBS volume. Can be `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1` or `st1` (Default: `gp2`). 92 Type pulumi.StringOutput `pulumi:"type"` 93 } 94 95 // NewVolume registers a new resource with the given unique name, arguments, and options. 96 func NewVolume(ctx *pulumi.Context, 97 name string, args *VolumeArgs, opts ...pulumi.ResourceOption) (*Volume, error) { 98 if args == nil { 99 return nil, errors.New("missing one or more required arguments") 100 } 101 102 if args.AvailabilityZone == nil { 103 return nil, errors.New("invalid value for required argument 'AvailabilityZone'") 104 } 105 opts = internal.PkgResourceDefaultOpts(opts) 106 var resource Volume 107 err := ctx.RegisterResource("aws:ebs/volume:Volume", name, args, &resource, opts...) 108 if err != nil { 109 return nil, err 110 } 111 return &resource, nil 112 } 113 114 // GetVolume gets an existing Volume resource's state with the given name, ID, and optional 115 // state properties that are used to uniquely qualify the lookup (nil if not required). 116 func GetVolume(ctx *pulumi.Context, 117 name string, id pulumi.IDInput, state *VolumeState, opts ...pulumi.ResourceOption) (*Volume, error) { 118 var resource Volume 119 err := ctx.ReadResource("aws:ebs/volume:Volume", name, id, state, &resource, opts...) 120 if err != nil { 121 return nil, err 122 } 123 return &resource, nil 124 } 125 126 // Input properties used for looking up and filtering Volume resources. 127 type volumeState struct { 128 // The volume ARN (e.g., arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e). 129 Arn *string `pulumi:"arn"` 130 // The AZ where the EBS volume will exist. 131 AvailabilityZone *string `pulumi:"availabilityZone"` 132 // If true, the disk will be encrypted. 133 Encrypted *bool `pulumi:"encrypted"` 134 // If true, snapshot will be created before volume deletion. Any tags on the volume will be migrated to the snapshot. By default set to false 135 FinalSnapshot *bool `pulumi:"finalSnapshot"` 136 // The amount of IOPS to provision for the disk. Only valid for `type` of `io1`, `io2` or `gp3`. 137 Iops *int `pulumi:"iops"` 138 // The ARN for the KMS encryption key. When specifying `kmsKeyId`, `encrypted` needs to be set to true. Note: The provider must be running with credentials which have the `GenerateDataKeyWithoutPlaintext` permission on the specified KMS key as required by the [EBS KMS CMK volume provisioning process](https://docs.aws.amazon.com/kms/latest/developerguide/services-ebs.html#ebs-cmk) to prevent a volume from being created and almost immediately deleted. 139 KmsKeyId *string `pulumi:"kmsKeyId"` 140 // Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported on `io1` and `io2` volumes. 141 MultiAttachEnabled *bool `pulumi:"multiAttachEnabled"` 142 // The Amazon Resource Name (ARN) of the Outpost. 143 OutpostArn *string `pulumi:"outpostArn"` 144 // The size of the drive in GiBs. 145 Size *int `pulumi:"size"` 146 // A snapshot to base the EBS volume off of. 147 SnapshotId *string `pulumi:"snapshotId"` 148 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 149 Tags map[string]string `pulumi:"tags"` 150 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 151 // 152 // Deprecated: Please use `tags` instead. 153 TagsAll map[string]string `pulumi:"tagsAll"` 154 // The throughput that the volume supports, in MiB/s. Only valid for `type` of `gp3`. 155 // 156 // > **NOTE:** When changing the `size`, `iops` or `type` of an instance, there are [considerations](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/considerations.html) to be aware of. 157 Throughput *int `pulumi:"throughput"` 158 // The type of EBS volume. Can be `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1` or `st1` (Default: `gp2`). 159 Type *string `pulumi:"type"` 160 } 161 162 type VolumeState struct { 163 // The volume ARN (e.g., arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e). 164 Arn pulumi.StringPtrInput 165 // The AZ where the EBS volume will exist. 166 AvailabilityZone pulumi.StringPtrInput 167 // If true, the disk will be encrypted. 168 Encrypted pulumi.BoolPtrInput 169 // If true, snapshot will be created before volume deletion. Any tags on the volume will be migrated to the snapshot. By default set to false 170 FinalSnapshot pulumi.BoolPtrInput 171 // The amount of IOPS to provision for the disk. Only valid for `type` of `io1`, `io2` or `gp3`. 172 Iops pulumi.IntPtrInput 173 // The ARN for the KMS encryption key. When specifying `kmsKeyId`, `encrypted` needs to be set to true. Note: The provider must be running with credentials which have the `GenerateDataKeyWithoutPlaintext` permission on the specified KMS key as required by the [EBS KMS CMK volume provisioning process](https://docs.aws.amazon.com/kms/latest/developerguide/services-ebs.html#ebs-cmk) to prevent a volume from being created and almost immediately deleted. 174 KmsKeyId pulumi.StringPtrInput 175 // Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported on `io1` and `io2` volumes. 176 MultiAttachEnabled pulumi.BoolPtrInput 177 // The Amazon Resource Name (ARN) of the Outpost. 178 OutpostArn pulumi.StringPtrInput 179 // The size of the drive in GiBs. 180 Size pulumi.IntPtrInput 181 // A snapshot to base the EBS volume off of. 182 SnapshotId pulumi.StringPtrInput 183 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 184 Tags pulumi.StringMapInput 185 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 186 // 187 // Deprecated: Please use `tags` instead. 188 TagsAll pulumi.StringMapInput 189 // The throughput that the volume supports, in MiB/s. Only valid for `type` of `gp3`. 190 // 191 // > **NOTE:** When changing the `size`, `iops` or `type` of an instance, there are [considerations](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/considerations.html) to be aware of. 192 Throughput pulumi.IntPtrInput 193 // The type of EBS volume. Can be `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1` or `st1` (Default: `gp2`). 194 Type pulumi.StringPtrInput 195 } 196 197 func (VolumeState) ElementType() reflect.Type { 198 return reflect.TypeOf((*volumeState)(nil)).Elem() 199 } 200 201 type volumeArgs struct { 202 // The AZ where the EBS volume will exist. 203 AvailabilityZone string `pulumi:"availabilityZone"` 204 // If true, the disk will be encrypted. 205 Encrypted *bool `pulumi:"encrypted"` 206 // If true, snapshot will be created before volume deletion. Any tags on the volume will be migrated to the snapshot. By default set to false 207 FinalSnapshot *bool `pulumi:"finalSnapshot"` 208 // The amount of IOPS to provision for the disk. Only valid for `type` of `io1`, `io2` or `gp3`. 209 Iops *int `pulumi:"iops"` 210 // The ARN for the KMS encryption key. When specifying `kmsKeyId`, `encrypted` needs to be set to true. Note: The provider must be running with credentials which have the `GenerateDataKeyWithoutPlaintext` permission on the specified KMS key as required by the [EBS KMS CMK volume provisioning process](https://docs.aws.amazon.com/kms/latest/developerguide/services-ebs.html#ebs-cmk) to prevent a volume from being created and almost immediately deleted. 211 KmsKeyId *string `pulumi:"kmsKeyId"` 212 // Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported on `io1` and `io2` volumes. 213 MultiAttachEnabled *bool `pulumi:"multiAttachEnabled"` 214 // The Amazon Resource Name (ARN) of the Outpost. 215 OutpostArn *string `pulumi:"outpostArn"` 216 // The size of the drive in GiBs. 217 Size *int `pulumi:"size"` 218 // A snapshot to base the EBS volume off of. 219 SnapshotId *string `pulumi:"snapshotId"` 220 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 221 Tags map[string]string `pulumi:"tags"` 222 // The throughput that the volume supports, in MiB/s. Only valid for `type` of `gp3`. 223 // 224 // > **NOTE:** When changing the `size`, `iops` or `type` of an instance, there are [considerations](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/considerations.html) to be aware of. 225 Throughput *int `pulumi:"throughput"` 226 // The type of EBS volume. Can be `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1` or `st1` (Default: `gp2`). 227 Type *string `pulumi:"type"` 228 } 229 230 // The set of arguments for constructing a Volume resource. 231 type VolumeArgs struct { 232 // The AZ where the EBS volume will exist. 233 AvailabilityZone pulumi.StringInput 234 // If true, the disk will be encrypted. 235 Encrypted pulumi.BoolPtrInput 236 // If true, snapshot will be created before volume deletion. Any tags on the volume will be migrated to the snapshot. By default set to false 237 FinalSnapshot pulumi.BoolPtrInput 238 // The amount of IOPS to provision for the disk. Only valid for `type` of `io1`, `io2` or `gp3`. 239 Iops pulumi.IntPtrInput 240 // The ARN for the KMS encryption key. When specifying `kmsKeyId`, `encrypted` needs to be set to true. Note: The provider must be running with credentials which have the `GenerateDataKeyWithoutPlaintext` permission on the specified KMS key as required by the [EBS KMS CMK volume provisioning process](https://docs.aws.amazon.com/kms/latest/developerguide/services-ebs.html#ebs-cmk) to prevent a volume from being created and almost immediately deleted. 241 KmsKeyId pulumi.StringPtrInput 242 // Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported on `io1` and `io2` volumes. 243 MultiAttachEnabled pulumi.BoolPtrInput 244 // The Amazon Resource Name (ARN) of the Outpost. 245 OutpostArn pulumi.StringPtrInput 246 // The size of the drive in GiBs. 247 Size pulumi.IntPtrInput 248 // A snapshot to base the EBS volume off of. 249 SnapshotId pulumi.StringPtrInput 250 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 251 Tags pulumi.StringMapInput 252 // The throughput that the volume supports, in MiB/s. Only valid for `type` of `gp3`. 253 // 254 // > **NOTE:** When changing the `size`, `iops` or `type` of an instance, there are [considerations](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/considerations.html) to be aware of. 255 Throughput pulumi.IntPtrInput 256 // The type of EBS volume. Can be `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1` or `st1` (Default: `gp2`). 257 Type pulumi.StringPtrInput 258 } 259 260 func (VolumeArgs) ElementType() reflect.Type { 261 return reflect.TypeOf((*volumeArgs)(nil)).Elem() 262 } 263 264 type VolumeInput interface { 265 pulumi.Input 266 267 ToVolumeOutput() VolumeOutput 268 ToVolumeOutputWithContext(ctx context.Context) VolumeOutput 269 } 270 271 func (*Volume) ElementType() reflect.Type { 272 return reflect.TypeOf((**Volume)(nil)).Elem() 273 } 274 275 func (i *Volume) ToVolumeOutput() VolumeOutput { 276 return i.ToVolumeOutputWithContext(context.Background()) 277 } 278 279 func (i *Volume) ToVolumeOutputWithContext(ctx context.Context) VolumeOutput { 280 return pulumi.ToOutputWithContext(ctx, i).(VolumeOutput) 281 } 282 283 // VolumeArrayInput is an input type that accepts VolumeArray and VolumeArrayOutput values. 284 // You can construct a concrete instance of `VolumeArrayInput` via: 285 // 286 // VolumeArray{ VolumeArgs{...} } 287 type VolumeArrayInput interface { 288 pulumi.Input 289 290 ToVolumeArrayOutput() VolumeArrayOutput 291 ToVolumeArrayOutputWithContext(context.Context) VolumeArrayOutput 292 } 293 294 type VolumeArray []VolumeInput 295 296 func (VolumeArray) ElementType() reflect.Type { 297 return reflect.TypeOf((*[]*Volume)(nil)).Elem() 298 } 299 300 func (i VolumeArray) ToVolumeArrayOutput() VolumeArrayOutput { 301 return i.ToVolumeArrayOutputWithContext(context.Background()) 302 } 303 304 func (i VolumeArray) ToVolumeArrayOutputWithContext(ctx context.Context) VolumeArrayOutput { 305 return pulumi.ToOutputWithContext(ctx, i).(VolumeArrayOutput) 306 } 307 308 // VolumeMapInput is an input type that accepts VolumeMap and VolumeMapOutput values. 309 // You can construct a concrete instance of `VolumeMapInput` via: 310 // 311 // VolumeMap{ "key": VolumeArgs{...} } 312 type VolumeMapInput interface { 313 pulumi.Input 314 315 ToVolumeMapOutput() VolumeMapOutput 316 ToVolumeMapOutputWithContext(context.Context) VolumeMapOutput 317 } 318 319 type VolumeMap map[string]VolumeInput 320 321 func (VolumeMap) ElementType() reflect.Type { 322 return reflect.TypeOf((*map[string]*Volume)(nil)).Elem() 323 } 324 325 func (i VolumeMap) ToVolumeMapOutput() VolumeMapOutput { 326 return i.ToVolumeMapOutputWithContext(context.Background()) 327 } 328 329 func (i VolumeMap) ToVolumeMapOutputWithContext(ctx context.Context) VolumeMapOutput { 330 return pulumi.ToOutputWithContext(ctx, i).(VolumeMapOutput) 331 } 332 333 type VolumeOutput struct{ *pulumi.OutputState } 334 335 func (VolumeOutput) ElementType() reflect.Type { 336 return reflect.TypeOf((**Volume)(nil)).Elem() 337 } 338 339 func (o VolumeOutput) ToVolumeOutput() VolumeOutput { 340 return o 341 } 342 343 func (o VolumeOutput) ToVolumeOutputWithContext(ctx context.Context) VolumeOutput { 344 return o 345 } 346 347 // The volume ARN (e.g., arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e). 348 func (o VolumeOutput) Arn() pulumi.StringOutput { 349 return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 350 } 351 352 // The AZ where the EBS volume will exist. 353 func (o VolumeOutput) AvailabilityZone() pulumi.StringOutput { 354 return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.AvailabilityZone }).(pulumi.StringOutput) 355 } 356 357 // If true, the disk will be encrypted. 358 func (o VolumeOutput) Encrypted() pulumi.BoolOutput { 359 return o.ApplyT(func(v *Volume) pulumi.BoolOutput { return v.Encrypted }).(pulumi.BoolOutput) 360 } 361 362 // If true, snapshot will be created before volume deletion. Any tags on the volume will be migrated to the snapshot. By default set to false 363 func (o VolumeOutput) FinalSnapshot() pulumi.BoolPtrOutput { 364 return o.ApplyT(func(v *Volume) pulumi.BoolPtrOutput { return v.FinalSnapshot }).(pulumi.BoolPtrOutput) 365 } 366 367 // The amount of IOPS to provision for the disk. Only valid for `type` of `io1`, `io2` or `gp3`. 368 func (o VolumeOutput) Iops() pulumi.IntOutput { 369 return o.ApplyT(func(v *Volume) pulumi.IntOutput { return v.Iops }).(pulumi.IntOutput) 370 } 371 372 // The ARN for the KMS encryption key. When specifying `kmsKeyId`, `encrypted` needs to be set to true. Note: The provider must be running with credentials which have the `GenerateDataKeyWithoutPlaintext` permission on the specified KMS key as required by the [EBS KMS CMK volume provisioning process](https://docs.aws.amazon.com/kms/latest/developerguide/services-ebs.html#ebs-cmk) to prevent a volume from being created and almost immediately deleted. 373 func (o VolumeOutput) KmsKeyId() pulumi.StringOutput { 374 return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.KmsKeyId }).(pulumi.StringOutput) 375 } 376 377 // Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported on `io1` and `io2` volumes. 378 func (o VolumeOutput) MultiAttachEnabled() pulumi.BoolPtrOutput { 379 return o.ApplyT(func(v *Volume) pulumi.BoolPtrOutput { return v.MultiAttachEnabled }).(pulumi.BoolPtrOutput) 380 } 381 382 // The Amazon Resource Name (ARN) of the Outpost. 383 func (o VolumeOutput) OutpostArn() pulumi.StringPtrOutput { 384 return o.ApplyT(func(v *Volume) pulumi.StringPtrOutput { return v.OutpostArn }).(pulumi.StringPtrOutput) 385 } 386 387 // The size of the drive in GiBs. 388 func (o VolumeOutput) Size() pulumi.IntOutput { 389 return o.ApplyT(func(v *Volume) pulumi.IntOutput { return v.Size }).(pulumi.IntOutput) 390 } 391 392 // A snapshot to base the EBS volume off of. 393 func (o VolumeOutput) SnapshotId() pulumi.StringOutput { 394 return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.SnapshotId }).(pulumi.StringOutput) 395 } 396 397 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 398 func (o VolumeOutput) Tags() pulumi.StringMapOutput { 399 return o.ApplyT(func(v *Volume) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 400 } 401 402 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 403 // 404 // Deprecated: Please use `tags` instead. 405 func (o VolumeOutput) TagsAll() pulumi.StringMapOutput { 406 return o.ApplyT(func(v *Volume) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 407 } 408 409 // The throughput that the volume supports, in MiB/s. Only valid for `type` of `gp3`. 410 // 411 // > **NOTE:** When changing the `size`, `iops` or `type` of an instance, there are [considerations](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/considerations.html) to be aware of. 412 func (o VolumeOutput) Throughput() pulumi.IntOutput { 413 return o.ApplyT(func(v *Volume) pulumi.IntOutput { return v.Throughput }).(pulumi.IntOutput) 414 } 415 416 // The type of EBS volume. Can be `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1` or `st1` (Default: `gp2`). 417 func (o VolumeOutput) Type() pulumi.StringOutput { 418 return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) 419 } 420 421 type VolumeArrayOutput struct{ *pulumi.OutputState } 422 423 func (VolumeArrayOutput) ElementType() reflect.Type { 424 return reflect.TypeOf((*[]*Volume)(nil)).Elem() 425 } 426 427 func (o VolumeArrayOutput) ToVolumeArrayOutput() VolumeArrayOutput { 428 return o 429 } 430 431 func (o VolumeArrayOutput) ToVolumeArrayOutputWithContext(ctx context.Context) VolumeArrayOutput { 432 return o 433 } 434 435 func (o VolumeArrayOutput) Index(i pulumi.IntInput) VolumeOutput { 436 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Volume { 437 return vs[0].([]*Volume)[vs[1].(int)] 438 }).(VolumeOutput) 439 } 440 441 type VolumeMapOutput struct{ *pulumi.OutputState } 442 443 func (VolumeMapOutput) ElementType() reflect.Type { 444 return reflect.TypeOf((*map[string]*Volume)(nil)).Elem() 445 } 446 447 func (o VolumeMapOutput) ToVolumeMapOutput() VolumeMapOutput { 448 return o 449 } 450 451 func (o VolumeMapOutput) ToVolumeMapOutputWithContext(ctx context.Context) VolumeMapOutput { 452 return o 453 } 454 455 func (o VolumeMapOutput) MapIndex(k pulumi.StringInput) VolumeOutput { 456 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Volume { 457 return vs[0].(map[string]*Volume)[vs[1].(string)] 458 }).(VolumeOutput) 459 } 460 461 func init() { 462 pulumi.RegisterInputType(reflect.TypeOf((*VolumeInput)(nil)).Elem(), &Volume{}) 463 pulumi.RegisterInputType(reflect.TypeOf((*VolumeArrayInput)(nil)).Elem(), VolumeArray{}) 464 pulumi.RegisterInputType(reflect.TypeOf((*VolumeMapInput)(nil)).Elem(), VolumeMap{}) 465 pulumi.RegisterOutputType(VolumeOutput{}) 466 pulumi.RegisterOutputType(VolumeArrayOutput{}) 467 pulumi.RegisterOutputType(VolumeMapOutput{}) 468 }