Skip to content

Commit

Permalink
feat(client-ec2): Adds support for pagination in the EC2 DescribeImag…
Browse files Browse the repository at this point in the history
…es API.
  • Loading branch information
awstools committed Dec 20, 2022
1 parent b8881a0 commit a1e5ea8
Show file tree
Hide file tree
Showing 19 changed files with 495 additions and 369 deletions.
30 changes: 15 additions & 15 deletions clients/client-ec2/src/EC2.ts
Expand Up @@ -4428,7 +4428,7 @@ export class EC2 extends EC2Client {
/**
* <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/">Cancel having an AMI shared with your Amazon Web Services account</a>
* in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* in the <i>Amazon EC2 User Guide</i>.</p>
*/
public cancelImageLaunchPermission(
args: CancelImageLaunchPermissionCommandInput,
Expand Down Expand Up @@ -4683,9 +4683,9 @@ export class EC2 extends EC2Client {
* 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 Elastic Compute Cloud User Guide</i>.</p>
* 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 Elastic Compute Cloud User Guide</i>.</p>
* <i>Amazon EC2 User Guide</i>.</p>
*/
public copyImage(args: CopyImageCommandInput, options?: __HttpHandlerOptions): Promise<CopyImageCommandOutput>;
public copyImage(args: CopyImageCommandInput, cb: (err: any, data?: CopyImageCommandOutput) => void): void;
Expand Down Expand Up @@ -6337,9 +6337,9 @@ export class EC2 extends EC2Client {
* <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 Elastic Compute Cloud User Guide</i>.</p>
* <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 Elastic Compute Cloud User Guide</i>.</p>
* Amazon S3</a> in the <i>Amazon EC2 User Guide</i>.</p>
*/
public createRestoreImageTask(
args: CreateRestoreImageTaskCommandInput,
Expand Down Expand Up @@ -6634,9 +6634,9 @@ export class EC2 extends EC2Client {
/**
* <p>Stores an AMI as a single object in an Amazon S3 bucket.</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 Elastic Compute Cloud User Guide</i>.</p>
* <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 Elastic Compute Cloud User Guide</i>.</p>
* Amazon S3</a> in the <i>Amazon EC2 User Guide</i>.</p>
*/
public createStoreImageTask(
args: CreateStoreImageTaskCommandInput,
Expand Down Expand Up @@ -10336,7 +10336,7 @@ export class EC2 extends EC2Client {
* 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 Elastic Compute Cloud User Guide</i>.</p>
* 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>
Expand Down Expand Up @@ -14171,9 +14171,9 @@ export class EC2 extends EC2Client {
* <p>Tasks are listed in reverse chronological order. Currently, only tasks from the past 31
* days can be viewed.</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 Elastic Compute Cloud User Guide</i>.</p>
* <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 Elastic Compute Cloud User Guide</i>.</p>
* Amazon S3</a> in the <i>Amazon EC2 User Guide</i>.</p>
*/
public describeStoreImageTasks(
args: DescribeStoreImageTasksCommandInput,
Expand Down Expand Up @@ -15897,7 +15897,7 @@ export class EC2 extends EC2Client {
/**
* <p>Cancels the deprecation of the specified AMI.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html">Deprecate an AMI</a> in the
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <i>Amazon EC2 User Guide</i>.</p>
*/
public disableImageDeprecation(
args: DisableImageDeprecationCommandInput,
Expand Down Expand Up @@ -16760,7 +16760,7 @@ export class EC2 extends EC2Client {

/**
* <p>Enables deprecation of the specified AMI at the specified date and time.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html">Deprecate an AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html">Deprecate an AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
*/
public enableImageDeprecation(
args: EnableImageDeprecationCommandInput,
Expand Down Expand Up @@ -18831,7 +18831,7 @@ export class EC2 extends EC2Client {
/**
* <p>Lists one or more AMIs that are currently in the Recycle Bin. For more information,
* see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">Recycle
* Bin</a> in the Amazon Elastic Compute Cloud User Guide.</p>
* Bin</a> in the <i>Amazon EC2 User Guide</i>.</p>
*/
public listImagesInRecycleBin(
args: ListImagesInRecycleBinCommandInput,
Expand Down Expand Up @@ -21689,7 +21689,7 @@ export class EC2 extends EC2Client {
* billing product code. If you purchase a Reserved Instance without the matching billing product
* code, the Reserved Instance will not be applied to the On-Demand Instance. For information
* about how to obtain the platform details and billing information of an AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI
* billing information</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
*/
public registerImage(
args: RegisterImageCommandInput,
Expand Down Expand Up @@ -22745,7 +22745,7 @@ export class EC2 extends EC2Client {
}

/**
* <p>Restores an AMI from the Recycle Bin. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">Recycle Bin</a> in the Amazon Elastic Compute Cloud User Guide.</p>
* <p>Restores an AMI from the Recycle Bin. 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>
*/
public restoreImageFromRecycleBin(
args: RestoreImageFromRecycleBinCommandInput,
Expand Down
Expand Up @@ -31,7 +31,7 @@ export interface CancelImageLaunchPermissionCommandOutput extends CancelImageLau
/**
* <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/">Cancel having an AMI shared with your Amazon Web Services account</a>
* in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* 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
4 changes: 2 additions & 2 deletions clients/client-ec2/src/commands/CopyImageCommand.ts
Expand Up @@ -42,9 +42,9 @@ export interface CopyImageCommandOutput extends CopyImageResult, __MetadataBeare
* 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 Elastic Compute Cloud User Guide</i>.</p>
* 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 Elastic Compute Cloud User Guide</i>.</p>
* <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
Expand Up @@ -32,9 +32,9 @@ export interface CreateRestoreImageTaskCommandOutput extends CreateRestoreImageT
* <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 Elastic Compute Cloud User Guide</i>.</p>
* <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 Elastic Compute Cloud 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
Expand Up @@ -31,9 +31,9 @@ export interface CreateStoreImageTaskCommandOutput extends CreateStoreImageTaskR
/**
* <p>Stores an AMI as a single object in an Amazon S3 bucket.</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 Elastic Compute Cloud User Guide</i>.</p>
* <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 Elastic Compute Cloud 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
2 changes: 1 addition & 1 deletion clients/client-ec2/src/commands/DeregisterImageCommand.ts
Expand Up @@ -25,7 +25,7 @@ export interface DeregisterImageCommandOutput extends __MetadataBearer {}
* 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 Elastic Compute Cloud User Guide</i>.</p>
* 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>
Expand Down
Expand Up @@ -38,9 +38,9 @@ export interface DescribeStoreImageTasksCommandOutput extends DescribeStoreImage
* <p>Tasks are listed in reverse chronological order. Currently, only tasks from the past 31
* days can be viewed.</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 Elastic Compute Cloud User Guide</i>.</p>
* <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 Elastic Compute Cloud 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
Expand Up @@ -31,7 +31,7 @@ export interface DisableImageDeprecationCommandOutput extends DisableImageDeprec
/**
* <p>Cancels the deprecation of the specified AMI.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html">Deprecate an AMI</a> in the
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <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
Expand Up @@ -30,7 +30,7 @@ export interface EnableImageDeprecationCommandOutput extends EnableImageDeprecat

/**
* <p>Enables deprecation of the specified AMI at the specified date and time.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html">Deprecate an AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html">Deprecate an AMI</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
Expand Up @@ -31,7 +31,7 @@ export interface ListImagesInRecycleBinCommandOutput extends ListImagesInRecycle
/**
* <p>Lists one or more AMIs that are currently in the Recycle Bin. For more information,
* see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">Recycle
* Bin</a> in the Amazon Elastic Compute Cloud User Guide.</p>
* Bin</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
2 changes: 1 addition & 1 deletion clients/client-ec2/src/commands/RegisterImageCommand.ts
Expand Up @@ -74,7 +74,7 @@ export interface RegisterImageCommandOutput extends RegisterImageResult, __Metad
* billing product code. If you purchase a Reserved Instance without the matching billing product
* code, the Reserved Instance will not be applied to the On-Demand Instance. For information
* about how to obtain the platform details and billing information of an AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI
* billing information</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* billing information</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
Expand Up @@ -29,7 +29,7 @@ export interface RestoreImageFromRecycleBinCommandInput extends RestoreImageFrom
export interface RestoreImageFromRecycleBinCommandOutput extends RestoreImageFromRecycleBinResult, __MetadataBearer {}

/**
* <p>Restores an AMI from the Recycle Bin. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">Recycle Bin</a> in the Amazon Elastic Compute Cloud User Guide.</p>
* <p>Restores an AMI from the Recycle Bin. 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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
4 changes: 2 additions & 2 deletions clients/client-ec2/src/models/models_0.ts
Expand Up @@ -5357,7 +5357,7 @@ export interface CopyImageRequest {
* can encrypt a copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an
* encrypted snapshot. The default KMS key for Amazon EBS is used unless you specify a non-default
* Key Management Service (KMS) KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS encryption</a> in the
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <i>Amazon EC2 User Guide</i>.</p>
*/
Encrypted?: boolean;

Expand Down Expand Up @@ -5409,7 +5409,7 @@ export interface CopyImageRequest {
* AMI from an Outpost to a Region, from one Outpost to another, or within the same
* Outpost.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-amis"> Copy AMIs from an Amazon Web Services
* Region to an Outpost</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* Region to an Outpost</a> in the <i>Amazon EC2 User Guide</i>.</p>
*/
DestinationOutpostArn?: string;

Expand Down

0 comments on commit a1e5ea8

Please sign in to comment.