Skip to main content

repository_creation_templates

Creates, updates, deletes or gets a repository_creation_template resource or lists repository_creation_templates in a region

Overview

Namerepository_creation_templates
TypeResource
DescriptionThe details of the repository creation template associated with the request.
Idawscc.ecr.repository_creation_templates

Fields

NameDatatypeDescription
prefixstringThe repository namespace prefix associated with the repository creation template.
descriptionstringThe description associated with the repository creation template.
image_tag_mutabilitystringThe tag mutability setting for the repository. 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.
image_tag_mutability_exclusion_filtersarrayDefines the image tag mutability exclusion filters to apply when creating repositories from this template. These filters specify which image tags can override the repository's default image tag mutability setting.
repository_policystringThe repository policy to apply to repositories created using the template. A repository policy is a permissions policy associated with a repository to control access permissions.
lifecycle_policystringThe lifecycle policy to use for repositories created using the template.
encryption_configurationobjectThe encryption configuration associated with the repository creation template.
resource_tagsarrayThe 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.
applied_forarrayA list of enumerable Strings representing the repository creation scenarios that this template will apply towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION
custom_role_arnstringThe ARN of the role to be assumed by Amazon ECR. 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.
created_atstring
updated_atstring
regionstringAWS region.

For more information, see AWS::ECR::RepositoryCreationTemplate.

Methods

NameAccessible byRequired Params
create_resourceINSERTPrefix, AppliedFor, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual repository_creation_template.

SELECT
region,
prefix,
description,
image_tag_mutability,
image_tag_mutability_exclusion_filters,
repository_policy,
lifecycle_policy,
encryption_configuration,
resource_tags,
applied_for,
custom_role_arn,
created_at,
updated_at
FROM awscc.ecr.repository_creation_templates
WHERE region = 'us-east-1' AND data__Identifier = '<Prefix>';

INSERT example

Use the following StackQL query and manifest file to create a new repository_creation_template resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.ecr.repository_creation_templates (
Prefix,
AppliedFor,
region
)
SELECT
'{{ Prefix }}',
'{{ AppliedFor }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ecr.repository_creation_templates
WHERE data__Identifier = '<Prefix>'
AND region = 'us-east-1';

Permissions

To operate on the repository_creation_templates resource, the following permissions are required:

Create

ecr:CreateRepositoryCreationTemplate,
ecr:PutLifecyclePolicy,
ecr:SetRepositoryPolicy,
ecr:CreateRepository,
iam:CreateServiceLinkedRole,
iam:PassRole

Read

ecr:DescribeRepositoryCreationTemplates

Update

ecr:DescribeRepositoryCreationTemplates,
ecr:UpdateRepositoryCreationTemplate,
ecr:PutLifecyclePolicy,
ecr:SetRepositoryPolicy,
ecr:CreateRepository,
iam:CreateServiceLinkedRole,
iam:PassRole

Delete

ecr:DeleteRepositoryCreationTemplate

List

ecr:DescribeRepositoryCreationTemplates