aws-sdk-ecr 1.78.0 → 1.79.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2149866fed6ac55c2f2fa9340bd6280be3412591d2def4d83c0d85b76d172578
4
- data.tar.gz: c75330ad3e780e2601c36e7077f710c8ba1ec7e026c819bd61955d1f5fd64f14
3
+ metadata.gz: 1a393d47f9c75a5481b325c4ac2cc96e54f0fcb734a405e38a916c7bf09074b6
4
+ data.tar.gz: 45f3908d24dc14f4127299fc2e3c7eece2fa6af2be353d17a407e9d2d79a206b
5
5
  SHA512:
6
- metadata.gz: 8397b485b83ce2a237ee0bd88aab61f9858d036f04958ee6c277ce7953ca154c54e148ec0013c69e13601f6afdd1d7b70da38da11fc11ce74ab93d7f59d8ebef
7
- data.tar.gz: 7f98b5be4c2c2150e06685cad43d30913c3a7651de481769ac3c80e1169037c806b9d1d6f3679273262c23d3a069016f71ad9cefd54c02b4437ee57ced936d13
6
+ metadata.gz: 110c45269757aa566fab0dae2cfbd59e27d5e318c1f0410f367cfb686ff48a713cef65cd7a6711364e20b8c61476f78180e41c0a80d1e6b265a1b6414c3aa84c
7
+ data.tar.gz: b4206cdfe2f6e3460b249d8abe7de0902415a183f6be499ae884cfafa97fba9e96f1d0195b309cfb6daff4ed06c6eccca39e7fa1725f4f8adb7d39e816bb814e
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.79.0 (2024-07-25)
5
+ ------------------
6
+
7
+ * Feature - API and documentation updates for Amazon ECR, adding support for creating, updating, describing and deleting ECR Repository Creation Template.
8
+
4
9
  1.78.0 (2024-07-05)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.78.0
1
+ 1.79.0
@@ -811,9 +811,6 @@ module Aws::ECR
811
811
  # * Microsoft Azure Container Registry (`azure-container-registry`) -
812
812
  # `<custom>.azurecr.io`
813
813
  #
814
- # * GitLab Container Registry (`gitlab-container-registry`) -
815
- # `registry.gitlab.com`
816
- #
817
814
  # @option params [String] :registry_id
818
815
  # The Amazon Web Services account ID associated with the registry to
819
816
  # create the pull through cache rule for. If you do not specify a
@@ -974,6 +971,181 @@ module Aws::ECR
974
971
  req.send_request(options)
975
972
  end
976
973
 
974
+ # Creates a repository creation template. This template is used to
975
+ # define the settings for repositories created by Amazon ECR on your
976
+ # behalf. For example, repositories created through pull through cache
977
+ # actions. For more information, see [Private repository creation
978
+ # templates][1] in the *Amazon Elastic Container Registry User Guide*.
979
+ #
980
+ #
981
+ #
982
+ # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-creation-templates.html
983
+ #
984
+ # @option params [required, String] :prefix
985
+ # The repository namespace prefix to associate with the template. All
986
+ # repositories created using this namespace prefix will have the
987
+ # settings defined in this template applied. For example, a prefix of
988
+ # `prod` would apply to all repositories beginning with `prod/`.
989
+ # Similarly, a prefix of `prod/team` would apply to all repositories
990
+ # beginning with `prod/team/`.
991
+ #
992
+ # To apply a template to all repositories in your registry that don't
993
+ # have an associated creation template, you can use `ROOT` as the
994
+ # prefix.
995
+ #
996
+ # There is always an assumed `/` applied to the end of the prefix. If
997
+ # you specify `ecr-public` as the prefix, Amazon ECR treats that as
998
+ # `ecr-public/`. When using a pull through cache rule, the repository
999
+ # prefix you specify during rule creation is what you should specify as
1000
+ # your repository creation template prefix as well.
1001
+ #
1002
+ # @option params [String] :description
1003
+ # A description for the repository creation template.
1004
+ #
1005
+ # @option params [Types::EncryptionConfigurationForRepositoryCreationTemplate] :encryption_configuration
1006
+ # The encryption configuration to use for repositories created using the
1007
+ # template.
1008
+ #
1009
+ # @option params [Array<Types::Tag>] :resource_tags
1010
+ # The metadata to apply to the repository to help you categorize and
1011
+ # organize. Each tag consists of a key and an optional value, both of
1012
+ # which you define. Tag keys can have a maximum character length of 128
1013
+ # characters, and tag values can have a maximum length of 256
1014
+ # characters.
1015
+ #
1016
+ # @option params [String] :image_tag_mutability
1017
+ # The tag mutability setting for the repository. If this parameter is
1018
+ # omitted, the default setting of `MUTABLE` will be used which will
1019
+ # allow image tags to be overwritten. If `IMMUTABLE` is specified, all
1020
+ # image tags within the repository will be immutable which will prevent
1021
+ # them from being overwritten.
1022
+ #
1023
+ # @option params [String] :repository_policy
1024
+ # The repository policy to apply to repositories created using the
1025
+ # template. A repository policy is a permissions policy associated with
1026
+ # a repository to control access permissions.
1027
+ #
1028
+ # @option params [String] :lifecycle_policy
1029
+ # The lifecycle policy to use for repositories created using the
1030
+ # template.
1031
+ #
1032
+ # @option params [required, Array<String>] :applied_for
1033
+ # A list of enumerable strings representing the Amazon ECR repository
1034
+ # creation scenarios that this template will apply towards. The two
1035
+ # supported scenarios are `PULL_THROUGH_CACHE` and `REPLICATION`
1036
+ #
1037
+ # @option params [String] :custom_role_arn
1038
+ # The ARN of the role to be assumed by Amazon ECR. This role must be in
1039
+ # the same account as the registry that you are configuring.
1040
+ #
1041
+ # @return [Types::CreateRepositoryCreationTemplateResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1042
+ #
1043
+ # * {Types::CreateRepositoryCreationTemplateResponse#registry_id #registry_id} => String
1044
+ # * {Types::CreateRepositoryCreationTemplateResponse#repository_creation_template #repository_creation_template} => Types::RepositoryCreationTemplate
1045
+ #
1046
+ #
1047
+ # @example Example: Create a new repository creation template
1048
+ #
1049
+ # # This example creates a repository creation template.
1050
+ #
1051
+ # resp = client.create_repository_creation_template({
1052
+ # applied_for: [
1053
+ # "REPLICATION",
1054
+ # "PULL_THROUGH_CACHE",
1055
+ # ],
1056
+ # description: "Repos for testing images",
1057
+ # encryption_configuration: {
1058
+ # encryption_type: "AES256",
1059
+ # },
1060
+ # image_tag_mutability: "MUTABLE",
1061
+ # lifecycle_policy: "{\r\n \"rules\": [\r\n {\r\n \"rulePriority\": 1,\r\n \"description\": \"Expire images older than 14 days\",\r\n \"selection\": {\r\n \"tagStatus\": \"untagged\",\r\n \"countType\": \"sinceImagePushed\",\r\n \"countUnit\": \"days\",\r\n \"countNumber\": 14\r\n },\r\n \"action\": {\r\n \"type\": \"expire\"\r\n }\r\n }\r\n ]\r\n}",
1062
+ # prefix: "eng/test",
1063
+ # repository_policy: "{\r\n \"Version\": \"2012-10-17\",\r\n \"Statement\": [\r\n {\r\n \"Sid\": \"LambdaECRPullPolicy\",\r\n \"Effect\": \"Allow\",\r\n \"Principal\": {\r\n \"Service\": \"lambda.amazonaws.com\"\r\n },\r\n \"Action\": \"ecr:BatchGetImage\"\r\n }\r\n ]\r\n}",
1064
+ # resource_tags: [
1065
+ # {
1066
+ # key: "environment",
1067
+ # value: "test",
1068
+ # },
1069
+ # ],
1070
+ # })
1071
+ #
1072
+ # resp.to_h outputs the following:
1073
+ # {
1074
+ # registry_id: "012345678901",
1075
+ # repository_creation_template: {
1076
+ # applied_for: [
1077
+ # "REPLICATION",
1078
+ # "PULL_THROUGH_CACHE",
1079
+ # ],
1080
+ # created_at: Time.parse("2023-12-16T17:29:02-07:00"),
1081
+ # description: "Repos for testing images",
1082
+ # encryption_configuration: {
1083
+ # encryption_type: "AES256",
1084
+ # },
1085
+ # image_tag_mutability: "MUTABLE",
1086
+ # lifecycle_policy: "{\r\n \"rules\": [\r\n {\r\n \"rulePriority\": 1,\r\n \"description\": \"Expire images older than 14 days\",\r\n \"selection\": {\r\n \"tagStatus\": \"untagged\",\r\n \"countType\": \"sinceImagePushed\",\r\n \"countUnit\": \"days\",\r\n \"countNumber\": 14\r\n },\r\n \"action\": {\r\n \"type\": \"expire\"\r\n }\r\n }\r\n ]\r\n}",
1087
+ # prefix: "eng/test",
1088
+ # repository_policy: "{\n \"Version\" : \"2012-10-17\",\n \"Statement\" : [ {\n \"Sid\" : \"LambdaECRPullPolicy\",\n \"Effect\" : \"Allow\",\n \"Principal\" : {\n \"Service\" : \"lambda.amazonaws.com\"\n },\n \"Action\" : \"ecr:BatchGetImage\"\n } ]\n}",
1089
+ # resource_tags: [
1090
+ # {
1091
+ # key: "environment",
1092
+ # value: "test",
1093
+ # },
1094
+ # ],
1095
+ # updated_at: Time.parse("2023-12-16T17:29:02-07:00"),
1096
+ # },
1097
+ # }
1098
+ #
1099
+ # @example Request syntax with placeholder values
1100
+ #
1101
+ # resp = client.create_repository_creation_template({
1102
+ # prefix: "Prefix", # required
1103
+ # description: "RepositoryTemplateDescription",
1104
+ # encryption_configuration: {
1105
+ # encryption_type: "AES256", # required, accepts AES256, KMS
1106
+ # kms_key: "KmsKeyForRepositoryCreationTemplate",
1107
+ # },
1108
+ # resource_tags: [
1109
+ # {
1110
+ # key: "TagKey", # required
1111
+ # value: "TagValue", # required
1112
+ # },
1113
+ # ],
1114
+ # image_tag_mutability: "MUTABLE", # accepts MUTABLE, IMMUTABLE
1115
+ # repository_policy: "RepositoryPolicyText",
1116
+ # lifecycle_policy: "LifecyclePolicyTextForRepositoryCreationTemplate",
1117
+ # applied_for: ["REPLICATION"], # required, accepts REPLICATION, PULL_THROUGH_CACHE
1118
+ # custom_role_arn: "CustomRoleArn",
1119
+ # })
1120
+ #
1121
+ # @example Response structure
1122
+ #
1123
+ # resp.registry_id #=> String
1124
+ # resp.repository_creation_template.prefix #=> String
1125
+ # resp.repository_creation_template.description #=> String
1126
+ # resp.repository_creation_template.encryption_configuration.encryption_type #=> String, one of "AES256", "KMS"
1127
+ # resp.repository_creation_template.encryption_configuration.kms_key #=> String
1128
+ # resp.repository_creation_template.resource_tags #=> Array
1129
+ # resp.repository_creation_template.resource_tags[0].key #=> String
1130
+ # resp.repository_creation_template.resource_tags[0].value #=> String
1131
+ # resp.repository_creation_template.image_tag_mutability #=> String, one of "MUTABLE", "IMMUTABLE"
1132
+ # resp.repository_creation_template.repository_policy #=> String
1133
+ # resp.repository_creation_template.lifecycle_policy #=> String
1134
+ # resp.repository_creation_template.applied_for #=> Array
1135
+ # resp.repository_creation_template.applied_for[0] #=> String, one of "REPLICATION", "PULL_THROUGH_CACHE"
1136
+ # resp.repository_creation_template.custom_role_arn #=> String
1137
+ # resp.repository_creation_template.created_at #=> Time
1138
+ # resp.repository_creation_template.updated_at #=> Time
1139
+ #
1140
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepositoryCreationTemplate AWS API Documentation
1141
+ #
1142
+ # @overload create_repository_creation_template(params = {})
1143
+ # @param [Hash] params ({})
1144
+ def create_repository_creation_template(params = {}, options = {})
1145
+ req = build_request(:create_repository_creation_template, params)
1146
+ req.send_request(options)
1147
+ end
1148
+
977
1149
  # Deletes the lifecycle policy associated with the specified repository.
978
1150
  #
979
1151
  # @option params [String] :registry_id
@@ -1149,6 +1321,74 @@ module Aws::ECR
1149
1321
  req.send_request(options)
1150
1322
  end
1151
1323
 
1324
+ # Deletes a repository creation template.
1325
+ #
1326
+ # @option params [required, String] :prefix
1327
+ # The repository namespace prefix associated with the repository
1328
+ # creation template.
1329
+ #
1330
+ # @return [Types::DeleteRepositoryCreationTemplateResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1331
+ #
1332
+ # * {Types::DeleteRepositoryCreationTemplateResponse#registry_id #registry_id} => String
1333
+ # * {Types::DeleteRepositoryCreationTemplateResponse#repository_creation_template #repository_creation_template} => Types::RepositoryCreationTemplate
1334
+ #
1335
+ #
1336
+ # @example Example: Delete a repository creation template
1337
+ #
1338
+ # # This example deletes a repository creation template.
1339
+ #
1340
+ # resp = client.delete_repository_creation_template({
1341
+ # prefix: "eng",
1342
+ # })
1343
+ #
1344
+ # resp.to_h outputs the following:
1345
+ # {
1346
+ # registry_id: "012345678901",
1347
+ # repository_creation_template: {
1348
+ # created_at: Time.parse("2023-12-03T16:27:57.933000-08:00"),
1349
+ # encryption_configuration: {
1350
+ # encryption_type: "AES256",
1351
+ # },
1352
+ # image_tag_mutability: "MUTABLE",
1353
+ # prefix: "eng",
1354
+ # updated_at: Time.parse("2023-12-03T16:27:57.933000-08:00"),
1355
+ # },
1356
+ # }
1357
+ #
1358
+ # @example Request syntax with placeholder values
1359
+ #
1360
+ # resp = client.delete_repository_creation_template({
1361
+ # prefix: "Prefix", # required
1362
+ # })
1363
+ #
1364
+ # @example Response structure
1365
+ #
1366
+ # resp.registry_id #=> String
1367
+ # resp.repository_creation_template.prefix #=> String
1368
+ # resp.repository_creation_template.description #=> String
1369
+ # resp.repository_creation_template.encryption_configuration.encryption_type #=> String, one of "AES256", "KMS"
1370
+ # resp.repository_creation_template.encryption_configuration.kms_key #=> String
1371
+ # resp.repository_creation_template.resource_tags #=> Array
1372
+ # resp.repository_creation_template.resource_tags[0].key #=> String
1373
+ # resp.repository_creation_template.resource_tags[0].value #=> String
1374
+ # resp.repository_creation_template.image_tag_mutability #=> String, one of "MUTABLE", "IMMUTABLE"
1375
+ # resp.repository_creation_template.repository_policy #=> String
1376
+ # resp.repository_creation_template.lifecycle_policy #=> String
1377
+ # resp.repository_creation_template.applied_for #=> Array
1378
+ # resp.repository_creation_template.applied_for[0] #=> String, one of "REPLICATION", "PULL_THROUGH_CACHE"
1379
+ # resp.repository_creation_template.custom_role_arn #=> String
1380
+ # resp.repository_creation_template.created_at #=> Time
1381
+ # resp.repository_creation_template.updated_at #=> Time
1382
+ #
1383
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryCreationTemplate AWS API Documentation
1384
+ #
1385
+ # @overload delete_repository_creation_template(params = {})
1386
+ # @param [Hash] params ({})
1387
+ def delete_repository_creation_template(params = {}, options = {})
1388
+ req = build_request(:delete_repository_creation_template, params)
1389
+ req.send_request(options)
1390
+ end
1391
+
1152
1392
  # Deletes the repository policy associated with the specified
1153
1393
  # repository.
1154
1394
  #
@@ -1706,6 +1946,134 @@ module Aws::ECR
1706
1946
  req.send_request(options)
1707
1947
  end
1708
1948
 
1949
+ # Returns details about the repository creation templates in a registry.
1950
+ # The `prefixes` request parameter can be used to return the details for
1951
+ # a specific repository creation template.
1952
+ #
1953
+ # @option params [Array<String>] :prefixes
1954
+ # The repository namespace prefixes associated with the repository
1955
+ # creation templates to describe. If this value is not specified, all
1956
+ # repository creation templates are returned.
1957
+ #
1958
+ # @option params [String] :next_token
1959
+ # The `nextToken` value returned from a previous paginated
1960
+ # `DescribeRepositoryCreationTemplates` request where `maxResults` was
1961
+ # used and the results exceeded the value of that parameter. Pagination
1962
+ # continues from the end of the previous results that returned the
1963
+ # `nextToken` value. This value is `null` when there are no more results
1964
+ # to return.
1965
+ #
1966
+ # <note markdown="1"> This token should be treated as an opaque identifier that is only used
1967
+ # to retrieve the next items in a list and not for other programmatic
1968
+ # purposes.
1969
+ #
1970
+ # </note>
1971
+ #
1972
+ # @option params [Integer] :max_results
1973
+ # The maximum number of repository results returned by
1974
+ # `DescribeRepositoryCreationTemplatesRequest` in paginated output. When
1975
+ # this parameter is used, `DescribeRepositoryCreationTemplatesRequest`
1976
+ # only returns `maxResults` results in a single page along with a
1977
+ # `nextToken` response element. The remaining results of the initial
1978
+ # request can be seen by sending another
1979
+ # `DescribeRepositoryCreationTemplatesRequest` request with the returned
1980
+ # `nextToken` value. This value can be between 1 and 1000. If this
1981
+ # parameter is not used, then
1982
+ # `DescribeRepositoryCreationTemplatesRequest` returns up to 100 results
1983
+ # and a `nextToken` value, if applicable.
1984
+ #
1985
+ # @return [Types::DescribeRepositoryCreationTemplatesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1986
+ #
1987
+ # * {Types::DescribeRepositoryCreationTemplatesResponse#registry_id #registry_id} => String
1988
+ # * {Types::DescribeRepositoryCreationTemplatesResponse#repository_creation_templates #repository_creation_templates} => Array&lt;Types::RepositoryCreationTemplate&gt;
1989
+ # * {Types::DescribeRepositoryCreationTemplatesResponse#next_token #next_token} => String
1990
+ #
1991
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1992
+ #
1993
+ #
1994
+ # @example Example: Describe a repository creation template
1995
+ #
1996
+ # # This example describes the contents of a repository creation template.
1997
+ #
1998
+ # resp = client.describe_repository_creation_templates({
1999
+ # max_results: 123,
2000
+ # next_token: "",
2001
+ # prefixes: [
2002
+ # "eng",
2003
+ # ],
2004
+ # })
2005
+ #
2006
+ # resp.to_h outputs the following:
2007
+ # {
2008
+ # next_token: "",
2009
+ # registry_id: "012345678901",
2010
+ # repository_creation_templates: [
2011
+ # {
2012
+ # applied_for: [
2013
+ # "PULL_THROUGH_CACHE",
2014
+ # "REPLICATION",
2015
+ # ],
2016
+ # created_at: Time.parse("2023-12-16T17:29:02-07:00"),
2017
+ # encryption_configuration: {
2018
+ # encryption_type: "AES256",
2019
+ # },
2020
+ # image_tag_mutability: "MUTABLE",
2021
+ # prefix: "eng/test",
2022
+ # updated_at: Time.parse("2023-12-16T19:55:02-07:00"),
2023
+ # },
2024
+ # {
2025
+ # applied_for: [
2026
+ # "REPLICATION",
2027
+ # ],
2028
+ # created_at: Time.parse("2023-12-14T17:29:02-07:00"),
2029
+ # encryption_configuration: {
2030
+ # encryption_type: "AES256",
2031
+ # },
2032
+ # image_tag_mutability: "IMMUTABLE",
2033
+ # prefix: "eng/replication-test",
2034
+ # updated_at: Time.parse("2023-12-14T19:55:02-07:00"),
2035
+ # },
2036
+ # ],
2037
+ # }
2038
+ #
2039
+ # @example Request syntax with placeholder values
2040
+ #
2041
+ # resp = client.describe_repository_creation_templates({
2042
+ # prefixes: ["Prefix"],
2043
+ # next_token: "NextToken",
2044
+ # max_results: 1,
2045
+ # })
2046
+ #
2047
+ # @example Response structure
2048
+ #
2049
+ # resp.registry_id #=> String
2050
+ # resp.repository_creation_templates #=> Array
2051
+ # resp.repository_creation_templates[0].prefix #=> String
2052
+ # resp.repository_creation_templates[0].description #=> String
2053
+ # resp.repository_creation_templates[0].encryption_configuration.encryption_type #=> String, one of "AES256", "KMS"
2054
+ # resp.repository_creation_templates[0].encryption_configuration.kms_key #=> String
2055
+ # resp.repository_creation_templates[0].resource_tags #=> Array
2056
+ # resp.repository_creation_templates[0].resource_tags[0].key #=> String
2057
+ # resp.repository_creation_templates[0].resource_tags[0].value #=> String
2058
+ # resp.repository_creation_templates[0].image_tag_mutability #=> String, one of "MUTABLE", "IMMUTABLE"
2059
+ # resp.repository_creation_templates[0].repository_policy #=> String
2060
+ # resp.repository_creation_templates[0].lifecycle_policy #=> String
2061
+ # resp.repository_creation_templates[0].applied_for #=> Array
2062
+ # resp.repository_creation_templates[0].applied_for[0] #=> String, one of "REPLICATION", "PULL_THROUGH_CACHE"
2063
+ # resp.repository_creation_templates[0].custom_role_arn #=> String
2064
+ # resp.repository_creation_templates[0].created_at #=> Time
2065
+ # resp.repository_creation_templates[0].updated_at #=> Time
2066
+ # resp.next_token #=> String
2067
+ #
2068
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositoryCreationTemplates AWS API Documentation
2069
+ #
2070
+ # @overload describe_repository_creation_templates(params = {})
2071
+ # @param [Hash] params ({})
2072
+ def describe_repository_creation_templates(params = {}, options = {})
2073
+ req = build_request(:describe_repository_creation_templates, params)
2074
+ req.send_request(options)
2075
+ end
2076
+
1709
2077
  # Retrieves an authorization token. An authorization token represents
1710
2078
  # your IAM authentication credentials and can be used to access any
1711
2079
  # Amazon ECR registry that your IAM principal has access to. The
@@ -2578,7 +2946,9 @@ module Aws::ECR
2578
2946
  # PutReplicationConfiguration API is called, a service-linked IAM role
2579
2947
  # is created in your account for the replication process. For more
2580
2948
  # information, see [Using service-linked roles for Amazon ECR][1] in the
2581
- # *Amazon Elastic Container Registry User Guide*.
2949
+ # *Amazon Elastic Container Registry User Guide*. For more information
2950
+ # on the custom role for replication, see [Creating an IAM role for
2951
+ # replication][2].
2582
2952
  #
2583
2953
  # <note markdown="1"> When configuring cross-account replication, the destination account
2584
2954
  # must grant the source account permission to replicate. This permission
@@ -2590,6 +2960,7 @@ module Aws::ECR
2590
2960
  #
2591
2961
  #
2592
2962
  # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/using-service-linked-roles.html
2963
+ # [2]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/replication-creation-templates.html#roles-creatingrole-user-console
2593
2964
  #
2594
2965
  # @option params [required, Types::ReplicationConfiguration] :replication_configuration
2595
2966
  # An object representing the replication configuration for a registry.
@@ -2917,6 +3288,158 @@ module Aws::ECR
2917
3288
  req.send_request(options)
2918
3289
  end
2919
3290
 
3291
+ # Updates an existing repository creation template.
3292
+ #
3293
+ # @option params [required, String] :prefix
3294
+ # The repository namespace prefix that matches an existing repository
3295
+ # creation template in the registry. All repositories created using this
3296
+ # namespace prefix will have the settings defined in this template
3297
+ # applied. For example, a prefix of `prod` would apply to all
3298
+ # repositories beginning with `prod/`. This includes a repository named
3299
+ # `prod/team1` as well as a repository named `prod/repository1`.
3300
+ #
3301
+ # To apply a template to all repositories in your registry that don't
3302
+ # have an associated creation template, you can use `ROOT` as the
3303
+ # prefix.
3304
+ #
3305
+ # @option params [String] :description
3306
+ # A description for the repository creation template.
3307
+ #
3308
+ # @option params [Types::EncryptionConfigurationForRepositoryCreationTemplate] :encryption_configuration
3309
+ # The encryption configuration to associate with the repository creation
3310
+ # template.
3311
+ #
3312
+ # @option params [Array<Types::Tag>] :resource_tags
3313
+ # The metadata to apply to the repository to help you categorize and
3314
+ # organize. Each tag consists of a key and an optional value, both of
3315
+ # which you define. Tag keys can have a maximum character length of 128
3316
+ # characters, and tag values can have a maximum length of 256
3317
+ # characters.
3318
+ #
3319
+ # @option params [String] :image_tag_mutability
3320
+ # Updates the tag mutability setting for the repository. If this
3321
+ # parameter is omitted, the default setting of `MUTABLE` will be used
3322
+ # which will allow image tags to be overwritten. If `IMMUTABLE` is
3323
+ # specified, all image tags within the repository will be immutable
3324
+ # which will prevent them from being overwritten.
3325
+ #
3326
+ # @option params [String] :repository_policy
3327
+ # Updates the repository policy created using the template. A repository
3328
+ # policy is a permissions policy associated with a repository to control
3329
+ # access permissions.
3330
+ #
3331
+ # @option params [String] :lifecycle_policy
3332
+ # Updates the lifecycle policy associated with the specified repository
3333
+ # creation template.
3334
+ #
3335
+ # @option params [Array<String>] :applied_for
3336
+ # Updates the list of enumerable strings representing the Amazon ECR
3337
+ # repository creation scenarios that this template will apply towards.
3338
+ # The two supported scenarios are `PULL_THROUGH_CACHE` and `REPLICATION`
3339
+ #
3340
+ # @option params [String] :custom_role_arn
3341
+ # The ARN of the role to be assumed by Amazon ECR. This role must be in
3342
+ # the same account as the registry that you are configuring.
3343
+ #
3344
+ # @return [Types::UpdateRepositoryCreationTemplateResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3345
+ #
3346
+ # * {Types::UpdateRepositoryCreationTemplateResponse#registry_id #registry_id} => String
3347
+ # * {Types::UpdateRepositoryCreationTemplateResponse#repository_creation_template #repository_creation_template} => Types::RepositoryCreationTemplate
3348
+ #
3349
+ #
3350
+ # @example Example: Update a repository creation template
3351
+ #
3352
+ # # This example updates a repository creation template.
3353
+ #
3354
+ # resp = client.update_repository_creation_template({
3355
+ # applied_for: [
3356
+ # "REPLICATION",
3357
+ # ],
3358
+ # prefix: "eng/test",
3359
+ # resource_tags: [
3360
+ # {
3361
+ # key: "environment",
3362
+ # value: "test",
3363
+ # },
3364
+ # ],
3365
+ # })
3366
+ #
3367
+ # resp.to_h outputs the following:
3368
+ # {
3369
+ # registry_id: "012345678901",
3370
+ # repository_creation_template: {
3371
+ # applied_for: [
3372
+ # "REPLICATION",
3373
+ # ],
3374
+ # created_at: Time.parse("2023-12-16T17:29:02-07:00"),
3375
+ # description: "Repos for testing images",
3376
+ # encryption_configuration: {
3377
+ # encryption_type: "AES256",
3378
+ # },
3379
+ # image_tag_mutability: "MUTABLE",
3380
+ # lifecycle_policy: "{\r\n \"rules\": [\r\n {\r\n \"rulePriority\": 1,\r\n \"description\": \"Expire images older than 14 days\",\r\n \"selection\": {\r\n \"tagStatus\": \"untagged\",\r\n \"countType\": \"sinceImagePushed\",\r\n \"countUnit\": \"days\",\r\n \"countNumber\": 14\r\n },\r\n \"action\": {\r\n \"type\": \"expire\"\r\n }\r\n }\r\n ]\r\n}",
3381
+ # prefix: "eng/test",
3382
+ # repository_policy: "{\n \"Version\" : \"2012-10-17\",\n \"Statement\" : [ {\n \"Sid\" : \"LambdaECRPullPolicy\",\n \"Effect\" : \"Allow\",\n \"Principal\" : {\n \"Service\" : \"lambda.amazonaws.com\"\n },\n \"Action\" : \"ecr:BatchGetImage\"\n } ]\n}",
3383
+ # resource_tags: [
3384
+ # {
3385
+ # key: "environment",
3386
+ # value: "test",
3387
+ # },
3388
+ # ],
3389
+ # updated_at: Time.parse("2023-12-16T19:55:02-07:00"),
3390
+ # },
3391
+ # }
3392
+ #
3393
+ # @example Request syntax with placeholder values
3394
+ #
3395
+ # resp = client.update_repository_creation_template({
3396
+ # prefix: "Prefix", # required
3397
+ # description: "RepositoryTemplateDescription",
3398
+ # encryption_configuration: {
3399
+ # encryption_type: "AES256", # required, accepts AES256, KMS
3400
+ # kms_key: "KmsKeyForRepositoryCreationTemplate",
3401
+ # },
3402
+ # resource_tags: [
3403
+ # {
3404
+ # key: "TagKey", # required
3405
+ # value: "TagValue", # required
3406
+ # },
3407
+ # ],
3408
+ # image_tag_mutability: "MUTABLE", # accepts MUTABLE, IMMUTABLE
3409
+ # repository_policy: "RepositoryPolicyText",
3410
+ # lifecycle_policy: "LifecyclePolicyTextForRepositoryCreationTemplate",
3411
+ # applied_for: ["REPLICATION"], # accepts REPLICATION, PULL_THROUGH_CACHE
3412
+ # custom_role_arn: "CustomRoleArn",
3413
+ # })
3414
+ #
3415
+ # @example Response structure
3416
+ #
3417
+ # resp.registry_id #=> String
3418
+ # resp.repository_creation_template.prefix #=> String
3419
+ # resp.repository_creation_template.description #=> String
3420
+ # resp.repository_creation_template.encryption_configuration.encryption_type #=> String, one of "AES256", "KMS"
3421
+ # resp.repository_creation_template.encryption_configuration.kms_key #=> String
3422
+ # resp.repository_creation_template.resource_tags #=> Array
3423
+ # resp.repository_creation_template.resource_tags[0].key #=> String
3424
+ # resp.repository_creation_template.resource_tags[0].value #=> String
3425
+ # resp.repository_creation_template.image_tag_mutability #=> String, one of "MUTABLE", "IMMUTABLE"
3426
+ # resp.repository_creation_template.repository_policy #=> String
3427
+ # resp.repository_creation_template.lifecycle_policy #=> String
3428
+ # resp.repository_creation_template.applied_for #=> Array
3429
+ # resp.repository_creation_template.applied_for[0] #=> String, one of "REPLICATION", "PULL_THROUGH_CACHE"
3430
+ # resp.repository_creation_template.custom_role_arn #=> String
3431
+ # resp.repository_creation_template.created_at #=> Time
3432
+ # resp.repository_creation_template.updated_at #=> Time
3433
+ #
3434
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UpdateRepositoryCreationTemplate AWS API Documentation
3435
+ #
3436
+ # @overload update_repository_creation_template(params = {})
3437
+ # @param [Hash] params ({})
3438
+ def update_repository_creation_template(params = {}, options = {})
3439
+ req = build_request(:update_repository_creation_template, params)
3440
+ req.send_request(options)
3441
+ end
3442
+
2920
3443
  # Uploads an image layer part to Amazon ECR.
2921
3444
  #
2922
3445
  # When an image is pushed, each new image layer is uploaded in parts.
@@ -3048,7 +3571,7 @@ module Aws::ECR
3048
3571
  params: params,
3049
3572
  config: config)
3050
3573
  context[:gem_name] = 'aws-sdk-ecr'
3051
- context[:gem_version] = '1.78.0'
3574
+ context[:gem_version] = '1.79.0'
3052
3575
  Seahorse::Client::Request.new(handlers, context)
3053
3576
  end
3054
3577