Class CfnRepositoryProps
Properties for defining a CfnRepository.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.ECR
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRepositoryProps : ICfnRepositoryProps
Syntax (vb)
Public Class CfnRepositoryProps 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",
ImageTagMutabilityExclusionFilters = new [] { new ImageTagMutabilityExclusionFilterProperty {
ImageTagMutabilityExclusionFilterType = "imageTagMutabilityExclusionFilterType",
ImageTagMutabilityExclusionFilterValue = "imageTagMutabilityExclusionFilterValue"
} },
LifecyclePolicy = new LifecyclePolicyProperty {
LifecyclePolicyText = "lifecyclePolicyText",
RegistryId = "registryId"
},
RepositoryName = "repositoryName",
RepositoryPolicyText = repositoryPolicyText,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Constructors
| CfnRepositoryProps() | Properties for defining a |
Properties
| EmptyOnDelete | If true, deleting the repository force deletes the contents of the repository. |
| EncryptionConfiguration | The encryption configuration for the repository. |
| ImageScanningConfiguration | The |
| ImageTagMutability | The tag mutability setting for the repository. |
| ImageTagMutabilityExclusionFilters | A list of filters that specify which image tags are excluded from the repository's image tag mutability setting. |
| 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 | An array of key-value pairs to apply to this resource. |
Constructors
CfnRepositoryProps()
Properties for defining a CfnRepository.
public CfnRepositoryProps()
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",
ImageTagMutabilityExclusionFilters = new [] { new ImageTagMutabilityExclusionFilterProperty {
ImageTagMutabilityExclusionFilterType = "imageTagMutabilityExclusionFilterType",
ImageTagMutabilityExclusionFilterValue = "imageTagMutabilityExclusionFilterValue"
} },
LifecyclePolicy = new LifecyclePolicyProperty {
LifecyclePolicyText = "lifecyclePolicyText",
RegistryId = "registryId"
},
RepositoryName = "repositoryName",
RepositoryPolicyText = repositoryPolicyText,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Properties
EmptyOnDelete
If true, deleting the repository force deletes the contents of the repository.
public object? EmptyOnDelete { get; set; }
Property Value
Remarks
If false, the repository must be empty before attempting to delete it.
Type union: either bool or IResolvable
EncryptionConfiguration
The encryption configuration for the repository.
public object? EncryptionConfiguration { get; set; }
Property Value
Remarks
This determines how the contents of your repository are encrypted at rest.
Type union: either IResolvable or CfnRepository.IEncryptionConfigurationProperty
ImageScanningConfiguration
The
imageScanningConfigurationparameter is being deprecated, in favor of specifying the image scanning configuration at the registry level.
public object? ImageScanningConfiguration { get; set; }
Property Value
Remarks
For more information, see PutRegistryScanningConfiguration .
The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
Type union: either IResolvable or CfnRepository.IImageScanningConfigurationProperty
ImageTagMutability
The tag mutability setting for the repository.
public string? ImageTagMutability { get; set; }
Property Value
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.
ImageTagMutabilityExclusionFilters
A list of filters that specify which image tags are excluded from the repository's image tag mutability setting.
public object? ImageTagMutabilityExclusionFilters { get; set; }
Property Value
Remarks
LifecyclePolicy
Creates or updates a lifecycle policy.
public object? LifecyclePolicy { get; set; }
Property Value
Remarks
For information about lifecycle policy syntax, see Lifecycle policy template .
Type union: either IResolvable or CfnRepository.ILifecyclePolicyProperty
RepositoryName
The name to use for the repository.
public string? RepositoryName { get; set; }
Property Value
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
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
ICfnTag[]