- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateRepositoryCreationTemplateCommand
Updates an existing repository creation template.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ECRClient, UpdateRepositoryCreationTemplateCommand } from "@aws-sdk/client-ecr"; // ES Modules import
// const { ECRClient, UpdateRepositoryCreationTemplateCommand } = require("@aws-sdk/client-ecr"); // CommonJS import
const client = new ECRClient(config);
const input = { // UpdateRepositoryCreationTemplateRequest
prefix: "STRING_VALUE", // required
description: "STRING_VALUE",
encryptionConfiguration: { // EncryptionConfigurationForRepositoryCreationTemplate
encryptionType: "AES256" || "KMS" || "KMS_DSSE", // required
kmsKey: "STRING_VALUE",
},
resourceTags: [ // TagList
{ // Tag
Key: "STRING_VALUE", // required
Value: "STRING_VALUE", // required
},
],
imageTagMutability: "MUTABLE" || "IMMUTABLE",
repositoryPolicy: "STRING_VALUE",
lifecyclePolicy: "STRING_VALUE",
appliedFor: [ // RCTAppliedForList
"REPLICATION" || "PULL_THROUGH_CACHE",
],
customRoleArn: "STRING_VALUE",
};
const command = new UpdateRepositoryCreationTemplateCommand(input);
const response = await client.send(command);
// { // UpdateRepositoryCreationTemplateResponse
// registryId: "STRING_VALUE",
// repositoryCreationTemplate: { // RepositoryCreationTemplate
// prefix: "STRING_VALUE",
// description: "STRING_VALUE",
// encryptionConfiguration: { // EncryptionConfigurationForRepositoryCreationTemplate
// encryptionType: "AES256" || "KMS" || "KMS_DSSE", // required
// kmsKey: "STRING_VALUE",
// },
// resourceTags: [ // TagList
// { // Tag
// Key: "STRING_VALUE", // required
// Value: "STRING_VALUE", // required
// },
// ],
// imageTagMutability: "MUTABLE" || "IMMUTABLE",
// repositoryPolicy: "STRING_VALUE",
// lifecyclePolicy: "STRING_VALUE",
// appliedFor: [ // RCTAppliedForList
// "REPLICATION" || "PULL_THROUGH_CACHE",
// ],
// customRoleArn: "STRING_VALUE",
// createdAt: new Date("TIMESTAMP"),
// updatedAt: new Date("TIMESTAMP"),
// },
// };
UpdateRepositoryCreationTemplateCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
prefix Required | string | undefined | The repository namespace prefix that matches an existing repository creation template in the registry. All repositories created using this namespace prefix will have the settings defined in this template applied. For example, a prefix of To apply a template to all repositories in your registry that don't have an associated creation template, you can use |
appliedFor | RCTAppliedFor[] | undefined | Updates the list of enumerable strings representing the Amazon ECR repository creation scenarios that this template will apply towards. The two supported scenarios are |
customRoleArn | string | undefined | The ARN of the role to be assumed by Amazon ECR. This role must be in the same account as the registry that you are configuring. Amazon ECR will assume your supplied role when the customRoleArn is specified. When this field isn't specified, Amazon ECR will use the service-linked role for the repository creation template. |
description | string | undefined | A description for the repository creation template. |
encryptionConfiguration | EncryptionConfigurationForRepositoryCreationTemplate | undefined | The encryption configuration to associate with the repository creation template. |
imageTagMutability | ImageTagMutability | undefined | Updates the tag mutability setting for the repository. If this parameter is omitted, the default setting of |
lifecyclePolicy | string | undefined | Updates the lifecycle policy associated with the specified repository creation template. |
repositoryPolicy | string | undefined | Updates the repository policy created using the template. A repository policy is a permissions policy associated with a repository to control access permissions. |
resourceTags | Tag[] | undefined | The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. |
UpdateRepositoryCreationTemplateCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
registryId | string | undefined | The registry ID associated with the request. |
repositoryCreationTemplate | RepositoryCreationTemplate | undefined | The details of the repository creation template associated with the request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidParameterException | client | The specified parameter is invalid. Review the available parameters for the API request. |
ServerException | server | These errors are usually caused by a server-side issue. |
TemplateNotFoundException | client | The specified repository creation template can't be found. Verify the registry ID and prefix and try again. |
ValidationException | client | There was an exception validating this request. |
ECRServiceException | Base exception class for all service exceptions from ECR service. |