Create Lifecycle Policy
imagebuilder_create_lifecycle_policy | R Documentation |
Create a lifecycle policy resource¶
Description¶
Create a lifecycle policy resource.
Usage¶
imagebuilder_create_lifecycle_policy(name, description, status,
executionRole, resourceType, policyDetails, resourceSelection, tags,
clientToken)
Arguments¶
name
[required] The name of the lifecycle policy to create.
description
Optional description for the lifecycle policy.
status
Indicates whether the lifecycle policy resource is enabled.
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 Builder resource that the lifecycle policy applies to.
policyDetails
[required] Configuration details for the lifecycle policy rules.
resourceSelection
[required] Selection criteria for the resources that the lifecycle policy applies to.
tags
Tags to apply to the lifecycle policy resource.
clientToken
[required] Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.
Value¶
A list with the following syntax:
Request syntax¶
svc$create_lifecycle_policy(
name = "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"
)
),
tags = list(
"string"
),
clientToken = "string"
)