Class CfnPublicRepository
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.ecr.CfnPublicRepository
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggable,IPublicRepositoryRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-04T09:27:40.564Z")
@Stability(Stable)
public class CfnPublicRepository
extends CfnResource
implements IInspectable, IPublicRepositoryRef, ITaggable
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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnPublicRepository.static interfaceThe details about the repository that are publicly visible in the Amazon ECR Public Gallery.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.ecr.IPublicRepositoryRef
IPublicRepositoryRef.Jsii$Default, IPublicRepositoryRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnPublicRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnPublicRepository(software.amazon.jsii.JsiiObjectRef objRef) CfnPublicRepository(software.constructs.Construct scope, String id) CfnPublicRepository(software.constructs.Construct scope, String id, CfnPublicRepositoryProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IPublicRepositoryReffromPublicRepositoryArn(software.constructs.Construct scope, String id, String arn) Creates a new IPublicRepositoryRef from an ARN.static IPublicRepositoryReffromRepositoryName(software.constructs.Construct scope, String id, String repositoryName) Creates a new IPublicRepositoryRef from a repositoryName.Returns the Amazon Resource Name (ARN) for the specifiedAWS::ECR::PublicRepositoryresource.A reference to a PublicRepository resource.The details about the repository that are publicly visible in the Amazon ECR Public Gallery.The name to use for the public repository.The JSON repository policy text to apply to the public repository.getTags()Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetRepositoryCatalogData(Object value) The details about the repository that are publicly visible in the Amazon ECR Public Gallery.voidsetRepositoryName(String value) The name to use for the public repository.voidsetRepositoryPolicyText(Object value) The JSON repository policy text to apply to the public repository.voidsetTagsRaw(List<CfnTag> value) An array of key-value pairs to apply to this resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 software.constructs.Construct scope, @NotNull String id, @Nullable CfnPublicRepositoryProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties.
-
CfnPublicRepository
@Stability(Stable) public CfnPublicRepository(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
fromPublicRepositoryArn
@Stability(Stable) @NotNull public static IPublicRepositoryRef fromPublicRepositoryArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IPublicRepositoryRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromRepositoryName
@Stability(Stable) @NotNull public static IPublicRepositoryRef fromRepositoryName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String repositoryName) Creates a new IPublicRepositoryRef from a repositoryName.- Parameters:
scope- This parameter is required.id- This parameter is required.repositoryName- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
Returns the Amazon Resource Name (ARN) for the specifiedAWS::ECR::PublicRepositoryresource.For example,
arn:aws:ecr-public:: *123456789012* :repository/ *test-repository*. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getPublicRepositoryRef
A reference to a PublicRepository resource.- Specified by:
getPublicRepositoryRefin interfaceIPublicRepositoryRef
-
getTags
Tag Manager which manages the tags for this resource. -
getRepositoryCatalogData
The details about the repository that are publicly visible in the Amazon ECR Public Gallery. -
setRepositoryCatalogData
The details about the repository that are publicly visible in the Amazon ECR Public Gallery. -
getRepositoryName
The name to use for the public repository. -
setRepositoryName
The name to use for the public repository. -
getRepositoryPolicyText
The JSON repository policy text to apply to the public repository. -
setRepositoryPolicyText
The JSON repository policy text to apply to the public repository. -
getTagsRaw
An array of key-value pairs to apply to this resource. -
setTagsRaw
An array of key-value pairs to apply to this resource.
-