Skip to content

replace_image_criteria_in_allowed_images_settings

Operation

replace_image_criteria_in_allowed_images_settings

Sets or replaces the criteria for Allowed AMIs.

The ImageCriteria can include up to:

  • 10 ImageCriterion
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
request ReplaceImageCriteriaInAllowedImagesSettingsInput | ReplaceImageCriteriaInAllowedImagesSettingsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[ReplaceImageCriteriaInAllowedImagesSettingsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ReplaceImageCriteriaInAllowedImagesSettingsOutput

An instance of ReplaceImageCriteriaInAllowedImagesSettingsOutput.

replace_image_criteria_in_allowed_images_settings async

Sets or replaces the criteria for Allowed AMIs.

The ImageCriteria can include up to:

  • 10 ImageCriterion
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
request ReplaceImageCriteriaInAllowedImagesSettingsInput | ReplaceImageCriteriaInAllowedImagesSettingsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[ReplaceImageCriteriaInAllowedImagesSettingsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ReplaceImageCriteriaInAllowedImagesSettingsOutput

An instance of ReplaceImageCriteriaInAllowedImagesSettingsOutput.

Input

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

ReplaceImageCriteriaInAllowedImagesSettingsInputDict

Bases: TypedDict

Dictionary form of ReplaceImageCriteriaInAllowedImagesSettingsInput.

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.

image_criteria instance-attribute

The list of criteria that are evaluated to determine whether AMIs are discoverable and usable in the account in the specified Amazon Web Services Region.

ReplaceImageCriteriaInAllowedImagesSettingsInput dataclass

Bases: _SerdeShape

Dataclass for ReplaceImageCriteriaInAllowedImagesSettingsInput 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.

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

The list of criteria that are evaluated to determine whether AMIs are discoverable and usable in the account in the specified Amazon Web Services Region.

Output

ReplaceImageCriteriaInAllowedImagesSettingsOutput dataclass

Bases: _SerdeShape

Dataclass for ReplaceImageCriteriaInAllowedImagesSettingsOutput structure.

Attributes

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.

return_value class-attribute instance-attribute
return_value: bool | None = ...

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