RepositoryProps Struct
| Source | aws-ecr/lib/repository.ts |
|---|---|
| Type last changed |
Example
const repository = new ecr.Repository(this, 'TestRepository', {
repositoryName: 'test-agent-runtime',
});
const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, 'v1.0.0');
new agentcore.Runtime(this, 'test-runtime', {
runtimeName: 'test_runtime',
agentRuntimeArtifact: agentRuntimeArtifact,
platformVersion: agentcore.PlatformVersion.V2,
minimumMemory: cdk.Size.gibibytes(4),
});
repository = ecr.Repository(self, "TestRepository",
repository_name="test-agent-runtime"
)
agent_runtime_artifact = agentcore.AgentRuntimeArtifact.from_ecr_repository(repository, "v1.0.0")
agentcore.Runtime(self, "test-runtime",
runtime_name="test_runtime",
agent_runtime_artifact=agent_runtime_artifact,
platform_version=agentcore.PlatformVersion.V2,
minimum_memory=cdk.Size.gibibytes(4)
)
Repository repository = Repository.Builder.create(this, "TestRepository")
.repositoryName("test-agent-runtime")
.build();
AgentRuntimeArtifact agentRuntimeArtifact = AgentRuntimeArtifact.fromEcrRepository(repository, "v1.0.0");
Runtime.Builder.create(this, "test-runtime")
.runtimeName("test_runtime")
.agentRuntimeArtifact(agentRuntimeArtifact)
.platformVersion(PlatformVersion.V2)
.minimumMemory(Size.gibibytes(4))
.build();
// Install: dotnet add package Amazon.CDK.Lib
var repository = new Repository(this, "TestRepository", new RepositoryProps {
RepositoryName = "test-agent-runtime"
});
var agentRuntimeArtifact = AgentRuntimeArtifact.FromEcrRepository(repository, "v1.0.0");
new Runtime(this, "test-runtime", new RuntimeProps {
RuntimeName = "test_runtime",
AgentRuntimeArtifact = agentRuntimeArtifact,
PlatformVersion = PlatformVersion.V2,
MinimumMemory = Size.Gibibytes(4)
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
repository := ecr.NewRepository(this, jsii.String("TestRepository"), &RepositoryProps{
RepositoryName: jsii.String("test-agent-runtime"),
})
agentRuntimeArtifact := agentcore.AgentRuntimeArtifact_FromEcrRepository(repository, jsii.String("v1.0.0"))
agentcore.NewRuntime(this, jsii.String("test-runtime"), &RuntimeProps{
RuntimeName: jsii.String("test_runtime"),
AgentRuntimeArtifact: agentRuntimeArtifact,
PlatformVersion: agentcore.PlatformVersion_V2(),
MinimumMemory: cdk.Size_Gibibytes(jsii.Number(4)),
})
Properties
autoDeleteImagesoptionalbooleanauto_delete_imagesoptionalboolautoDeleteImagesoptionalBooleanAutoDeleteImagesoptionalboolAutoDeleteImagesoptional*bool = false deprecated #Requires the removalPolicy to be set to RemovalPolicy.DESTROY.
emptyOnDeleteoptionalbooleanempty_on_deleteoptionalboolemptyOnDeleteoptionalBooleanEmptyOnDeleteoptionalboolEmptyOnDeleteoptional*bool = false #If false, the repository must be empty before attempting to delete it.
encryptionoptionalRepositoryEncryptionencryptionoptionalRepositoryEncryptionencryptionoptionalRepositoryEncryptionEncryptionoptionalRepositoryEncryptionEncryptionoptionalRepositoryEncryption #Default: KMS if encryptionKey is specified, or AES256 otherwise.
If you choose KMS, you can specify a KMS key via encryptionKey. If encryptionKey is not specified, an AWS managed KMS key is used.
encryptionKeyoptionalIKeyRefencryption_keyoptionalIKeyRefencryptionKeyoptionalIKeyRefEncryptionKeyoptionalIKeyRefEncryptionKeyoptionalIKeyRef #Default: If encryption is set to KMS and this property is undefined, an AWS managed KMS key is used.
The 'encryption' property must be either not specified or set to "KMS". An error will be emitted if encryption is set to "AES256".
imageScanOnPushoptionalbooleanimage_scan_on_pushoptionalboolimageScanOnPushoptionalBooleanImageScanOnPushoptionalboolImageScanOnPushoptional*bool = false #imageTagMutabilityoptionalTagMutabilityimage_tag_mutabilityoptionalTagMutabilityimageTagMutabilityoptionalTagMutabilityImageTagMutabilityoptionalTagMutabilityImageTagMutabilityoptionalTagMutability = TagMutability.MUTABLE #If this parameter is omitted, the default setting of MUTABLE will be used which will allow image tags to be overwritten.
imageTagMutabilityExclusionFiltersoptionalImageTagMutabilityExclusionFilter[]image_tag_mutability_exclusion_filtersoptionaltyping.List[ImageTagMutabilityExclusionFilter]imageTagMutabilityExclusionFiltersoptionalList<ImageTagMutabilityExclusionFilter>ImageTagMutabilityExclusionFiltersoptionalImageTagMutabilityExclusionFilter[]ImageTagMutabilityExclusionFiltersoptional*[]ImageTagMutabilityExclusionFilter #Default: undefined - AWS ECR default is no exclusion filters
These filters specify which image tags can override the repository's default image tag mutability setting.
lifecycleRegistryIdoptionalstringlifecycle_registry_idoptionalstrlifecycleRegistryIdoptionalStringLifecycleRegistryIdoptionalstringLifecycleRegistryIdoptional*string #Default: The default registry is assumed.
lifecycleRulesoptionalLifecycleRule[]lifecycle_rulesoptionaltyping.List[LifecycleRule]lifecycleRulesoptionalList<LifecycleRule>LifecycleRulesoptionalLifecycleRule[]LifecycleRulesoptional*[]LifecycleRule #Default: No life cycle rules
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy = RemovalPolicy.Retain #repositoryNameoptionalstringrepository_nameoptionalstrrepositoryNameoptionalStringRepositoryNameoptionalstringRepositoryNameoptional*string #Default: Automatically generated name.
notes
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.