Class CfnPublicRepository

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:37.405Z") @Stability(Stable) public class CfnPublicRepository extends CfnResource implements IInspectable
A CloudFormation AWS::ECR::PublicRepository.

The AWS::ECR::PublicRepository resource specifies an Amazon Elastic Container Registry Public (Amazon ECR Public) repository, where users can push and pull Docker images, Open Container Initiative (OCI) images, and OCI compatible artifacts. For more information, see Amazon ECR public repositories in the Amazon ECR Public User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ecr.*;
 Object repositoryCatalogData;
 Object repositoryPolicyText;
 CfnPublicRepository cfnPublicRepository = CfnPublicRepository.Builder.create(this, "MyCfnPublicRepository")
         .repositoryCatalogData(repositoryCatalogData)
         .repositoryName("repositoryName")
         .repositoryPolicyText(repositoryPolicyText)
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnPublicRepository

      protected CfnPublicRepository(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnPublicRepository

      protected CfnPublicRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnPublicRepository

      @Stability(Stable) public CfnPublicRepository(@NotNull Construct scope, @NotNull String id, @Nullable CfnPublicRepositoryProps props)
      Create a new AWS::ECR::PublicRepository.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
    • CfnPublicRepository

      @Stability(Stable) public CfnPublicRepository(@NotNull Construct scope, @NotNull String id)
      Create a new AWS::ECR::PublicRepository.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      Returns the Amazon Resource Name (ARN) for the specified AWS::ECR::PublicRepository resource.

      For example, arn:aws:ecr-public:: *123456789012* :repository/ *test-repository* .

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      An array of key-value pairs to apply to this resource.
    • getRepositoryCatalogData

      @Stability(Stable) @NotNull public Object getRepositoryCatalogData()
      The details about the repository that are publicly visible in the Amazon ECR Public Gallery.

      For more information, see Amazon ECR Public repository catalog data in the Amazon ECR Public User Guide .

    • setRepositoryCatalogData

      @Stability(Stable) public void setRepositoryCatalogData(@NotNull Object value)
      The details about the repository that are publicly visible in the Amazon ECR Public Gallery.

      For more information, see Amazon ECR Public repository catalog data in the Amazon ECR Public User Guide .

    • getRepositoryPolicyText

      @Stability(Stable) @NotNull public Object getRepositoryPolicyText()
      The JSON repository policy text to apply to the public repository.

      For more information, see Amazon ECR Public repository policies in the Amazon ECR Public User Guide .

    • setRepositoryPolicyText

      @Stability(Stable) public void setRepositoryPolicyText(@NotNull Object value)
      The JSON repository policy text to apply to the public repository.

      For more information, see Amazon ECR Public repository policies in the Amazon ECR Public User Guide .

    • getRepositoryName

      @Stability(Stable) @Nullable public String getRepositoryName()
      The name to use for the public 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 .

      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.

    • setRepositoryName

      @Stability(Stable) public void setRepositoryName(@Nullable String value)
      The name to use for the public 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 .

      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.