Class CfnRepositoryProps
Properties for defining a CfnRepository
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ECR
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRepositoryProps : Object, ICfnRepositoryProps
Syntax (vb)
Public Class CfnRepositoryProps
Inherits Object
Implements ICfnRepositoryProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html
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 cfnRepositoryProps = 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
Cfn |
Properties
Empty |
If true, deleting the repository force deletes the contents of the repository. |
Encryption |
The encryption configuration for the repository. |
Image |
The image scanning configuration for the repository. |
Image |
The tag mutability setting for the repository. |
Lifecycle |
Creates or updates a lifecycle policy. |
Repository |
The name to use for the repository. |
Repository |
The JSON repository policy text to apply to the repository. |
Tags | An array of key-value pairs to apply to this resource. |
Constructors
CfnRepositoryProps()
public CfnRepositoryProps()
Properties
EmptyOnDelete
If true, deleting the repository force deletes the contents of the repository.
public object EmptyOnDelete { get; set; }
Property Value
System.
Remarks
If false, the repository must be empty before attempting to delete it.
EncryptionConfiguration
The encryption configuration for the repository.
public object EncryptionConfiguration { get; set; }
Property Value
System.
Remarks
This determines how the contents of your repository are encrypted at rest.
ImageScanningConfiguration
The image scanning configuration for the repository.
public object ImageScanningConfiguration { get; set; }
Property Value
System.
Remarks
This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
ImageTagMutability
The tag mutability setting for the repository.
public string ImageTagMutability { get; set; }
Property Value
System.
Remarks
If this parameter is omitted, the default setting of MUTABLE
will be used which will allow image tags to be overwritten. If IMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
LifecyclePolicy
Creates or updates a lifecycle policy.
public object LifecyclePolicy { get; set; }
Property Value
System.
Remarks
For information about lifecycle policy syntax, see Lifecycle policy template .
RepositoryName
The name to use for the repository.
public string RepositoryName { get; set; }
Property Value
System.
Remarks
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 .
The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes.
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.
RepositoryPolicyText
The JSON repository policy text to apply to the repository.
public object RepositoryPolicyText { get; set; }
Property Value
System.
Remarks
For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide .
Tags
An array of key-value pairs to apply to this resource.
public ICfnTag[] Tags { get; set; }
Property Value
ICfn