Skip to content

EC2  >  Operations  >  get_allowed_images_settings

get_allowed_images_settings

Operation

get_allowed_images_settings async

get_allowed_images_settings(request: GetAllowedImagesSettingsInput | GetAllowedImagesSettingsInputDict, /, *, plugins: list[Plugin] | None = None) -> GetAllowedImagesSettingsOutput
get_allowed_images_settings(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetAllowedImagesSettingsInputDict]) -> GetAllowedImagesSettingsOutput

Gets the current state of the Allowed AMIs setting and the list of Allowed AMIs criteria at the account level in the specified Region.

Note

The Allowed AMIs feature does not restrict the AMIs owned by your account. Regardless of the criteria you set, the AMIs created by your account will always be discoverable and usable by users in your account.

For more information, see Control the discovery and use of AMIs in Amazon EC2 with Allowed AMIs in Amazon EC2 User Guide.

Parameters:

Name Type Description Default
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetAllowedImagesSettingsOutput

An instance of GetAllowedImagesSettingsOutput.

Input

Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.

Model

GetAllowedImagesSettingsInput dataclass

Bases: _SerdeShape

Dataclass for GetAllowedImagesSettingsInput structure.

Attributes
dry_run class-attribute instance-attribute
dry_run: bool | None = ...

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.

Dictionaries

GetAllowedImagesSettingsInputDict

Bases: TypedDict

Dictionary form of GetAllowedImagesSettingsInput.

Attributes
dry_run instance-attribute
dry_run: bool | None

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.

Output

GetAllowedImagesSettingsOutput dataclass

Bases: _SerdeShape

Dataclass for GetAllowedImagesSettingsOutput structure.

Attributes

image_criteria class-attribute instance-attribute
image_criteria: list[ImageCriterion] | None = ...

The list of criteria for images that are discoverable and usable in the account in the specified Amazon Web Services Region.

managed_by class-attribute instance-attribute
managed_by: str | None = ...

The entity that manages the Allowed AMIs settings. Possible values include:

  • account - The Allowed AMIs settings is managed by the account.

  • declarative-policy - The Allowed AMIs settings is managed by a declarative policy and can't be modified by the account.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

state class-attribute instance-attribute
state: str | None = ...

The current state of the Allowed AMIs setting at the account level in the specified Amazon Web Services Region.

Possible values:

  • disabled: All AMIs are allowed.

  • audit-mode: All AMIs are allowed, but the ImageAllowed field is set to true if the AMI would be allowed with the current list of criteria if allowed AMIs was enabled.

  • enabled: Only AMIs matching the image criteria are discoverable and available for use.