CreateLifecyclePolicyRequest
¶
Source code in docs_src/capo_imagebuilder/types/create_lifecycle_policy_request.py
client_token
instance-attribute
¶
client_token: ClientToken
A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.
description
instance-attribute
¶
description: NotRequired[NonEmptyString]
Optional description for the lifecycle policy.
dry_run
instance-attribute
¶
dry_run: Boolean
Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.
execution_role
instance-attribute
¶
execution_role: RoleNameOrArn
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions. You must have permission to pass the role, and the role's trust policy must allow the Image Builder service principal to assume it.
name
instance-attribute
¶
name: ResourceName
The name of the lifecycle policy to create. Policy names must be unique to your account in each Amazon Web Services Region. Image Builder generates the policy ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name. You can't change the name after creation.
policy_details
instance-attribute
¶
policy_details: LifecyclePolicyDetails
Configuration details for the lifecycle policy rules. A policy can contain at most one rule per action type: one DELETE, one DEPRECATE, and one DISABLE.
resource_selection
instance-attribute
¶
resource_selection: LifecyclePolicyResourceSelection
Selection criteria for the resources that the lifecycle policy applies to. You must specify exactly one selection criteria: either recipes or a tag map, not both.
resource_type
instance-attribute
¶
resource_type: LifecyclePolicyResourceType
The type of Image Builder resource that the lifecycle policy applies to. The resource type determines the allowed rule actions: policies for AMI-based Image Builder images support DELETE, DEPRECATE, and DISABLE, and policies for container-based Image Builder images support only DELETE. You can't change the resource type after creation.
status
instance-attribute
¶
status: NotRequired[LifecyclePolicyStatus]
Indicates whether the lifecycle policy resource is enabled. If you don't specify a status, it defaults to ENABLED. Only enabled policies run on their schedule.