Class CfnRepositoryCreationTemplateProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecr.CfnRepositoryCreationTemplateProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRepositoryCreationTemplateProps>
- Enclosing interface:
CfnRepositoryCreationTemplateProps
@Stability(Stable)
public static final class CfnRepositoryCreationTemplateProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRepositoryCreationTemplateProps>
A builder for
CfnRepositoryCreationTemplateProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionappliedFor
(List<String> appliedFor) Sets the value ofCfnRepositoryCreationTemplateProps.getAppliedFor()
build()
Builds the configured instance.customRoleArn
(String customRoleArn) Sets the value ofCfnRepositoryCreationTemplateProps.getCustomRoleArn()
description
(String description) Sets the value ofCfnRepositoryCreationTemplateProps.getDescription()
encryptionConfiguration
(IResolvable encryptionConfiguration) Sets the value ofCfnRepositoryCreationTemplateProps.getEncryptionConfiguration()
encryptionConfiguration
(CfnRepositoryCreationTemplate.EncryptionConfigurationProperty encryptionConfiguration) Sets the value ofCfnRepositoryCreationTemplateProps.getEncryptionConfiguration()
imageTagMutability
(String imageTagMutability) Sets the value ofCfnRepositoryCreationTemplateProps.getImageTagMutability()
lifecyclePolicy
(String lifecyclePolicy) Sets the value ofCfnRepositoryCreationTemplateProps.getLifecyclePolicy()
Sets the value ofCfnRepositoryCreationTemplateProps.getPrefix()
repositoryPolicy
(String repositoryPolicy) Sets the value ofCfnRepositoryCreationTemplateProps.getRepositoryPolicy()
resourceTags
(List<? extends Object> resourceTags) Sets the value ofCfnRepositoryCreationTemplateProps.getResourceTags()
resourceTags
(IResolvable resourceTags) Sets the value ofCfnRepositoryCreationTemplateProps.getResourceTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
appliedFor
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder appliedFor(List<String> appliedFor) Sets the value ofCfnRepositoryCreationTemplateProps.getAppliedFor()
- Parameters:
appliedFor
- A list of enumerable Strings representing the repository creation scenarios that this template will apply towards. This parameter is required. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION- Returns:
this
-
prefix
Sets the value ofCfnRepositoryCreationTemplateProps.getPrefix()
- Parameters:
prefix
- The repository namespace prefix associated with the repository creation template. This parameter is required.- Returns:
this
-
customRoleArn
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder customRoleArn(String customRoleArn) Sets the value ofCfnRepositoryCreationTemplateProps.getCustomRoleArn()
- Parameters:
customRoleArn
- The ARN of the role to be assumed by Amazon ECR. Amazon ECR will assume your supplied role when the customRoleArn is specified. When this field isn't specified, Amazon ECR will use the service-linked role for the repository creation template.- Returns:
this
-
description
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder description(String description) Sets the value ofCfnRepositoryCreationTemplateProps.getDescription()
- Parameters:
description
- The description associated with the repository creation template.- Returns:
this
-
encryptionConfiguration
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder encryptionConfiguration(IResolvable encryptionConfiguration) Sets the value ofCfnRepositoryCreationTemplateProps.getEncryptionConfiguration()
- Parameters:
encryptionConfiguration
- The encryption configuration associated with the repository creation template.- Returns:
this
-
encryptionConfiguration
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder encryptionConfiguration(CfnRepositoryCreationTemplate.EncryptionConfigurationProperty encryptionConfiguration) Sets the value ofCfnRepositoryCreationTemplateProps.getEncryptionConfiguration()
- Parameters:
encryptionConfiguration
- The encryption configuration associated with the repository creation template.- Returns:
this
-
imageTagMutability
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder imageTagMutability(String imageTagMutability) Sets the value ofCfnRepositoryCreationTemplateProps.getImageTagMutability()
- Parameters:
imageTagMutability
- The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.- Returns:
this
-
lifecyclePolicy
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder lifecyclePolicy(String lifecyclePolicy) Sets the value ofCfnRepositoryCreationTemplateProps.getLifecyclePolicy()
- Parameters:
lifecyclePolicy
- The lifecycle policy to use for repositories created using the template.- Returns:
this
-
repositoryPolicy
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder repositoryPolicy(String repositoryPolicy) Sets the value ofCfnRepositoryCreationTemplateProps.getRepositoryPolicy()
- Parameters:
repositoryPolicy
- he repository policy to apply to repositories created using the template. A repository policy is a permissions policy associated with a repository to control access permissions.- Returns:
this
-
resourceTags
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder resourceTags(IResolvable resourceTags) Sets the value ofCfnRepositoryCreationTemplateProps.getResourceTags()
- Parameters:
resourceTags
- The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.- Returns:
this
-
resourceTags
@Stability(Stable) public CfnRepositoryCreationTemplateProps.Builder resourceTags(List<? extends Object> resourceTags) Sets the value ofCfnRepositoryCreationTemplateProps.getResourceTags()
- Parameters:
resourceTags
- The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRepositoryCreationTemplateProps>
- Returns:
- a new instance of
CfnRepositoryCreationTemplateProps
- Throws:
NullPointerException
- if any required attribute was not provided
-