Class CfnRepository
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.
Inherited Members
Namespace: Amazon.CDK.AWS.ECR
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRepository : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnRepository
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
For more information, see Amazon ECR private repositories in the Amazon ECR User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html
CloudformationResource: AWS::ECR::Repository
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECR;
var repositoryPolicyText;
var cfnRepository = new CfnRepository(this, "MyCfnRepository", new CfnRepositoryProps {
EmptyOnDelete = false,
EncryptionConfiguration = new EncryptionConfigurationProperty {
EncryptionType = "encryptionType",
// the properties below are optional
KmsKey = "kmsKey"
},
ImageScanningConfiguration = new ImageScanningConfigurationProperty {
ScanOnPush = false
},
ImageTagMutability = "imageTagMutability",
LifecyclePolicy = new LifecyclePolicyProperty {
LifecyclePolicyText = "lifecyclePolicyText",
RegistryId = "registryId"
},
RepositoryName = "repositoryName",
RepositoryPolicyText = repositoryPolicyText,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnRepository(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnRepository(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnRepository(Construct, String, ICfnRepositoryProps) |
Properties
AttrArn | Returns the Amazon Resource Name (ARN) for the specified |
AttrRepositoryUri | Returns the URI for the specified |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
EmptyOnDelete | If true, deleting the repository force deletes the contents of the repository. |
EncryptionConfiguration | The encryption configuration for the repository. |
ImageScanningConfiguration | The image scanning configuration for the repository. |
ImageTagMutability | The tag mutability setting for the repository. |
LifecyclePolicy | Creates or updates a lifecycle policy. |
RepositoryName | The name to use for the repository. |
RepositoryPolicyText | The JSON repository policy text to apply to the repository. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | An array of key-value pairs to apply to this resource. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnRepository(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnRepository(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnRepository(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnRepository(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnRepository(Construct, String, ICfnRepositoryProps)
public CfnRepository(Construct scope, string id, ICfnRepositoryProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnRepositoryProps
Resource properties.
Properties
AttrArn
Returns the Amazon Resource Name (ARN) for the specified AWS::ECR::Repository
resource.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
For example, arn:aws:ecr: eu-west-1 : 123456789012 :repository/ test-repository
.
CloudformationAttribute: Arn
AttrRepositoryUri
Returns the URI for the specified AWS::ECR::Repository
resource.
public virtual string AttrRepositoryUri { get; }
Property Value
System.String
Remarks
For example, 123456789012 .dkr.ecr. us-west-2 .amazonaws.com/repository
.
CloudformationAttribute: RepositoryUri
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
EmptyOnDelete
If true, deleting the repository force deletes the contents of the repository.
public virtual object EmptyOnDelete { get; set; }
Property Value
System.Object
EncryptionConfiguration
The encryption configuration for the repository.
public virtual object EncryptionConfiguration { get; set; }
Property Value
System.Object
ImageScanningConfiguration
The image scanning configuration for the repository.
public virtual object ImageScanningConfiguration { get; set; }
Property Value
System.Object
ImageTagMutability
The tag mutability setting for the repository.
public virtual string ImageTagMutability { get; set; }
Property Value
System.String
LifecyclePolicy
Creates or updates a lifecycle policy.
public virtual object LifecyclePolicy { get; set; }
Property Value
System.Object
RepositoryName
The name to use for the repository.
public virtual string RepositoryName { get; set; }
Property Value
System.String
RepositoryPolicyText
The JSON repository policy text to apply to the repository.
public virtual object RepositoryPolicyText { get; set; }
Property Value
System.Object
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
An array of key-value pairs to apply to this resource.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>