Class RepositoryProps.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • autoDeleteImages

      @Stability(Deprecated) @Deprecated public RepositoryProps.Builder autoDeleteImages(Boolean autoDeleteImages)
      Deprecated.
      Use `emptyOnDelete` instead.
      Parameters:
      autoDeleteImages - Whether all images should be automatically deleted when the repository is removed from the stack or when the stack is deleted. Requires the removalPolicy to be set to RemovalPolicy.DESTROY.
      Returns:
      this
    • emptyOnDelete

      @Stability(Stable) public RepositoryProps.Builder emptyOnDelete(Boolean emptyOnDelete)
      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
    • encryption

      @Stability(Stable) public RepositoryProps.Builder encryption(RepositoryEncryption encryption)
      Parameters:
      encryption - The kind of server-side encryption to apply to this repository. If you choose KMS, you can specify a KMS key via encryptionKey. If encryptionKey is not specified, an AWS managed KMS key is used.
      Returns:
      this
    • encryptionKey

      @Stability(Stable) public RepositoryProps.Builder encryptionKey(IKey encryptionKey)
      Parameters:
      encryptionKey - External KMS key to use for repository encryption. The 'encryption' property must be either not specified or set to "KMS". An error will be emitted if encryption is set to "AES256".
      Returns:
      this
    • imageScanOnPush

      @Stability(Stable) public RepositoryProps.Builder imageScanOnPush(Boolean imageScanOnPush)
      Parameters:
      imageScanOnPush - Enable the scan on push when creating the repository.
      Returns:
      this
    • imageTagMutability

      @Stability(Stable) public RepositoryProps.Builder imageTagMutability(TagMutability imageTagMutability)
      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.
      Returns:
      this
    • lifecycleRegistryId

      @Stability(Stable) public RepositoryProps.Builder lifecycleRegistryId(String lifecycleRegistryId)
      Parameters:
      lifecycleRegistryId - The AWS account ID associated with the registry that contains the repository.
      Returns:
      this
    • lifecycleRules

      @Stability(Stable) public RepositoryProps.Builder lifecycleRules(List<? extends LifecycleRule> lifecycleRules)
      Parameters:
      lifecycleRules - Life cycle rules to apply to this registry.
      Returns:
      this
    • removalPolicy

      @Stability(Stable) public RepositoryProps.Builder removalPolicy(RemovalPolicy removalPolicy)
      Parameters:
      removalPolicy - Determine what happens to the repository when the resource/stack is deleted.
      Returns:
      this
    • repositoryName

      @Stability(Stable) public RepositoryProps.Builder repositoryName(String repositoryName)
      Parameters:
      repositoryName - Name for this repository. 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
    • build

      @Stability(Stable) public RepositoryProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<RepositoryProps>
      Returns:
      a new instance of RepositoryProps
      Throws:
      NullPointerException - if any required attribute was not provided