Class CfnRepository.Builder

java.lang.Object
software.amazon.awscdk.services.ecr.CfnRepository.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRepository>
Enclosing class:
CfnRepository

@Stability(Stable) public static final class CfnRepository.Builder extends Object implements software.amazon.jsii.Builder<CfnRepository>
A fluent builder for CfnRepository.
  • Method Details

    • create

      @Stability(Stable) public static CfnRepository.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      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

      @Stability(Stable) public CfnRepository.Builder imageTagMutability(String 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.

      Parameters:
      imageTagMutability - The tag mutability setting for the repository. This parameter is required.
      Returns:
      this
    • lifecyclePolicy

      @Stability(Stable) public CfnRepository.Builder lifecyclePolicy(IResolvable 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

      @Stability(Stable) public CfnRepository.Builder repositoryName(String 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 as project-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

      @Stability(Stable) public CfnRepository.Builder repositoryPolicyText(Object 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

      @Stability(Stable) public CfnRepository.Builder tags(List<? extends CfnTag> 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

      @Stability(Stable) public CfnRepository build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnRepository>
      Returns:
      a newly built instance of CfnRepository.