Amazon Elastic Compute Cloud

2022/11/04 - Amazon Elastic Compute Cloud - 1 new api methods

Changes  This release adds API support for the recipient of an AMI account share to remove shared AMI launch permissions.

CancelImageLaunchPermission (new) Link ΒΆ

Removes your Amazon Web Services account from the launch permissions for the specified AMI. For more information, see Cancel sharing an AMI with your Amazon Web Services account in the Amazon Elastic Compute Cloud User Guide.

See also: AWS API Documentation

Request Syntax

client.cancel_image_launch_permission(
    ImageId='string',
    DryRun=True|False
)
type ImageId:

string

param ImageId:

[REQUIRED]

The ID of the AMI that was shared with your Amazon Web Services account.

type DryRun:

boolean

param DryRun:

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

rtype:

dict

returns:

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.