Class CfnRepository.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRepository>
- Enclosing class:
CfnRepository
CfnRepository
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static CfnRepository.Builder
encryptionConfiguration
(IResolvable encryptionConfiguration) The encryption configuration for the repository.encryptionConfiguration
(CfnRepository.EncryptionConfigurationProperty encryptionConfiguration) The encryption configuration for the repository.imageScanningConfiguration
(IResolvable imageScanningConfiguration) The image scanning configuration for the repository.imageScanningConfiguration
(CfnRepository.ImageScanningConfigurationProperty imageScanningConfiguration) The image scanning configuration for the repository.imageTagMutability
(String imageTagMutability) The tag mutability setting for the repository.lifecyclePolicy
(IResolvable lifecyclePolicy) Creates or updates a lifecycle policy.lifecyclePolicy
(CfnRepository.LifecyclePolicyProperty lifecyclePolicy) Creates or updates a lifecycle policy.repositoryName
(String repositoryName) The name to use for the repository.repositoryPolicyText
(Object repositoryPolicyText) The JSON repository policy text to apply to the repository.An array of key-value pairs to apply to this resource.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnRepository.Builder
.
-
encryptionConfiguration
@Stability(Stable) public CfnRepository.Builder encryptionConfiguration(IResolvable encryptionConfiguration) The encryption configuration for the repository.This determines how the contents of your repository are encrypted at rest.
- Parameters:
encryptionConfiguration
- The encryption configuration for the repository. This parameter is required.- Returns:
this
-
encryptionConfiguration
@Stability(Stable) public CfnRepository.Builder encryptionConfiguration(CfnRepository.EncryptionConfigurationProperty encryptionConfiguration) The encryption configuration for the repository.This determines how the contents of your repository are encrypted at rest.
- Parameters:
encryptionConfiguration
- The encryption configuration for the repository. This parameter is required.- Returns:
this
-
imageScanningConfiguration
@Stability(Stable) public CfnRepository.Builder imageScanningConfiguration(IResolvable imageScanningConfiguration) The image scanning configuration for the repository.This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- Parameters:
imageScanningConfiguration
- The image scanning configuration for the repository. This parameter is required.- Returns:
this
-
imageScanningConfiguration
@Stability(Stable) public CfnRepository.Builder imageScanningConfiguration(CfnRepository.ImageScanningConfigurationProperty imageScanningConfiguration) The image scanning configuration for the repository.This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- Parameters:
imageScanningConfiguration
- The image scanning configuration for the repository. This parameter is required.- Returns:
this
-
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. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.- Parameters:
imageTagMutability
- The tag mutability setting for the repository. This parameter is required.- Returns:
this
-
lifecyclePolicy
Creates or updates a lifecycle policy.For information about lifecycle policy syntax, see Lifecycle policy template .
- Parameters:
lifecyclePolicy
- Creates or updates a lifecycle policy. This parameter is required.- Returns:
this
-
lifecyclePolicy
@Stability(Stable) public CfnRepository.Builder lifecyclePolicy(CfnRepository.LifecyclePolicyProperty lifecyclePolicy) Creates or updates a lifecycle policy.For information about lifecycle policy syntax, see Lifecycle policy template .
- Parameters:
lifecyclePolicy
- Creates or updates a lifecycle policy. This parameter is required.- Returns:
this
-
repositoryName
The name to use for the repository.The repository name may be specified on its own (such as
nginx-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.
- Parameters:
repositoryName
- The name to use for the repository. This parameter is required.- Returns:
this
-
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 .
- Parameters:
repositoryPolicyText
- The JSON repository policy text to apply to the repository. This parameter is required.- Returns:
this
-
tags
An array of key-value pairs to apply to this resource.- Parameters:
tags
- An array of key-value pairs to apply to this resource. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRepository>
- Returns:
- a newly built instance of
CfnRepository
.
-