Class CfnRepository
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.CfnRepository
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-04T00:39:31.454Z")
@Stability(Stable)
public class CfnRepository
extends CfnResource
implements IInspectable, ITaggable
The
AWS::ECR::Repository
resource specifies an Amazon Elastic Container Registry (Amazon ECR) repository, where users can push and pull Docker images, Open Container Initiative (OCI) images, and OCI compatible artifacts.
For more information, see Amazon ECR private repositories in the Amazon ECR 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 repositoryPolicyText; CfnRepository cfnRepository = CfnRepository.Builder.create(this, "MyCfnRepository") .emptyOnDelete(false) .encryptionConfiguration(EncryptionConfigurationProperty.builder() .encryptionType("encryptionType") // the properties below are optional .kmsKey("kmsKey") .build()) .imageScanningConfiguration(ImageScanningConfigurationProperty.builder() .scanOnPush(false) .build()) .imageTagMutability("imageTagMutability") .lifecyclePolicy(LifecyclePolicyProperty.builder() .lifecyclePolicyText("lifecyclePolicyText") .registryId("registryId") .build()) .repositoryName("repositoryName") .repositoryPolicyText(repositoryPolicyText) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnRepository
.static interface
The encryption configuration for the repository.static interface
The image scanning configuration for a repository.static interface
TheLifecyclePolicy
property type specifies a lifecycle policy.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnRepository
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnRepository
(software.amazon.jsii.JsiiObjectRef objRef) CfnRepository
(software.constructs.Construct scope, String id) CfnRepository
(software.constructs.Construct scope, String id, CfnRepositoryProps props) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Amazon Resource Name (ARN) for the specifiedAWS::ECR::Repository
resource.Returns the URI for the specifiedAWS::ECR::Repository
resource.If true, deleting the repository force deletes the contents of the repository.The encryption configuration for the repository.The image scanning configuration for the repository.The tag mutability setting for the repository.Creates or updates a lifecycle policy.The name to use for the repository.The JSON repository policy text to apply to the repository.getTags()
Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setEmptyOnDelete
(Boolean value) If true, deleting the repository force deletes the contents of the repository.void
setEmptyOnDelete
(IResolvable value) If true, deleting the repository force deletes the contents of the repository.void
The encryption configuration for the repository.void
The encryption configuration for the repository.void
The image scanning configuration for the repository.void
The image scanning configuration for the repository.void
setImageTagMutability
(String value) The tag mutability setting for the repository.void
setLifecyclePolicy
(IResolvable value) Creates or updates a lifecycle policy.void
Creates or updates a lifecycle policy.void
setRepositoryName
(String value) The name to use for the repository.void
setRepositoryPolicyText
(Object value) The JSON repository policy text to apply to the repository.void
setTagsRaw
(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, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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
-
CfnRepository
protected CfnRepository(software.amazon.jsii.JsiiObjectRef objRef) -
CfnRepository
protected CfnRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnRepository
@Stability(Stable) public CfnRepository(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnRepositoryProps 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.
-
CfnRepository
@Stability(Stable) public CfnRepository(@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
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
Returns the Amazon Resource Name (ARN) for the specifiedAWS::ECR::Repository
resource.For example,
arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*
. -
getAttrRepositoryUri
Returns the URI for the specifiedAWS::ECR::Repository
resource.For example,
*123456789012* .dkr.ecr. *us-west-2* .amazonaws.com/repository
. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getEmptyOnDelete
If true, deleting the repository force deletes the contents of the repository. -
setEmptyOnDelete
If true, deleting the repository force deletes the contents of the repository. -
setEmptyOnDelete
If true, deleting the repository force deletes the contents of the repository. -
getEncryptionConfiguration
The encryption configuration for the repository. -
setEncryptionConfiguration
The encryption configuration for the repository. -
setEncryptionConfiguration
@Stability(Stable) public void setEncryptionConfiguration(@Nullable CfnRepository.EncryptionConfigurationProperty value) The encryption configuration for the repository. -
getImageScanningConfiguration
The image scanning configuration for the repository. -
setImageScanningConfiguration
The image scanning configuration for the repository. -
setImageScanningConfiguration
@Stability(Stable) public void setImageScanningConfiguration(@Nullable CfnRepository.ImageScanningConfigurationProperty value) The image scanning configuration for the repository. -
getImageTagMutability
The tag mutability setting for the repository. -
setImageTagMutability
The tag mutability setting for the repository. -
getLifecyclePolicy
Creates or updates a lifecycle policy. -
setLifecyclePolicy
Creates or updates a lifecycle policy. -
setLifecyclePolicy
@Stability(Stable) public void setLifecyclePolicy(@Nullable CfnRepository.LifecyclePolicyProperty value) Creates or updates a lifecycle policy. -
getRepositoryName
The name to use for the repository. -
setRepositoryName
The name to use for the repository. -
getRepositoryPolicyText
The JSON repository policy text to apply to the repository. -
setRepositoryPolicyText
The JSON repository policy text to apply to the 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.
-