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.104.0 (build e79254c)",
date="2024-11-21T06:34:07.274Z")
@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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnRepository.static interfaceThe encryption configuration for the repository.static interfaceThe image scanning configuration for a repository.static interfaceTheLifecyclePolicyproperty type specifies a lifecycle policy.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.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnRepository(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::Repositoryresource.Returns the URI for the specifiedAWS::ECR::Repositoryresource.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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetEmptyOnDelete(Boolean value) If true, deleting the repository force deletes the contents of the repository.voidsetEmptyOnDelete(IResolvable value) If true, deleting the repository force deletes the contents of the repository.voidThe encryption configuration for the repository.voidThe encryption configuration for the repository.voidThe image scanning configuration for the repository.voidThe image scanning configuration for the repository.voidsetImageTagMutability(String value) The tag mutability setting for the repository.voidsetLifecyclePolicy(IResolvable value) Creates or updates a lifecycle policy.voidCreates or updates a lifecycle policy.voidsetRepositoryName(String value) The name to use for the repository.voidsetRepositoryPolicyText(Object value) The JSON repository policy text to apply to the 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, 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.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:
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::Repositoryresource.For example,
arn:aws:ecr: *eu-west-1* : *123456789012* :repository/ *test-repository*. -
getAttrRepositoryUri
Returns the URI for the specifiedAWS::ECR::Repositoryresource.For example,
*123456789012* .dkr.ecr. *us-west-2* .amazonaws.com/repository. -
getCfnProperties
- Overrides:
getCfnPropertiesin 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.
-