Skip to content

Commit

Permalink
feat(client-ec2): This release adds an optional parameter to Register…
Browse files Browse the repository at this point in the history
…Image and CopyImage APIs to support tagging AMIs at the time of creation.
  • Loading branch information
awstools committed Mar 7, 2024
1 parent c7a2f3f commit b6f2e1d
Show file tree
Hide file tree
Showing 29 changed files with 521 additions and 373 deletions.
6 changes: 4 additions & 2 deletions clients/client-ec2/src/commands/BundleInstanceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ export interface BundleInstanceCommandOutput extends BundleInstanceResult, __Met
/**
* @public
* <p>Bundles an Amazon instance store-backed Windows instance.</p>
* <p>During bundling, only the root device volume (C:\) is bundled. Data on other instance store volumes is not preserved.</p>
* <p>During bundling, only the root device volume (C:\) is bundled. Data on other instance
* store volumes is not preserved.</p>
* <note>
* <p>This action is not applicable for Linux/Unix instances or Windows instances that are backed by Amazon EBS.</p>
* <p>This action is not applicable for Linux/Unix instances or Windows instances that are
* backed by Amazon EBS.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ export interface CancelImageLaunchPermissionCommandOutput extends CancelImageLau

/**
* @public
* <p>Removes your Amazon Web Services account from the launch permissions for the specified AMI. For more
* information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cancel-sharing-an-AMI.html">
* Cancel having an AMI shared with your Amazon Web Services account</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* <p>Removes your Amazon Web Services account from the launch permissions for the specified AMI.
* For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cancel-sharing-an-AMI.html"> Cancel having an AMI shared with
* your Amazon Web Services account</a> in the <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
40 changes: 24 additions & 16 deletions clients/client-ec2/src/commands/CopyImageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,19 @@ export interface CopyImageCommandOutput extends CopyImageResult, __MetadataBeare
/**
* @public
* <p>Initiates the copy of an AMI. You can copy an AMI from one Region to another, or from a
* Region to an Outpost. You can't copy an AMI from an Outpost to a Region, from one Outpost
* to another, or within the same Outpost. To copy an AMI to another partition, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html">CreateStoreImageTask</a>.</p>
* <p>To copy an AMI from one Region to another, specify the source Region using the
* <b>SourceRegion</b> parameter, and specify the
* destination Region using its endpoint. Copies of encrypted backing snapshots for
* the AMI are encrypted. Copies of unencrypted backing snapshots remain unencrypted,
* unless you set <code>Encrypted</code> during the copy operation. You cannot
* create an unencrypted copy of an encrypted backing snapshot.</p>
* <p>To copy an AMI from a Region to an Outpost, specify the source Region using the
* <b>SourceRegion</b> parameter, and specify the
* ARN of the destination Outpost using <b>DestinationOutpostArn</b>.
* Backing snapshots copied to an Outpost are encrypted by default using the default
* encryption key for the Region, or a different key that you specify in the request using
* <b>KmsKeyId</b>. Outposts do not support unencrypted
* snapshots. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami">
* Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EC2 User Guide</i>.</p>
* Region to an Outpost. You can't copy an AMI from an Outpost to a Region, from one Outpost to
* another, or within the same Outpost. To copy an AMI to another partition, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html">CreateStoreImageTask</a>.</p>
* <p>To copy an AMI from one Region to another, specify the source Region using the <b>SourceRegion</b> parameter, and specify the destination Region using its
* endpoint. Copies of encrypted backing snapshots for the AMI are encrypted. Copies of
* unencrypted backing snapshots remain unencrypted, unless you set <code>Encrypted</code> during
* the copy operation. You cannot create an unencrypted copy of an encrypted backing
* snapshot.</p>
* <p>To copy an AMI from a Region to an Outpost, specify the source Region using the <b>SourceRegion</b> parameter, and specify the ARN of the destination
* Outpost using <b>DestinationOutpostArn</b>. Backing snapshots copied
* to an Outpost are encrypted by default using the default encryption key for the Region, or a
* different key that you specify in the request using <b>KmsKeyId</b>.
* Outposts do not support unencrypted snapshots. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami"> Amazon EBS local
* snapshots on Outposts</a> in the <i>Amazon EC2 User Guide</i>.</p>
* <p>For more information about the prerequisites and limits when copying an AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html">Copy an AMI</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* @example
Expand All @@ -64,6 +61,17 @@ export interface CopyImageCommandOutput extends CopyImageResult, __MetadataBeare
* DestinationOutpostArn: "STRING_VALUE",
* DryRun: true || false,
* CopyImageTags: true || false,
* TagSpecifications: [ // TagSpecificationList
* { // TagSpecification
* ResourceType: "capacity-reservation" || "client-vpn-endpoint" || "customer-gateway" || "carrier-gateway" || "coip-pool" || "dedicated-host" || "dhcp-options" || "egress-only-internet-gateway" || "elastic-ip" || "elastic-gpu" || "export-image-task" || "export-instance-task" || "fleet" || "fpga-image" || "host-reservation" || "image" || "import-image-task" || "import-snapshot-task" || "instance" || "instance-event-window" || "internet-gateway" || "ipam" || "ipam-pool" || "ipam-scope" || "ipv4pool-ec2" || "ipv6pool-ec2" || "key-pair" || "launch-template" || "local-gateway" || "local-gateway-route-table" || "local-gateway-virtual-interface" || "local-gateway-virtual-interface-group" || "local-gateway-route-table-vpc-association" || "local-gateway-route-table-virtual-interface-group-association" || "natgateway" || "network-acl" || "network-interface" || "network-insights-analysis" || "network-insights-path" || "network-insights-access-scope" || "network-insights-access-scope-analysis" || "placement-group" || "prefix-list" || "replace-root-volume-task" || "reserved-instances" || "route-table" || "security-group" || "security-group-rule" || "snapshot" || "spot-fleet-request" || "spot-instances-request" || "subnet" || "subnet-cidr-reservation" || "traffic-mirror-filter" || "traffic-mirror-session" || "traffic-mirror-target" || "transit-gateway" || "transit-gateway-attachment" || "transit-gateway-connect-peer" || "transit-gateway-multicast-domain" || "transit-gateway-policy-table" || "transit-gateway-route-table" || "transit-gateway-route-table-announcement" || "volume" || "vpc" || "vpc-endpoint" || "vpc-endpoint-connection" || "vpc-endpoint-service" || "vpc-endpoint-service-permission" || "vpc-peering-connection" || "vpn-connection" || "vpn-gateway" || "vpc-flow-log" || "capacity-reservation-fleet" || "traffic-mirror-filter-rule" || "vpc-endpoint-connection-device-type" || "verified-access-instance" || "verified-access-group" || "verified-access-endpoint" || "verified-access-policy" || "verified-access-trust-provider" || "vpn-connection-device-type" || "vpc-block-public-access-exclusion" || "ipam-resource-discovery" || "ipam-resource-discovery-association" || "instance-connect-endpoint",
* Tags: [ // TagList
* { // Tag
* Key: "STRING_VALUE",
* Value: "STRING_VALUE",
* },
* ],
* },
* ],
* };
* const command = new CopyImageCommand(input);
* const response = await client.send(command);
Expand Down
11 changes: 6 additions & 5 deletions clients/client-ec2/src/commands/CreateImageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ export interface CreateImageCommandOutput extends CreateImageResult, __MetadataB

/**
* @public
* <p>Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance
* that is either running or stopped.</p>
* <p>If you customized your instance with instance store volumes or Amazon EBS volumes in addition to the root device volume, the
* new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI,
* the instance automatically launches with those additional volumes.</p>
* <p>Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or
* stopped.</p>
* <p>If you customized your instance with instance store volumes or Amazon EBS volumes in addition
* to the root device volume, the new AMI contains block device mapping information for those
* volumes. When you launch an instance from this new AMI, the instance automatically launches
* with those additional volumes.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Create an Amazon EBS-backed Linux
* AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export interface CreateRestoreImageTaskCommandOutput extends CreateRestoreImageT

/**
* @public
* <p>Starts a task that restores an AMI from an Amazon S3 object that was previously created by using
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html">CreateStoreImageTask</a>.</p>
* <p>Starts a task that restores an AMI from an Amazon S3 object that was previously created by
* using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html">CreateStoreImageTask</a>.</p>
* <p>To use this API, you must have the required permissions. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions">Permissions for storing and restoring AMIs using Amazon S3</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html">Store and restore an AMI using
* Amazon S3</a> in the <i>Amazon EC2 User Guide</i>.</p>
* Amazon S3</a> in the <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface CreateStoreImageTaskCommandOutput extends CreateStoreImageTaskR
* <p>To use this API, you must have the required permissions. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions">Permissions for storing and restoring AMIs using Amazon S3</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html">Store and restore an AMI using
* Amazon S3</a> in the <i>Amazon EC2 User Guide</i>.</p>
* Amazon S3</a> in the <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
22 changes: 11 additions & 11 deletions clients/client-ec2/src/commands/DeregisterImageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ export interface DeregisterImageCommandOutput extends __MetadataBearer {}

/**
* @public
* <p>Deregisters the specified AMI. After you deregister an AMI, it can't be used to
* launch new instances.</p>
* <p>If you deregister an AMI that matches a Recycle Bin retention rule, the AMI is retained
* in the Recycle Bin for the specified retention period. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">Recycle Bin</a> in
* <p>Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new
* instances.</p>
* <p>If you deregister an AMI that matches a Recycle Bin retention rule, the AMI is retained in
* the Recycle Bin for the specified retention period. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">Recycle Bin</a> in
* the <i>Amazon EC2 User Guide</i>.</p>
* <p>When you deregister an AMI, it doesn't affect any instances that you've already
* launched from the AMI. You'll continue to incur usage costs for those instances until
* you terminate them.</p>
* <p>When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was
* created for the root volume of the instance during the AMI creation process. When you
* deregister an instance store-backed AMI, it doesn't affect the files that you uploaded
* to Amazon S3 when you created the AMI.</p>
* <p>When you deregister an AMI, it doesn't affect any instances that you've already launched
* from the AMI. You'll continue to incur usage costs for those instances until you terminate
* them.</p>
* <p>When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created
* for the root volume of the instance during the AMI creation process. When you deregister an
* instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you
* created the AMI.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ export interface DescribeBundleTasksCommandOutput extends DescribeBundleTasksRes
* @public
* <p>Describes the specified bundle tasks or all of your bundle tasks.</p>
* <note>
* <p>Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use <code>RegisterImage</code> with the Amazon S3 bucket name and image manifest name you provided to the bundle task.</p>
* <p>Completed bundle tasks are listed for only a limited time. If your bundle task is no
* longer in the list, you can still register an AMI from it. Just use
* <code>RegisterImage</code> with the Amazon S3 bucket name and image manifest name you provided
* to the bundle task.</p>
* </note>
* <note>
* <p>The order of the elements in the response, including those within nested structures,
* might vary. Applications should not assume the elements appear in a particular order.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ export interface DescribeImageAttributeCommandOutput extends ImageAttribute, __M

/**
* @public
* <p>Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.</p>
* <p>Describes the specified attribute of the specified AMI. You can specify only one attribute
* at a time.</p>
* <note>
* <p>The order of the elements in the response, including those within nested structures,
* might vary. Applications should not assume the elements appear in a particular order.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
12 changes: 9 additions & 3 deletions clients/client-ec2/src/commands/DescribeImagesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,19 @@ export interface DescribeImagesCommandOutput extends DescribeImagesResult, __Met

/**
* @public
* <p>Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the images available to you.</p>
* <p>The images available to you include public images, private images that you own, and private images owned by other
* Amazon Web Services accounts for which you have explicit launch permissions.</p>
* <p>Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the
* images available to you.</p>
* <p>The images available to you include public images, private images that you own, and
* private images owned by other Amazon Web Services accounts for which you have explicit launch
* permissions.</p>
* <p>Recently deregistered images appear in the returned results for a short interval and then
* return empty results. After all instances that reference a deregistered AMI are terminated,
* specifying the ID of the image will eventually return an error indicating that the AMI ID
* cannot be found.</p>
* <note>
* <p>The order of the elements in the response, including those within nested structures,
* might vary. Applications should not assume the elements appear in a particular order.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface DescribeStoreImageTasksCommandOutput extends DescribeStoreImage
* <p>To use this API, you must have the required permissions. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions">Permissions for storing and restoring AMIs using Amazon S3</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html">Store and restore an AMI using
* Amazon S3</a> in the <i>Amazon EC2 User Guide</i>.</p>
* Amazon S3</a> in the <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
10 changes: 6 additions & 4 deletions clients/client-ec2/src/commands/DisableFastLaunchCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ export interface DisableFastLaunchCommandOutput extends DisableFastLaunchResult,

/**
* @public
* <p>Discontinue Windows fast launch for a Windows AMI, and clean up existing pre-provisioned snapshots.
* After you disable Windows fast launch, the AMI uses the standard launch process for each
* new instance. Amazon EC2 must remove all pre-provisioned snapshots before you can enable Windows fast launch again.</p>
* <p>Discontinue Windows fast launch for a Windows AMI, and clean up existing pre-provisioned
* snapshots. After you disable Windows fast launch, the AMI uses the standard launch process for
* each new instance. Amazon EC2 must remove all pre-provisioned snapshots before you can enable
* Windows fast launch again.</p>
* <note>
* <p>You can only change these settings for Windows AMIs that you own or that have been shared with you.</p>
* <p>You can only change these settings for Windows AMIs that you own or that have been
* shared with you.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export interface DisableImageBlockPublicAccessCommandOutput
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetImageBlockPublicAccessState.html">GetImageBlockPublicAccessState</a>, the response will be
* <code>block-new-sharing</code>. When the API has completed the configuration, the response
* will be <code>unblocked</code>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis">Block public access to your AMIs</a> in
* the <i>Amazon EC2 User Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis">Block
* public access to your AMIs</a> in the <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Loading

0 comments on commit b6f2e1d

Please sign in to comment.