Interface CreateLifecyclePolicyRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<CreateLifecyclePolicyRequest.Builder,,CreateLifecyclePolicyRequest> ImagebuilderRequest.Builder,SdkBuilder<CreateLifecyclePolicyRequest.Builder,,CreateLifecyclePolicyRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
CreateLifecyclePolicyRequest
-
Method Summary
Modifier and TypeMethodDescriptionclientToken(String clientToken) A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time.description(String description) Optional description for the lifecycle policy.Validates the required permissions and request parameters without performing the operation.executionRole(String executionRole) The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.The name of the lifecycle policy to create.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.policyDetails(Collection<LifecyclePolicyDetail> policyDetails) Configuration details for the lifecycle policy rules.policyDetails(Consumer<LifecyclePolicyDetail.Builder>... policyDetails) Configuration details for the lifecycle policy rules.policyDetails(LifecyclePolicyDetail... policyDetails) Configuration details for the lifecycle policy rules.resourceSelection(Consumer<LifecyclePolicyResourceSelection.Builder> resourceSelection) Selection criteria for the resources that the lifecycle policy applies to.resourceSelection(LifecyclePolicyResourceSelection resourceSelection) Selection criteria for the resources that the lifecycle policy applies to.resourceType(String resourceType) The type of Image Builder resource that the lifecycle policy applies to.resourceType(LifecyclePolicyResourceType resourceType) The type of Image Builder resource that the lifecycle policy applies to.Indicates whether the lifecycle policy resource is enabled.status(LifecyclePolicyStatus status) Indicates whether the lifecycle policy resource is enabled.Tags to apply to the lifecycle policy resource.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.services.imagebuilder.model.ImagebuilderRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
name
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.
- Parameters:
name- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
Optional description for the lifecycle policy.
- Parameters:
description- Optional description for the lifecycle policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
status
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.- Parameters:
status- Indicates whether the lifecycle policy resource is enabled. If you don't specify a status, it defaults toENABLED. Only enabled policies run on their schedule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
status
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.- Parameters:
status- Indicates whether the lifecycle policy resource is enabled. If you don't specify a status, it defaults toENABLED. Only enabled policies run on their schedule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
executionRole
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.
- Parameters:
executionRole- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
resourceType
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, andDISABLE, and policies for container-based Image Builder images support onlyDELETE. You can't change the resource type after creation.- Parameters:
resourceType- 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 supportDELETE,DEPRECATE, andDISABLE, and policies for container-based Image Builder images support onlyDELETE. You can't change the resource type after creation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
resourceType
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, andDISABLE, and policies for container-based Image Builder images support onlyDELETE. You can't change the resource type after creation.- Parameters:
resourceType- 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 supportDELETE,DEPRECATE, andDISABLE, and policies for container-based Image Builder images support onlyDELETE. You can't change the resource type after creation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
policyDetails
Configuration details for the lifecycle policy rules. A policy can contain at most one rule per action type: one
DELETE, oneDEPRECATE, and oneDISABLE.- Parameters:
policyDetails- Configuration details for the lifecycle policy rules. A policy can contain at most one rule per action type: oneDELETE, oneDEPRECATE, and oneDISABLE.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
policyDetails
Configuration details for the lifecycle policy rules. A policy can contain at most one rule per action type: one
DELETE, oneDEPRECATE, and oneDISABLE.- Parameters:
policyDetails- Configuration details for the lifecycle policy rules. A policy can contain at most one rule per action type: oneDELETE, oneDEPRECATE, and oneDISABLE.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
policyDetails
CreateLifecyclePolicyRequest.Builder policyDetails(Consumer<LifecyclePolicyDetail.Builder>... policyDetails) Configuration details for the lifecycle policy rules. A policy can contain at most one rule per action type: one
This is a convenience method that creates an instance of theDELETE, oneDEPRECATE, and oneDISABLE.LifecyclePolicyDetail.Builderavoiding the need to create one manually viaLifecyclePolicyDetail.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed topolicyDetails(List<LifecyclePolicyDetail>).- Parameters:
policyDetails- a consumer that will call methods onLifecyclePolicyDetail.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
resourceSelection
CreateLifecyclePolicyRequest.Builder resourceSelection(LifecyclePolicyResourceSelection resourceSelection) 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.
- Parameters:
resourceSelection- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
resourceSelection
default CreateLifecyclePolicyRequest.Builder resourceSelection(Consumer<LifecyclePolicyResourceSelection.Builder> resourceSelection) 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.
This is a convenience method that creates an instance of theLifecyclePolicyResourceSelection.Builderavoiding the need to create one manually viaLifecyclePolicyResourceSelection.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toresourceSelection(LifecyclePolicyResourceSelection).- Parameters:
resourceSelection- a consumer that will call methods onLifecyclePolicyResourceSelection.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
tags
Tags to apply to the lifecycle policy resource.
- Parameters:
tags- Tags to apply to the lifecycle policy resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dryRun
Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a
DryRunOperationExceptionerror response.- Parameters:
dryRun- Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns aDryRunOperationExceptionerror response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
CreateLifecyclePolicyRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateLifecyclePolicyRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-