github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/amiFromInstance.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 ec2 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 // The "AMI from instance" resource allows the creation of an Amazon Machine 16 // Image (AMI) modelled after an existing EBS-backed EC2 instance. 17 // 18 // The created AMI will refer to implicitly-created snapshots of the instance's 19 // EBS volumes and mimick its assigned block device configuration at the time 20 // the resource is created. 21 // 22 // This resource is best applied to an instance that is stopped when this instance 23 // is created, so that the contents of the created image are predictable. When 24 // applied to an instance that is running, *the instance will be stopped before taking 25 // the snapshots and then started back up again*, resulting in a period of 26 // downtime. 27 // 28 // Note that the source instance is inspected only at the initial creation of this 29 // resource. Ongoing updates to the referenced instance will not be propagated into 30 // the generated AMI. Users may taint or otherwise recreate the resource in order 31 // to produce a fresh snapshot. 32 // 33 // ## Example Usage 34 // 35 // <!--Start PulumiCodeChooser --> 36 // ```go 37 // package main 38 // 39 // import ( 40 // 41 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 42 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 43 // 44 // ) 45 // 46 // func main() { 47 // pulumi.Run(func(ctx *pulumi.Context) error { 48 // _, err := ec2.NewAmiFromInstance(ctx, "example", &ec2.AmiFromInstanceArgs{ 49 // Name: pulumi.String("example"), 50 // SourceInstanceId: pulumi.String("i-xxxxxxxx"), 51 // }) 52 // if err != nil { 53 // return err 54 // } 55 // return nil 56 // }) 57 // } 58 // 59 // ``` 60 // <!--End PulumiCodeChooser --> 61 type AmiFromInstance struct { 62 pulumi.CustomResourceState 63 64 // Machine architecture for created instances. Defaults to "x8664". 65 Architecture pulumi.StringOutput `pulumi:"architecture"` 66 // ARN of the AMI. 67 Arn pulumi.StringOutput `pulumi:"arn"` 68 // Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide. 69 BootMode pulumi.StringOutput `pulumi:"bootMode"` 70 // Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 71 DeprecationTime pulumi.StringPtrOutput `pulumi:"deprecationTime"` 72 // Longer, human-readable description for the AMI. 73 Description pulumi.StringPtrOutput `pulumi:"description"` 74 // Nested block describing an EBS block device that should be 75 // attached to created instances. The structure of this block is described below. 76 EbsBlockDevices AmiFromInstanceEbsBlockDeviceArrayOutput `pulumi:"ebsBlockDevices"` 77 // Whether enhanced networking with ENA is enabled. Defaults to `false`. 78 EnaSupport pulumi.BoolOutput `pulumi:"enaSupport"` 79 // Nested block describing an ephemeral block device that 80 // should be attached to created instances. The structure of this block is described below. 81 EphemeralBlockDevices AmiFromInstanceEphemeralBlockDeviceArrayOutput `pulumi:"ephemeralBlockDevices"` 82 Hypervisor pulumi.StringOutput `pulumi:"hypervisor"` 83 // Path to an S3 object containing an image manifest, e.g., created 84 // by the `ec2-upload-bundle` command in the EC2 command line tools. 85 ImageLocation pulumi.StringOutput `pulumi:"imageLocation"` 86 ImageOwnerAlias pulumi.StringOutput `pulumi:"imageOwnerAlias"` 87 ImageType pulumi.StringOutput `pulumi:"imageType"` 88 // If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to `v2.0`. For more information, see [Configure instance metadata options for new instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration). 89 ImdsSupport pulumi.StringOutput `pulumi:"imdsSupport"` 90 // ID of the kernel image (AKI) that will be used as the paravirtual 91 // kernel in created instances. 92 KernelId pulumi.StringOutput `pulumi:"kernelId"` 93 ManageEbsSnapshots pulumi.BoolOutput `pulumi:"manageEbsSnapshots"` 94 // Region-unique name for the AMI. 95 Name pulumi.StringOutput `pulumi:"name"` 96 OwnerId pulumi.StringOutput `pulumi:"ownerId"` 97 Platform pulumi.StringOutput `pulumi:"platform"` 98 PlatformDetails pulumi.StringOutput `pulumi:"platformDetails"` 99 Public pulumi.BoolOutput `pulumi:"public"` 100 // ID of an initrd image (ARI) that will be used when booting the 101 // created instances. 102 RamdiskId pulumi.StringOutput `pulumi:"ramdiskId"` 103 // Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`). 104 RootDeviceName pulumi.StringOutput `pulumi:"rootDeviceName"` 105 RootSnapshotId pulumi.StringOutput `pulumi:"rootSnapshotId"` 106 // Boolean that overrides the behavior of stopping 107 // the instance before snapshotting. This is risky since it may cause a snapshot of an 108 // inconsistent filesystem state, but can be used to avoid downtime if the user otherwise 109 // guarantees that no filesystem writes will be underway at the time of snapshot. 110 SnapshotWithoutReboot pulumi.BoolPtrOutput `pulumi:"snapshotWithoutReboot"` 111 // ID of the instance to use as the basis of the AMI. 112 SourceInstanceId pulumi.StringOutput `pulumi:"sourceInstanceId"` 113 // When set to "simple" (the default), enables enhanced networking 114 // for created instances. No other value is supported at this time. 115 SriovNetSupport pulumi.StringOutput `pulumi:"sriovNetSupport"` 116 // 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. 117 Tags pulumi.StringMapOutput `pulumi:"tags"` 118 // Deprecated: Please use `tags` instead. 119 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 120 // If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide. 121 TpmSupport pulumi.StringOutput `pulumi:"tpmSupport"` 122 UsageOperation pulumi.StringOutput `pulumi:"usageOperation"` 123 // Keyword to choose what virtualization mode created instances 124 // will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type 125 // changes the set of further arguments that are required, as described below. 126 VirtualizationType pulumi.StringOutput `pulumi:"virtualizationType"` 127 } 128 129 // NewAmiFromInstance registers a new resource with the given unique name, arguments, and options. 130 func NewAmiFromInstance(ctx *pulumi.Context, 131 name string, args *AmiFromInstanceArgs, opts ...pulumi.ResourceOption) (*AmiFromInstance, error) { 132 if args == nil { 133 return nil, errors.New("missing one or more required arguments") 134 } 135 136 if args.SourceInstanceId == nil { 137 return nil, errors.New("invalid value for required argument 'SourceInstanceId'") 138 } 139 opts = internal.PkgResourceDefaultOpts(opts) 140 var resource AmiFromInstance 141 err := ctx.RegisterResource("aws:ec2/amiFromInstance:AmiFromInstance", name, args, &resource, opts...) 142 if err != nil { 143 return nil, err 144 } 145 return &resource, nil 146 } 147 148 // GetAmiFromInstance gets an existing AmiFromInstance resource's state with the given name, ID, and optional 149 // state properties that are used to uniquely qualify the lookup (nil if not required). 150 func GetAmiFromInstance(ctx *pulumi.Context, 151 name string, id pulumi.IDInput, state *AmiFromInstanceState, opts ...pulumi.ResourceOption) (*AmiFromInstance, error) { 152 var resource AmiFromInstance 153 err := ctx.ReadResource("aws:ec2/amiFromInstance:AmiFromInstance", name, id, state, &resource, opts...) 154 if err != nil { 155 return nil, err 156 } 157 return &resource, nil 158 } 159 160 // Input properties used for looking up and filtering AmiFromInstance resources. 161 type amiFromInstanceState struct { 162 // Machine architecture for created instances. Defaults to "x8664". 163 Architecture *string `pulumi:"architecture"` 164 // ARN of the AMI. 165 Arn *string `pulumi:"arn"` 166 // Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide. 167 BootMode *string `pulumi:"bootMode"` 168 // Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 169 DeprecationTime *string `pulumi:"deprecationTime"` 170 // Longer, human-readable description for the AMI. 171 Description *string `pulumi:"description"` 172 // Nested block describing an EBS block device that should be 173 // attached to created instances. The structure of this block is described below. 174 EbsBlockDevices []AmiFromInstanceEbsBlockDevice `pulumi:"ebsBlockDevices"` 175 // Whether enhanced networking with ENA is enabled. Defaults to `false`. 176 EnaSupport *bool `pulumi:"enaSupport"` 177 // Nested block describing an ephemeral block device that 178 // should be attached to created instances. The structure of this block is described below. 179 EphemeralBlockDevices []AmiFromInstanceEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"` 180 Hypervisor *string `pulumi:"hypervisor"` 181 // Path to an S3 object containing an image manifest, e.g., created 182 // by the `ec2-upload-bundle` command in the EC2 command line tools. 183 ImageLocation *string `pulumi:"imageLocation"` 184 ImageOwnerAlias *string `pulumi:"imageOwnerAlias"` 185 ImageType *string `pulumi:"imageType"` 186 // If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to `v2.0`. For more information, see [Configure instance metadata options for new instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration). 187 ImdsSupport *string `pulumi:"imdsSupport"` 188 // ID of the kernel image (AKI) that will be used as the paravirtual 189 // kernel in created instances. 190 KernelId *string `pulumi:"kernelId"` 191 ManageEbsSnapshots *bool `pulumi:"manageEbsSnapshots"` 192 // Region-unique name for the AMI. 193 Name *string `pulumi:"name"` 194 OwnerId *string `pulumi:"ownerId"` 195 Platform *string `pulumi:"platform"` 196 PlatformDetails *string `pulumi:"platformDetails"` 197 Public *bool `pulumi:"public"` 198 // ID of an initrd image (ARI) that will be used when booting the 199 // created instances. 200 RamdiskId *string `pulumi:"ramdiskId"` 201 // Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`). 202 RootDeviceName *string `pulumi:"rootDeviceName"` 203 RootSnapshotId *string `pulumi:"rootSnapshotId"` 204 // Boolean that overrides the behavior of stopping 205 // the instance before snapshotting. This is risky since it may cause a snapshot of an 206 // inconsistent filesystem state, but can be used to avoid downtime if the user otherwise 207 // guarantees that no filesystem writes will be underway at the time of snapshot. 208 SnapshotWithoutReboot *bool `pulumi:"snapshotWithoutReboot"` 209 // ID of the instance to use as the basis of the AMI. 210 SourceInstanceId *string `pulumi:"sourceInstanceId"` 211 // When set to "simple" (the default), enables enhanced networking 212 // for created instances. No other value is supported at this time. 213 SriovNetSupport *string `pulumi:"sriovNetSupport"` 214 // 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. 215 Tags map[string]string `pulumi:"tags"` 216 // Deprecated: Please use `tags` instead. 217 TagsAll map[string]string `pulumi:"tagsAll"` 218 // If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide. 219 TpmSupport *string `pulumi:"tpmSupport"` 220 UsageOperation *string `pulumi:"usageOperation"` 221 // Keyword to choose what virtualization mode created instances 222 // will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type 223 // changes the set of further arguments that are required, as described below. 224 VirtualizationType *string `pulumi:"virtualizationType"` 225 } 226 227 type AmiFromInstanceState struct { 228 // Machine architecture for created instances. Defaults to "x8664". 229 Architecture pulumi.StringPtrInput 230 // ARN of the AMI. 231 Arn pulumi.StringPtrInput 232 // Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide. 233 BootMode pulumi.StringPtrInput 234 // Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 235 DeprecationTime pulumi.StringPtrInput 236 // Longer, human-readable description for the AMI. 237 Description pulumi.StringPtrInput 238 // Nested block describing an EBS block device that should be 239 // attached to created instances. The structure of this block is described below. 240 EbsBlockDevices AmiFromInstanceEbsBlockDeviceArrayInput 241 // Whether enhanced networking with ENA is enabled. Defaults to `false`. 242 EnaSupport pulumi.BoolPtrInput 243 // Nested block describing an ephemeral block device that 244 // should be attached to created instances. The structure of this block is described below. 245 EphemeralBlockDevices AmiFromInstanceEphemeralBlockDeviceArrayInput 246 Hypervisor pulumi.StringPtrInput 247 // Path to an S3 object containing an image manifest, e.g., created 248 // by the `ec2-upload-bundle` command in the EC2 command line tools. 249 ImageLocation pulumi.StringPtrInput 250 ImageOwnerAlias pulumi.StringPtrInput 251 ImageType pulumi.StringPtrInput 252 // If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to `v2.0`. For more information, see [Configure instance metadata options for new instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration). 253 ImdsSupport pulumi.StringPtrInput 254 // ID of the kernel image (AKI) that will be used as the paravirtual 255 // kernel in created instances. 256 KernelId pulumi.StringPtrInput 257 ManageEbsSnapshots pulumi.BoolPtrInput 258 // Region-unique name for the AMI. 259 Name pulumi.StringPtrInput 260 OwnerId pulumi.StringPtrInput 261 Platform pulumi.StringPtrInput 262 PlatformDetails pulumi.StringPtrInput 263 Public pulumi.BoolPtrInput 264 // ID of an initrd image (ARI) that will be used when booting the 265 // created instances. 266 RamdiskId pulumi.StringPtrInput 267 // Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`). 268 RootDeviceName pulumi.StringPtrInput 269 RootSnapshotId pulumi.StringPtrInput 270 // Boolean that overrides the behavior of stopping 271 // the instance before snapshotting. This is risky since it may cause a snapshot of an 272 // inconsistent filesystem state, but can be used to avoid downtime if the user otherwise 273 // guarantees that no filesystem writes will be underway at the time of snapshot. 274 SnapshotWithoutReboot pulumi.BoolPtrInput 275 // ID of the instance to use as the basis of the AMI. 276 SourceInstanceId pulumi.StringPtrInput 277 // When set to "simple" (the default), enables enhanced networking 278 // for created instances. No other value is supported at this time. 279 SriovNetSupport pulumi.StringPtrInput 280 // 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. 281 Tags pulumi.StringMapInput 282 // Deprecated: Please use `tags` instead. 283 TagsAll pulumi.StringMapInput 284 // If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide. 285 TpmSupport pulumi.StringPtrInput 286 UsageOperation pulumi.StringPtrInput 287 // Keyword to choose what virtualization mode created instances 288 // will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type 289 // changes the set of further arguments that are required, as described below. 290 VirtualizationType pulumi.StringPtrInput 291 } 292 293 func (AmiFromInstanceState) ElementType() reflect.Type { 294 return reflect.TypeOf((*amiFromInstanceState)(nil)).Elem() 295 } 296 297 type amiFromInstanceArgs struct { 298 // Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 299 DeprecationTime *string `pulumi:"deprecationTime"` 300 // Longer, human-readable description for the AMI. 301 Description *string `pulumi:"description"` 302 // Nested block describing an EBS block device that should be 303 // attached to created instances. The structure of this block is described below. 304 EbsBlockDevices []AmiFromInstanceEbsBlockDevice `pulumi:"ebsBlockDevices"` 305 // Nested block describing an ephemeral block device that 306 // should be attached to created instances. The structure of this block is described below. 307 EphemeralBlockDevices []AmiFromInstanceEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"` 308 // Region-unique name for the AMI. 309 Name *string `pulumi:"name"` 310 // Boolean that overrides the behavior of stopping 311 // the instance before snapshotting. This is risky since it may cause a snapshot of an 312 // inconsistent filesystem state, but can be used to avoid downtime if the user otherwise 313 // guarantees that no filesystem writes will be underway at the time of snapshot. 314 SnapshotWithoutReboot *bool `pulumi:"snapshotWithoutReboot"` 315 // ID of the instance to use as the basis of the AMI. 316 SourceInstanceId string `pulumi:"sourceInstanceId"` 317 // 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. 318 Tags map[string]string `pulumi:"tags"` 319 } 320 321 // The set of arguments for constructing a AmiFromInstance resource. 322 type AmiFromInstanceArgs struct { 323 // Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 324 DeprecationTime pulumi.StringPtrInput 325 // Longer, human-readable description for the AMI. 326 Description pulumi.StringPtrInput 327 // Nested block describing an EBS block device that should be 328 // attached to created instances. The structure of this block is described below. 329 EbsBlockDevices AmiFromInstanceEbsBlockDeviceArrayInput 330 // Nested block describing an ephemeral block device that 331 // should be attached to created instances. The structure of this block is described below. 332 EphemeralBlockDevices AmiFromInstanceEphemeralBlockDeviceArrayInput 333 // Region-unique name for the AMI. 334 Name pulumi.StringPtrInput 335 // Boolean that overrides the behavior of stopping 336 // the instance before snapshotting. This is risky since it may cause a snapshot of an 337 // inconsistent filesystem state, but can be used to avoid downtime if the user otherwise 338 // guarantees that no filesystem writes will be underway at the time of snapshot. 339 SnapshotWithoutReboot pulumi.BoolPtrInput 340 // ID of the instance to use as the basis of the AMI. 341 SourceInstanceId pulumi.StringInput 342 // 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. 343 Tags pulumi.StringMapInput 344 } 345 346 func (AmiFromInstanceArgs) ElementType() reflect.Type { 347 return reflect.TypeOf((*amiFromInstanceArgs)(nil)).Elem() 348 } 349 350 type AmiFromInstanceInput interface { 351 pulumi.Input 352 353 ToAmiFromInstanceOutput() AmiFromInstanceOutput 354 ToAmiFromInstanceOutputWithContext(ctx context.Context) AmiFromInstanceOutput 355 } 356 357 func (*AmiFromInstance) ElementType() reflect.Type { 358 return reflect.TypeOf((**AmiFromInstance)(nil)).Elem() 359 } 360 361 func (i *AmiFromInstance) ToAmiFromInstanceOutput() AmiFromInstanceOutput { 362 return i.ToAmiFromInstanceOutputWithContext(context.Background()) 363 } 364 365 func (i *AmiFromInstance) ToAmiFromInstanceOutputWithContext(ctx context.Context) AmiFromInstanceOutput { 366 return pulumi.ToOutputWithContext(ctx, i).(AmiFromInstanceOutput) 367 } 368 369 // AmiFromInstanceArrayInput is an input type that accepts AmiFromInstanceArray and AmiFromInstanceArrayOutput values. 370 // You can construct a concrete instance of `AmiFromInstanceArrayInput` via: 371 // 372 // AmiFromInstanceArray{ AmiFromInstanceArgs{...} } 373 type AmiFromInstanceArrayInput interface { 374 pulumi.Input 375 376 ToAmiFromInstanceArrayOutput() AmiFromInstanceArrayOutput 377 ToAmiFromInstanceArrayOutputWithContext(context.Context) AmiFromInstanceArrayOutput 378 } 379 380 type AmiFromInstanceArray []AmiFromInstanceInput 381 382 func (AmiFromInstanceArray) ElementType() reflect.Type { 383 return reflect.TypeOf((*[]*AmiFromInstance)(nil)).Elem() 384 } 385 386 func (i AmiFromInstanceArray) ToAmiFromInstanceArrayOutput() AmiFromInstanceArrayOutput { 387 return i.ToAmiFromInstanceArrayOutputWithContext(context.Background()) 388 } 389 390 func (i AmiFromInstanceArray) ToAmiFromInstanceArrayOutputWithContext(ctx context.Context) AmiFromInstanceArrayOutput { 391 return pulumi.ToOutputWithContext(ctx, i).(AmiFromInstanceArrayOutput) 392 } 393 394 // AmiFromInstanceMapInput is an input type that accepts AmiFromInstanceMap and AmiFromInstanceMapOutput values. 395 // You can construct a concrete instance of `AmiFromInstanceMapInput` via: 396 // 397 // AmiFromInstanceMap{ "key": AmiFromInstanceArgs{...} } 398 type AmiFromInstanceMapInput interface { 399 pulumi.Input 400 401 ToAmiFromInstanceMapOutput() AmiFromInstanceMapOutput 402 ToAmiFromInstanceMapOutputWithContext(context.Context) AmiFromInstanceMapOutput 403 } 404 405 type AmiFromInstanceMap map[string]AmiFromInstanceInput 406 407 func (AmiFromInstanceMap) ElementType() reflect.Type { 408 return reflect.TypeOf((*map[string]*AmiFromInstance)(nil)).Elem() 409 } 410 411 func (i AmiFromInstanceMap) ToAmiFromInstanceMapOutput() AmiFromInstanceMapOutput { 412 return i.ToAmiFromInstanceMapOutputWithContext(context.Background()) 413 } 414 415 func (i AmiFromInstanceMap) ToAmiFromInstanceMapOutputWithContext(ctx context.Context) AmiFromInstanceMapOutput { 416 return pulumi.ToOutputWithContext(ctx, i).(AmiFromInstanceMapOutput) 417 } 418 419 type AmiFromInstanceOutput struct{ *pulumi.OutputState } 420 421 func (AmiFromInstanceOutput) ElementType() reflect.Type { 422 return reflect.TypeOf((**AmiFromInstance)(nil)).Elem() 423 } 424 425 func (o AmiFromInstanceOutput) ToAmiFromInstanceOutput() AmiFromInstanceOutput { 426 return o 427 } 428 429 func (o AmiFromInstanceOutput) ToAmiFromInstanceOutputWithContext(ctx context.Context) AmiFromInstanceOutput { 430 return o 431 } 432 433 // Machine architecture for created instances. Defaults to "x8664". 434 func (o AmiFromInstanceOutput) Architecture() pulumi.StringOutput { 435 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.Architecture }).(pulumi.StringOutput) 436 } 437 438 // ARN of the AMI. 439 func (o AmiFromInstanceOutput) Arn() pulumi.StringOutput { 440 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 441 } 442 443 // Boot mode of the AMI. For more information, see [Boot modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the Amazon Elastic Compute Cloud User Guide. 444 func (o AmiFromInstanceOutput) BootMode() pulumi.StringOutput { 445 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.BootMode }).(pulumi.StringOutput) 446 } 447 448 // Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 449 func (o AmiFromInstanceOutput) DeprecationTime() pulumi.StringPtrOutput { 450 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringPtrOutput { return v.DeprecationTime }).(pulumi.StringPtrOutput) 451 } 452 453 // Longer, human-readable description for the AMI. 454 func (o AmiFromInstanceOutput) Description() pulumi.StringPtrOutput { 455 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 456 } 457 458 // Nested block describing an EBS block device that should be 459 // attached to created instances. The structure of this block is described below. 460 func (o AmiFromInstanceOutput) EbsBlockDevices() AmiFromInstanceEbsBlockDeviceArrayOutput { 461 return o.ApplyT(func(v *AmiFromInstance) AmiFromInstanceEbsBlockDeviceArrayOutput { return v.EbsBlockDevices }).(AmiFromInstanceEbsBlockDeviceArrayOutput) 462 } 463 464 // Whether enhanced networking with ENA is enabled. Defaults to `false`. 465 func (o AmiFromInstanceOutput) EnaSupport() pulumi.BoolOutput { 466 return o.ApplyT(func(v *AmiFromInstance) pulumi.BoolOutput { return v.EnaSupport }).(pulumi.BoolOutput) 467 } 468 469 // Nested block describing an ephemeral block device that 470 // should be attached to created instances. The structure of this block is described below. 471 func (o AmiFromInstanceOutput) EphemeralBlockDevices() AmiFromInstanceEphemeralBlockDeviceArrayOutput { 472 return o.ApplyT(func(v *AmiFromInstance) AmiFromInstanceEphemeralBlockDeviceArrayOutput { 473 return v.EphemeralBlockDevices 474 }).(AmiFromInstanceEphemeralBlockDeviceArrayOutput) 475 } 476 477 func (o AmiFromInstanceOutput) Hypervisor() pulumi.StringOutput { 478 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.Hypervisor }).(pulumi.StringOutput) 479 } 480 481 // Path to an S3 object containing an image manifest, e.g., created 482 // by the `ec2-upload-bundle` command in the EC2 command line tools. 483 func (o AmiFromInstanceOutput) ImageLocation() pulumi.StringOutput { 484 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.ImageLocation }).(pulumi.StringOutput) 485 } 486 487 func (o AmiFromInstanceOutput) ImageOwnerAlias() pulumi.StringOutput { 488 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.ImageOwnerAlias }).(pulumi.StringOutput) 489 } 490 491 func (o AmiFromInstanceOutput) ImageType() pulumi.StringOutput { 492 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.ImageType }).(pulumi.StringOutput) 493 } 494 495 // If EC2 instances started from this image should require the use of the Instance Metadata Service V2 (IMDSv2), set this argument to `v2.0`. For more information, see [Configure instance metadata options for new instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration). 496 func (o AmiFromInstanceOutput) ImdsSupport() pulumi.StringOutput { 497 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.ImdsSupport }).(pulumi.StringOutput) 498 } 499 500 // ID of the kernel image (AKI) that will be used as the paravirtual 501 // kernel in created instances. 502 func (o AmiFromInstanceOutput) KernelId() pulumi.StringOutput { 503 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.KernelId }).(pulumi.StringOutput) 504 } 505 506 func (o AmiFromInstanceOutput) ManageEbsSnapshots() pulumi.BoolOutput { 507 return o.ApplyT(func(v *AmiFromInstance) pulumi.BoolOutput { return v.ManageEbsSnapshots }).(pulumi.BoolOutput) 508 } 509 510 // Region-unique name for the AMI. 511 func (o AmiFromInstanceOutput) Name() pulumi.StringOutput { 512 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 513 } 514 515 func (o AmiFromInstanceOutput) OwnerId() pulumi.StringOutput { 516 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput) 517 } 518 519 func (o AmiFromInstanceOutput) Platform() pulumi.StringOutput { 520 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.Platform }).(pulumi.StringOutput) 521 } 522 523 func (o AmiFromInstanceOutput) PlatformDetails() pulumi.StringOutput { 524 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.PlatformDetails }).(pulumi.StringOutput) 525 } 526 527 func (o AmiFromInstanceOutput) Public() pulumi.BoolOutput { 528 return o.ApplyT(func(v *AmiFromInstance) pulumi.BoolOutput { return v.Public }).(pulumi.BoolOutput) 529 } 530 531 // ID of an initrd image (ARI) that will be used when booting the 532 // created instances. 533 func (o AmiFromInstanceOutput) RamdiskId() pulumi.StringOutput { 534 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.RamdiskId }).(pulumi.StringOutput) 535 } 536 537 // Name of the root device (for example, `/dev/sda1`, or `/dev/xvda`). 538 func (o AmiFromInstanceOutput) RootDeviceName() pulumi.StringOutput { 539 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.RootDeviceName }).(pulumi.StringOutput) 540 } 541 542 func (o AmiFromInstanceOutput) RootSnapshotId() pulumi.StringOutput { 543 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.RootSnapshotId }).(pulumi.StringOutput) 544 } 545 546 // Boolean that overrides the behavior of stopping 547 // the instance before snapshotting. This is risky since it may cause a snapshot of an 548 // inconsistent filesystem state, but can be used to avoid downtime if the user otherwise 549 // guarantees that no filesystem writes will be underway at the time of snapshot. 550 func (o AmiFromInstanceOutput) SnapshotWithoutReboot() pulumi.BoolPtrOutput { 551 return o.ApplyT(func(v *AmiFromInstance) pulumi.BoolPtrOutput { return v.SnapshotWithoutReboot }).(pulumi.BoolPtrOutput) 552 } 553 554 // ID of the instance to use as the basis of the AMI. 555 func (o AmiFromInstanceOutput) SourceInstanceId() pulumi.StringOutput { 556 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.SourceInstanceId }).(pulumi.StringOutput) 557 } 558 559 // When set to "simple" (the default), enables enhanced networking 560 // for created instances. No other value is supported at this time. 561 func (o AmiFromInstanceOutput) SriovNetSupport() pulumi.StringOutput { 562 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.SriovNetSupport }).(pulumi.StringOutput) 563 } 564 565 // 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. 566 func (o AmiFromInstanceOutput) Tags() pulumi.StringMapOutput { 567 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 568 } 569 570 // Deprecated: Please use `tags` instead. 571 func (o AmiFromInstanceOutput) TagsAll() pulumi.StringMapOutput { 572 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 573 } 574 575 // If the image is configured for NitroTPM support, the value is `v2.0`. For more information, see [NitroTPM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) in the Amazon Elastic Compute Cloud User Guide. 576 func (o AmiFromInstanceOutput) TpmSupport() pulumi.StringOutput { 577 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.TpmSupport }).(pulumi.StringOutput) 578 } 579 580 func (o AmiFromInstanceOutput) UsageOperation() pulumi.StringOutput { 581 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.UsageOperation }).(pulumi.StringOutput) 582 } 583 584 // Keyword to choose what virtualization mode created instances 585 // will use. Can be either "paravirtual" (the default) or "hvm". The choice of virtualization type 586 // changes the set of further arguments that are required, as described below. 587 func (o AmiFromInstanceOutput) VirtualizationType() pulumi.StringOutput { 588 return o.ApplyT(func(v *AmiFromInstance) pulumi.StringOutput { return v.VirtualizationType }).(pulumi.StringOutput) 589 } 590 591 type AmiFromInstanceArrayOutput struct{ *pulumi.OutputState } 592 593 func (AmiFromInstanceArrayOutput) ElementType() reflect.Type { 594 return reflect.TypeOf((*[]*AmiFromInstance)(nil)).Elem() 595 } 596 597 func (o AmiFromInstanceArrayOutput) ToAmiFromInstanceArrayOutput() AmiFromInstanceArrayOutput { 598 return o 599 } 600 601 func (o AmiFromInstanceArrayOutput) ToAmiFromInstanceArrayOutputWithContext(ctx context.Context) AmiFromInstanceArrayOutput { 602 return o 603 } 604 605 func (o AmiFromInstanceArrayOutput) Index(i pulumi.IntInput) AmiFromInstanceOutput { 606 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AmiFromInstance { 607 return vs[0].([]*AmiFromInstance)[vs[1].(int)] 608 }).(AmiFromInstanceOutput) 609 } 610 611 type AmiFromInstanceMapOutput struct{ *pulumi.OutputState } 612 613 func (AmiFromInstanceMapOutput) ElementType() reflect.Type { 614 return reflect.TypeOf((*map[string]*AmiFromInstance)(nil)).Elem() 615 } 616 617 func (o AmiFromInstanceMapOutput) ToAmiFromInstanceMapOutput() AmiFromInstanceMapOutput { 618 return o 619 } 620 621 func (o AmiFromInstanceMapOutput) ToAmiFromInstanceMapOutputWithContext(ctx context.Context) AmiFromInstanceMapOutput { 622 return o 623 } 624 625 func (o AmiFromInstanceMapOutput) MapIndex(k pulumi.StringInput) AmiFromInstanceOutput { 626 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AmiFromInstance { 627 return vs[0].(map[string]*AmiFromInstance)[vs[1].(string)] 628 }).(AmiFromInstanceOutput) 629 } 630 631 func init() { 632 pulumi.RegisterInputType(reflect.TypeOf((*AmiFromInstanceInput)(nil)).Elem(), &AmiFromInstance{}) 633 pulumi.RegisterInputType(reflect.TypeOf((*AmiFromInstanceArrayInput)(nil)).Elem(), AmiFromInstanceArray{}) 634 pulumi.RegisterInputType(reflect.TypeOf((*AmiFromInstanceMapInput)(nil)).Elem(), AmiFromInstanceMap{}) 635 pulumi.RegisterOutputType(AmiFromInstanceOutput{}) 636 pulumi.RegisterOutputType(AmiFromInstanceArrayOutput{}) 637 pulumi.RegisterOutputType(AmiFromInstanceMapOutput{}) 638 }