Updates the specified lifecycle policy¶
Description¶
Updates the specified lifecycle policy. The request replaces the existing policy configuration rather than merging changes, so re-specify every setting that you want to keep. The resourceType must match the existing policy's value.
Usage¶
imagebuilder_update_lifecycle_policy(lifecyclePolicyArn, description,
status, executionRole, resourceType, policyDetails, resourceSelection,
clientToken)
Arguments¶
-
lifecyclePolicyArn[required] The Amazon Resource Name (ARN) of the lifecycle policy resource.
-
descriptionOptional description for the lifecycle policy. Because the update replaces the entire configuration, omitting this property removes any existing description.
-
statusIndicates whether the lifecycle policy resource is enabled. Defaults to
ENABLEDwhen omitted, so updating a disabled policy without setting this property re-enables it. -
executionRole[required] The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.
-
resourceType[required] The type of image resource that the lifecycle policy applies to. The value must match the policy's existing resource type. You can't change the resource type of an existing lifecycle policy.
-
policyDetails[required] The configuration details for a lifecycle policy resource.
-
resourceSelection[required] Selection criteria for resources that the lifecycle policy applies to. You must specify exactly one selection criteria: either recipes or a tag map, not both.
-
clientToken[required] 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.
Value¶
A list with the following syntax:
Request syntax¶
svc$update_lifecycle_policy(
lifecyclePolicyArn = "string",
description = "string",
status = "DISABLED"|"ENABLED",
executionRole = "string",
resourceType = "AMI_IMAGE"|"CONTAINER_IMAGE",
policyDetails = list(
list(
action = list(
type = "DELETE"|"DEPRECATE"|"DISABLE",
includeResources = list(
amis = TRUE|FALSE,
snapshots = TRUE|FALSE,
containers = TRUE|FALSE
)
),
filter = list(
type = "AGE"|"COUNT",
value = 123,
unit = "DAYS"|"WEEKS"|"MONTHS"|"YEARS",
retainAtLeast = 123
),
exclusionRules = list(
tagMap = list(
"string"
),
amis = list(
isPublic = TRUE|FALSE,
regions = list(
"string"
),
sharedAccounts = list(
"string"
),
lastLaunched = list(
value = 123,
unit = "DAYS"|"WEEKS"|"MONTHS"|"YEARS"
),
tagMap = list(
"string"
)
)
)
)
),
resourceSelection = list(
recipes = list(
list(
name = "string",
semanticVersion = "string"
)
),
tagMap = list(
"string"
)
),
clientToken = "string"
)