Class CfnRepositoryProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecr.CfnRepositoryProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRepositoryProps>
- Enclosing interface:
CfnRepositoryProps
@Stability(Stable)
public static final class CfnRepositoryProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRepositoryProps>
A builder for
CfnRepositoryProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.emptyOnDelete
(Boolean emptyOnDelete) Sets the value ofCfnRepositoryProps.getEmptyOnDelete()
emptyOnDelete
(IResolvable emptyOnDelete) Sets the value ofCfnRepositoryProps.getEmptyOnDelete()
encryptionConfiguration
(IResolvable encryptionConfiguration) Sets the value ofCfnRepositoryProps.getEncryptionConfiguration()
encryptionConfiguration
(CfnRepository.EncryptionConfigurationProperty encryptionConfiguration) Sets the value ofCfnRepositoryProps.getEncryptionConfiguration()
imageScanningConfiguration
(IResolvable imageScanningConfiguration) Sets the value ofCfnRepositoryProps.getImageScanningConfiguration()
imageScanningConfiguration
(CfnRepository.ImageScanningConfigurationProperty imageScanningConfiguration) Sets the value ofCfnRepositoryProps.getImageScanningConfiguration()
imageTagMutability
(String imageTagMutability) Sets the value ofCfnRepositoryProps.getImageTagMutability()
lifecyclePolicy
(IResolvable lifecyclePolicy) Sets the value ofCfnRepositoryProps.getLifecyclePolicy()
lifecyclePolicy
(CfnRepository.LifecyclePolicyProperty lifecyclePolicy) Sets the value ofCfnRepositoryProps.getLifecyclePolicy()
repositoryName
(String repositoryName) Sets the value ofCfnRepositoryProps.getRepositoryName()
repositoryPolicyText
(Object repositoryPolicyText) Sets the value ofCfnRepositoryProps.getRepositoryPolicyText()
Sets the value ofCfnRepositoryProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
emptyOnDelete
Sets the value ofCfnRepositoryProps.getEmptyOnDelete()
- Parameters:
emptyOnDelete
- If true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it.- Returns:
this
-
emptyOnDelete
Sets the value ofCfnRepositoryProps.getEmptyOnDelete()
- Parameters:
emptyOnDelete
- If true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it.- Returns:
this
-
encryptionConfiguration
@Stability(Stable) public CfnRepositoryProps.Builder encryptionConfiguration(IResolvable encryptionConfiguration) Sets the value ofCfnRepositoryProps.getEncryptionConfiguration()
- Parameters:
encryptionConfiguration
- The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.- Returns:
this
-
encryptionConfiguration
@Stability(Stable) public CfnRepositoryProps.Builder encryptionConfiguration(CfnRepository.EncryptionConfigurationProperty encryptionConfiguration) Sets the value ofCfnRepositoryProps.getEncryptionConfiguration()
- Parameters:
encryptionConfiguration
- The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.- Returns:
this
-
imageScanningConfiguration
@Stability(Stable) public CfnRepositoryProps.Builder imageScanningConfiguration(IResolvable imageScanningConfiguration) Sets the value ofCfnRepositoryProps.getImageScanningConfiguration()
- Parameters:
imageScanningConfiguration
- The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.- Returns:
this
-
imageScanningConfiguration
@Stability(Stable) public CfnRepositoryProps.Builder imageScanningConfiguration(CfnRepository.ImageScanningConfigurationProperty imageScanningConfiguration) Sets the value ofCfnRepositoryProps.getImageScanningConfiguration()
- Parameters:
imageScanningConfiguration
- The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.- Returns:
this
-
imageTagMutability
Sets the value ofCfnRepositoryProps.getImageTagMutability()
- Parameters:
imageTagMutability
- The tag mutability setting for the repository. If this parameter is omitted, the default setting ofMUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.- Returns:
this
-
lifecyclePolicy
Sets the value ofCfnRepositoryProps.getLifecyclePolicy()
- Parameters:
lifecyclePolicy
- Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template .- Returns:
this
-
lifecyclePolicy
@Stability(Stable) public CfnRepositoryProps.Builder lifecyclePolicy(CfnRepository.LifecyclePolicyProperty lifecyclePolicy) Sets the value ofCfnRepositoryProps.getLifecyclePolicy()
- Parameters:
lifecyclePolicy
- Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template .- Returns:
this
-
repositoryName
Sets the value ofCfnRepositoryProps.getRepositoryName()
- Parameters:
repositoryName
- The name to use for the repository. The repository name may be specified on its own (such asnginx-web-app
) or it can be prepended with a namespace to group the repository into a category (such asproject-a/nginx-web-app
). If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the repository name. For more information, see Name type .The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes.
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
- Returns:
this
-
repositoryPolicyText
@Stability(Stable) public CfnRepositoryProps.Builder repositoryPolicyText(Object repositoryPolicyText) Sets the value ofCfnRepositoryProps.getRepositoryPolicyText()
- Parameters:
repositoryPolicyText
- The JSON repository policy text to apply to the repository. For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide .- Returns:
this
-
tags
Sets the value ofCfnRepositoryProps.getTags()
- Parameters:
tags
- An array of key-value pairs to apply to this resource.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRepositoryProps>
- Returns:
- a new instance of
CfnRepositoryProps
- Throws:
NullPointerException
- if any required attribute was not provided
-