aws-sdk-codeartifact 1.20.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -375,8 +375,6 @@ module Aws::CodeArtifact
375
375
  #
376
376
  # * `public:npmjs` - for the npm public repository.
377
377
  #
378
- # * `public:nuget-org` - for the NuGet Gallery.
379
- #
380
378
  # * `public:pypi` - for the Python Package Index.
381
379
  #
382
380
  # * `public:maven-central` - for Maven Central.
@@ -441,30 +439,34 @@ module Aws::CodeArtifact
441
439
  # owns the domain. It does not include dashes or spaces.
442
440
  #
443
441
  # @option params [required, String] :source_repository
444
- # The name of the repository that contains the package versions to copy.
442
+ # The name of the repository that contains the package versions to be
443
+ # copied.
445
444
  #
446
445
  # @option params [required, String] :destination_repository
447
446
  # The name of the repository into which package versions are copied.
448
447
  #
449
448
  # @option params [required, String] :format
450
- # The format of the package that is copied.
449
+ # The format of the package versions to be copied.
451
450
  #
452
451
  # @option params [String] :namespace
453
- # The namespace of the package. The package component that specifies its
454
- # namespace depends on its type. For example:
452
+ # The namespace of the package versions to be copied. The package
453
+ # version component that specifies its namespace depends on its type.
454
+ # For example:
455
455
  #
456
- # * The namespace of a Maven package is its `groupId`.
456
+ # * The namespace of a Maven package version is its `groupId`. The
457
+ # namespace is required when copying Maven package versions.
457
458
  #
458
- # * The namespace of an npm package is its `scope`.
459
+ # * The namespace of an npm package version is its `scope`.
459
460
  #
460
- # * A Python package does not contain a corresponding component, so
461
- # Python packages do not have a namespace.
461
+ # * Python and NuGet package versions do not contain a corresponding
462
+ # component, package versions of those formats do not have a
463
+ # namespace.
462
464
  #
463
465
  # @option params [required, String] :package
464
- # The name of the package that is copied.
466
+ # The name of the package that contains the versions to be copied.
465
467
  #
466
468
  # @option params [Array<String>] :versions
467
- # The versions of the package to copy.
469
+ # The versions of the package to be copied.
468
470
  #
469
471
  # <note markdown="1"> You must specify `versions` or `versionRevisions`. You cannot specify
470
472
  # both.
@@ -811,15 +813,18 @@ module Aws::CodeArtifact
811
813
  # The format of the package versions to delete.
812
814
  #
813
815
  # @option params [String] :namespace
814
- # The namespace of the package. The package component that specifies its
815
- # namespace depends on its type. For example:
816
+ # The namespace of the package versions to be deleted. The package
817
+ # version component that specifies its namespace depends on its type.
818
+ # For example:
816
819
  #
817
- # * The namespace of a Maven package is its `groupId`.
820
+ # * The namespace of a Maven package version is its `groupId`. The
821
+ # namespace is required when deleting Maven package versions.
818
822
  #
819
- # * The namespace of an npm package is its `scope`.
823
+ # * The namespace of an npm package version is its `scope`.
820
824
  #
821
- # * A Python package does not contain a corresponding component, so
822
- # Python packages do not have a namespace.
825
+ # * Python and NuGet package versions do not contain a corresponding
826
+ # component, package versions of those formats do not have a
827
+ # namespace.
823
828
  #
824
829
  # @option params [required, String] :package
825
830
  # The name of the package with the versions to delete.
@@ -1017,6 +1022,74 @@ module Aws::CodeArtifact
1017
1022
  req.send_request(options)
1018
1023
  end
1019
1024
 
1025
+ # Returns a [PackageDescription][1] object that contains information
1026
+ # about the requested package.
1027
+ #
1028
+ #
1029
+ #
1030
+ # [1]: https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDescription.html
1031
+ #
1032
+ # @option params [required, String] :domain
1033
+ # The name of the domain that contains the repository that contains the
1034
+ # package.
1035
+ #
1036
+ # @option params [String] :domain_owner
1037
+ # The 12-digit account number of the Amazon Web Services account that
1038
+ # owns the domain. It does not include dashes or spaces.
1039
+ #
1040
+ # @option params [required, String] :repository
1041
+ # The name of the repository that contains the requested package.
1042
+ #
1043
+ # @option params [required, String] :format
1044
+ # A format that specifies the type of the requested package.
1045
+ #
1046
+ # @option params [String] :namespace
1047
+ # The namespace of the requested package. The package component that
1048
+ # specifies its namespace depends on its type. For example:
1049
+ #
1050
+ # * The namespace of a Maven package is its `groupId`. The namespace is
1051
+ # required when requesting Maven packages.
1052
+ #
1053
+ # * The namespace of an npm package is its `scope`.
1054
+ #
1055
+ # * Python and NuGet packages do not contain a corresponding component,
1056
+ # packages of those formats do not have a namespace.
1057
+ #
1058
+ # @option params [required, String] :package
1059
+ # The name of the requested package.
1060
+ #
1061
+ # @return [Types::DescribePackageResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1062
+ #
1063
+ # * {Types::DescribePackageResult#package #package} => Types::PackageDescription
1064
+ #
1065
+ # @example Request syntax with placeholder values
1066
+ #
1067
+ # resp = client.describe_package({
1068
+ # domain: "DomainName", # required
1069
+ # domain_owner: "AccountId",
1070
+ # repository: "RepositoryName", # required
1071
+ # format: "npm", # required, accepts npm, pypi, maven, nuget
1072
+ # namespace: "PackageNamespace",
1073
+ # package: "PackageName", # required
1074
+ # })
1075
+ #
1076
+ # @example Response structure
1077
+ #
1078
+ # resp.package.format #=> String, one of "npm", "pypi", "maven", "nuget"
1079
+ # resp.package.namespace #=> String
1080
+ # resp.package.name #=> String
1081
+ # resp.package.origin_configuration.restrictions.publish #=> String, one of "ALLOW", "BLOCK"
1082
+ # resp.package.origin_configuration.restrictions.upstream #=> String, one of "ALLOW", "BLOCK"
1083
+ #
1084
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/DescribePackage AWS API Documentation
1085
+ #
1086
+ # @overload describe_package(params = {})
1087
+ # @param [Hash] params ({})
1088
+ def describe_package(params = {}, options = {})
1089
+ req = build_request(:describe_package, params)
1090
+ req.send_request(options)
1091
+ end
1092
+
1020
1093
  # Returns a [PackageVersionDescription][1] object that contains
1021
1094
  # information about the requested package version.
1022
1095
  #
@@ -1039,15 +1112,17 @@ module Aws::CodeArtifact
1039
1112
  # A format that specifies the type of the requested package version.
1040
1113
  #
1041
1114
  # @option params [String] :namespace
1042
- # The namespace of the package. The package component that specifies its
1043
- # namespace depends on its type. For example:
1115
+ # The namespace of the requested package version. The package version
1116
+ # component that specifies its namespace depends on its type. For
1117
+ # example:
1044
1118
  #
1045
- # * The namespace of a Maven package is its `groupId`.
1119
+ # * The namespace of a Maven package version is its `groupId`.
1046
1120
  #
1047
- # * The namespace of an npm package is its `scope`.
1121
+ # * The namespace of an npm package version is its `scope`.
1048
1122
  #
1049
- # * A Python package does not contain a corresponding component, so
1050
- # Python packages do not have a namespace.
1123
+ # * Python and NuGet package versions do not contain a corresponding
1124
+ # component, package versions of those formats do not have a
1125
+ # namespace.
1051
1126
  #
1052
1127
  # @option params [required, String] :package
1053
1128
  # The name of the requested package version.
@@ -1087,6 +1162,9 @@ module Aws::CodeArtifact
1087
1162
  # resp.package_version.licenses[0].url #=> String
1088
1163
  # resp.package_version.revision #=> String
1089
1164
  # resp.package_version.status #=> String, one of "Published", "Unfinished", "Unlisted", "Archived", "Disposed", "Deleted"
1165
+ # resp.package_version.origin.domain_entry_point.repository_name #=> String
1166
+ # resp.package_version.origin.domain_entry_point.external_connection_name #=> String
1167
+ # resp.package_version.origin.origin_type #=> String, one of "INTERNAL", "EXTERNAL", "UNKNOWN"
1090
1168
  #
1091
1169
  # @see http://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/DescribePackageVersion AWS API Documentation
1092
1170
  #
@@ -1234,15 +1312,17 @@ module Aws::CodeArtifact
1234
1312
  # dispose.
1235
1313
  #
1236
1314
  # @option params [String] :namespace
1237
- # The namespace of the package. The package component that specifies its
1238
- # namespace depends on its type. For example:
1315
+ # The namespace of the package versions to be disposed. The package
1316
+ # version component that specifies its namespace depends on its type.
1317
+ # For example:
1239
1318
  #
1240
- # * The namespace of a Maven package is its `groupId`.
1319
+ # * The namespace of a Maven package version is its `groupId`.
1241
1320
  #
1242
- # * The namespace of an npm package is its `scope`.
1321
+ # * The namespace of an npm package version is its `scope`.
1243
1322
  #
1244
- # * A Python package does not contain a corresponding component, so
1245
- # Python packages do not have a namespace.
1323
+ # * Python and NuGet package versions do not contain a corresponding
1324
+ # component, package versions of those formats do not have a
1325
+ # namespace.
1246
1326
  #
1247
1327
  # @option params [required, String] :package
1248
1328
  # The name of the package with the versions you want to dispose.
@@ -1435,15 +1515,17 @@ module Aws::CodeArtifact
1435
1515
  # requested asset file.
1436
1516
  #
1437
1517
  # @option params [String] :namespace
1438
- # The namespace of the package. The package component that specifies its
1439
- # namespace depends on its type. For example:
1518
+ # The namespace of the package version with the requested asset file.
1519
+ # The package version component that specifies its namespace depends on
1520
+ # its type. For example:
1440
1521
  #
1441
- # * The namespace of a Maven package is its `groupId`.
1522
+ # * The namespace of a Maven package version is its `groupId`.
1442
1523
  #
1443
- # * The namespace of an npm package is its `scope`.
1524
+ # * The namespace of an npm package version is its `scope`.
1444
1525
  #
1445
- # * A Python package does not contain a corresponding component, so
1446
- # Python packages do not have a namespace.
1526
+ # * Python and NuGet package versions do not contain a corresponding
1527
+ # component, package versions of those formats do not have a
1528
+ # namespace.
1447
1529
  #
1448
1530
  # @option params [required, String] :package
1449
1531
  # The name of the package that contains the requested asset.
@@ -1495,7 +1577,10 @@ module Aws::CodeArtifact
1495
1577
  req.send_request(options, &block)
1496
1578
  end
1497
1579
 
1498
- # Gets the readme file or descriptive text for a package version.
1580
+ # Gets the readme file or descriptive text for a package version. For
1581
+ # packages that do not contain a readme file, CodeArtifact extracts a
1582
+ # description from a metadata file. For example, from the
1583
+ # `<description>` element in the `pom.xml` file of a Maven package.
1499
1584
  #
1500
1585
  # The returned text might contain formatting. For example, it might
1501
1586
  # contain formatting for Markdown or reStructuredText.
@@ -1516,21 +1601,18 @@ module Aws::CodeArtifact
1516
1601
  # A format that specifies the type of the package version with the
1517
1602
  # requested readme file.
1518
1603
  #
1519
- # <note markdown="1"> Although `maven` is listed as a valid value, CodeArtifact does not
1520
- # support displaying readme files for Maven packages.
1521
- #
1522
- # </note>
1523
- #
1524
1604
  # @option params [String] :namespace
1525
- # The namespace of the package. The package component that specifies its
1526
- # namespace depends on its type. For example:
1605
+ # The namespace of the package version with the requested readme file.
1606
+ # The package version component that specifies its namespace depends on
1607
+ # its type. For example:
1527
1608
  #
1528
- # * The namespace of a Maven package is its `groupId`.
1609
+ # * The namespace of a Maven package version is its `groupId`.
1529
1610
  #
1530
- # * The namespace of an npm package is its `scope`.
1611
+ # * The namespace of an npm package version is its `scope`.
1531
1612
  #
1532
- # * A Python package does not contain a corresponding component, so
1533
- # Python packages do not have a namespace.
1613
+ # * Python and NuGet package versions do not contain a corresponding
1614
+ # component, package versions of those formats do not have a
1615
+ # namespace.
1534
1616
  #
1535
1617
  # @option params [required, String] :package
1536
1618
  # The name of the package version that contains the requested readme
@@ -1738,25 +1820,27 @@ module Aws::CodeArtifact
1738
1820
  #
1739
1821
  # @option params [required, String] :repository
1740
1822
  # The name of the repository that contains the package that contains the
1741
- # returned package version assets.
1823
+ # requested package version assets.
1742
1824
  #
1743
1825
  # @option params [required, String] :format
1744
- # The format of the package that contains the returned package version
1826
+ # The format of the package that contains the requested package version
1745
1827
  # assets.
1746
1828
  #
1747
1829
  # @option params [String] :namespace
1748
- # The namespace of the package. The package component that specifies its
1749
- # namespace depends on its type. For example:
1830
+ # The namespace of the package version that contains the requested
1831
+ # package version assets. The package version component that specifies
1832
+ # its namespace depends on its type. For example:
1750
1833
  #
1751
- # * The namespace of a Maven package is its `groupId`.
1834
+ # * The namespace of a Maven package version is its `groupId`.
1752
1835
  #
1753
- # * The namespace of an npm package is its `scope`.
1836
+ # * The namespace of an npm package version is its `scope`.
1754
1837
  #
1755
- # * A Python package does not contain a corresponding component, so
1756
- # Python packages do not have a namespace.
1838
+ # * Python and NuGet package versions do not contain a corresponding
1839
+ # component, package versions of those formats do not have a
1840
+ # namespace.
1757
1841
  #
1758
1842
  # @option params [required, String] :package
1759
- # The name of the package that contains the returned package version
1843
+ # The name of the package that contains the requested package version
1760
1844
  # assets.
1761
1845
  #
1762
1846
  # @option params [required, String] :package_version
@@ -1847,15 +1931,17 @@ module Aws::CodeArtifact
1847
1931
  # The format of the package with the requested dependencies.
1848
1932
  #
1849
1933
  # @option params [String] :namespace
1850
- # The namespace of the package. The package component that specifies its
1851
- # namespace depends on its type. For example:
1934
+ # The namespace of the package version with the requested dependencies.
1935
+ # The package version component that specifies its namespace depends on
1936
+ # its type. For example:
1852
1937
  #
1853
- # * The namespace of a Maven package is its `groupId`.
1938
+ # * The namespace of a Maven package version is its `groupId`.
1854
1939
  #
1855
- # * The namespace of an npm package is its `scope`.
1940
+ # * The namespace of an npm package version is its `scope`.
1856
1941
  #
1857
- # * A Python package does not contain a corresponding component, so
1858
- # Python packages do not have a namespace.
1942
+ # * Python and NuGet package versions do not contain a corresponding
1943
+ # component, package versions of those formats do not have a
1944
+ # namespace.
1859
1945
  #
1860
1946
  # @option params [required, String] :package
1861
1947
  # The name of the package versions' package.
@@ -1923,39 +2009,40 @@ module Aws::CodeArtifact
1923
2009
  #
1924
2010
  # @option params [required, String] :domain
1925
2011
  # The name of the domain that contains the repository that contains the
1926
- # returned package versions.
2012
+ # requested package versions.
1927
2013
  #
1928
2014
  # @option params [String] :domain_owner
1929
2015
  # The 12-digit account number of the Amazon Web Services account that
1930
2016
  # owns the domain. It does not include dashes or spaces.
1931
2017
  #
1932
2018
  # @option params [required, String] :repository
1933
- # The name of the repository that contains the package.
2019
+ # The name of the repository that contains the requested package
2020
+ # versions.
1934
2021
  #
1935
2022
  # @option params [required, String] :format
1936
- # The format of the returned packages.
2023
+ # The format of the returned package versions.
1937
2024
  #
1938
2025
  # @option params [String] :namespace
1939
- # The namespace of the package. The package component that specifies its
1940
- # namespace depends on its type. For example:
2026
+ # The namespace of the package that contains the requested package
2027
+ # versions. The package component that specifies its namespace depends
2028
+ # on its type. For example:
1941
2029
  #
1942
2030
  # * The namespace of a Maven package is its `groupId`.
1943
2031
  #
1944
2032
  # * The namespace of an npm package is its `scope`.
1945
2033
  #
1946
- # * A Python package does not contain a corresponding component, so
1947
- # Python packages do not have a namespace.
2034
+ # * Python and NuGet packages do not contain a corresponding component,
2035
+ # packages of those formats do not have a namespace.
1948
2036
  #
1949
2037
  # @option params [required, String] :package
1950
- # The name of the package for which you want to return a list of package
2038
+ # The name of the package for which you want to request package
1951
2039
  # versions.
1952
2040
  #
1953
2041
  # @option params [String] :status
1954
- # A string that specifies the status of the package versions to include
1955
- # in the returned list.
2042
+ # A string that filters the requested package versions by status.
1956
2043
  #
1957
2044
  # @option params [String] :sort_by
1958
- # How to sort the returned list of package versions.
2045
+ # How to sort the requested list of package versions.
1959
2046
  #
1960
2047
  # @option params [Integer] :max_results
1961
2048
  # The maximum number of results to return per page.
@@ -1965,6 +2052,10 @@ module Aws::CodeArtifact
1965
2052
  # previous response in the next request to retrieve the next set of
1966
2053
  # results.
1967
2054
  #
2055
+ # @option params [String] :origin_type
2056
+ # The `originType` used to filter package versions. Only package
2057
+ # versions with the provided `originType` will be returned.
2058
+ #
1968
2059
  # @return [Types::ListPackageVersionsResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1969
2060
  #
1970
2061
  # * {Types::ListPackageVersionsResult#default_display_version #default_display_version} => String
@@ -1989,6 +2080,7 @@ module Aws::CodeArtifact
1989
2080
  # sort_by: "PUBLISHED_TIME", # accepts PUBLISHED_TIME
1990
2081
  # max_results: 1,
1991
2082
  # next_token: "PaginationToken",
2083
+ # origin_type: "INTERNAL", # accepts INTERNAL, EXTERNAL, UNKNOWN
1992
2084
  # })
1993
2085
  #
1994
2086
  # @example Response structure
@@ -2001,6 +2093,9 @@ module Aws::CodeArtifact
2001
2093
  # resp.versions[0].version #=> String
2002
2094
  # resp.versions[0].revision #=> String
2003
2095
  # resp.versions[0].status #=> String, one of "Published", "Unfinished", "Unlisted", "Archived", "Disposed", "Deleted"
2096
+ # resp.versions[0].origin.domain_entry_point.repository_name #=> String
2097
+ # resp.versions[0].origin.domain_entry_point.external_connection_name #=> String
2098
+ # resp.versions[0].origin.origin_type #=> String, one of "INTERNAL", "EXTERNAL", "UNKNOWN"
2004
2099
  # resp.next_token #=> String
2005
2100
  #
2006
2101
  # @see http://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/ListPackageVersions AWS API Documentation
@@ -2021,31 +2116,33 @@ module Aws::CodeArtifact
2021
2116
  #
2022
2117
  # @option params [required, String] :domain
2023
2118
  # The name of the domain that contains the repository that contains the
2024
- # requested list of packages.
2119
+ # requested packages.
2025
2120
  #
2026
2121
  # @option params [String] :domain_owner
2027
2122
  # The 12-digit account number of the Amazon Web Services account that
2028
2123
  # owns the domain. It does not include dashes or spaces.
2029
2124
  #
2030
2125
  # @option params [required, String] :repository
2031
- # The name of the repository from which packages are to be listed.
2126
+ # The name of the repository that contains the requested packages.
2032
2127
  #
2033
2128
  # @option params [String] :format
2034
- # The format of the packages.
2129
+ # The format used to filter requested packages. Only packages from the
2130
+ # provided format will be returned.
2035
2131
  #
2036
2132
  # @option params [String] :namespace
2037
- # The namespace of the package. The package component that specifies its
2038
- # namespace depends on its type. For example:
2133
+ # The namespace used to filter requested packages. Only packages with
2134
+ # the provided namespace will be returned. The package component that
2135
+ # specifies its namespace depends on its type. For example:
2039
2136
  #
2040
2137
  # * The namespace of a Maven package is its `groupId`.
2041
2138
  #
2042
2139
  # * The namespace of an npm package is its `scope`.
2043
2140
  #
2044
- # * A Python package does not contain a corresponding component, so
2045
- # Python packages do not have a namespace.
2141
+ # * Python and NuGet packages do not contain a corresponding component,
2142
+ # packages of those formats do not have a namespace.
2046
2143
  #
2047
2144
  # @option params [String] :package_prefix
2048
- # A prefix used to filter returned packages. Only packages with names
2145
+ # A prefix used to filter requested packages. Only packages with names
2049
2146
  # that start with `packagePrefix` are returned.
2050
2147
  #
2051
2148
  # @option params [Integer] :max_results
@@ -2056,6 +2153,26 @@ module Aws::CodeArtifact
2056
2153
  # previous response in the next request to retrieve the next set of
2057
2154
  # results.
2058
2155
  #
2156
+ # @option params [String] :publish
2157
+ # The value of the `Publish` package origin control restriction used to
2158
+ # filter requested packages. Only packages with the provided restriction
2159
+ # are returned. For more information, see
2160
+ # [PackageOriginRestrictions][1].
2161
+ #
2162
+ #
2163
+ #
2164
+ # [1]: https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html
2165
+ #
2166
+ # @option params [String] :upstream
2167
+ # The value of the `Upstream` package origin control restriction used to
2168
+ # filter requested packages. Only packages with the provided restriction
2169
+ # are returned. For more information, see
2170
+ # [PackageOriginRestrictions][1].
2171
+ #
2172
+ #
2173
+ #
2174
+ # [1]: https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html
2175
+ #
2059
2176
  # @return [Types::ListPackagesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2060
2177
  #
2061
2178
  # * {Types::ListPackagesResult#packages #packages} => Array&lt;Types::PackageSummary&gt;
@@ -2074,6 +2191,8 @@ module Aws::CodeArtifact
2074
2191
  # package_prefix: "PackageName",
2075
2192
  # max_results: 1,
2076
2193
  # next_token: "PaginationToken",
2194
+ # publish: "ALLOW", # accepts ALLOW, BLOCK
2195
+ # upstream: "ALLOW", # accepts ALLOW, BLOCK
2077
2196
  # })
2078
2197
  #
2079
2198
  # @example Response structure
@@ -2082,6 +2201,8 @@ module Aws::CodeArtifact
2082
2201
  # resp.packages[0].format #=> String, one of "npm", "pypi", "maven", "nuget"
2083
2202
  # resp.packages[0].namespace #=> String
2084
2203
  # resp.packages[0].package #=> String
2204
+ # resp.packages[0].origin_configuration.restrictions.publish #=> String, one of "ALLOW", "BLOCK"
2205
+ # resp.packages[0].origin_configuration.restrictions.upstream #=> String, one of "ALLOW", "BLOCK"
2085
2206
  # resp.next_token #=> String
2086
2207
  #
2087
2208
  # @see http://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/ListPackages AWS API Documentation
@@ -2302,6 +2423,104 @@ module Aws::CodeArtifact
2302
2423
  req.send_request(options)
2303
2424
  end
2304
2425
 
2426
+ # Sets the package origin configuration for a package.
2427
+ #
2428
+ # The package origin configuration determines how new versions of a
2429
+ # package can be added to a repository. You can allow or block direct
2430
+ # publishing of new package versions, or ingestion and retaining of new
2431
+ # package versions from an external connection or upstream source. For
2432
+ # more information about package origin controls and configuration, see
2433
+ # [Editing package origin controls][1] in the *CodeArtifact User Guide*.
2434
+ #
2435
+ # `PutPackageOriginConfiguration` can be called on a package that
2436
+ # doesn't yet exist in the repository. When called on a package that
2437
+ # does not exist, a package is created in the repository with no
2438
+ # versions and the requested restrictions are set on the package. This
2439
+ # can be used to preemptively block ingesting or retaining any versions
2440
+ # from external connections or upstream repositories, or to block
2441
+ # publishing any versions of the package into the repository before
2442
+ # connecting any package managers or publishers to the repository.
2443
+ #
2444
+ #
2445
+ #
2446
+ # [1]: https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html
2447
+ #
2448
+ # @option params [required, String] :domain
2449
+ # The name of the domain that contains the repository that contains the
2450
+ # package.
2451
+ #
2452
+ # @option params [String] :domain_owner
2453
+ # The 12-digit account number of the Amazon Web Services account that
2454
+ # owns the domain. It does not include dashes or spaces.
2455
+ #
2456
+ # @option params [required, String] :repository
2457
+ # The name of the repository that contains the package.
2458
+ #
2459
+ # @option params [required, String] :format
2460
+ # A format that specifies the type of the package to be updated.
2461
+ #
2462
+ # @option params [String] :namespace
2463
+ # The namespace of the package to be updated. The package component that
2464
+ # specifies its namespace depends on its type. For example:
2465
+ #
2466
+ # * The namespace of a Maven package is its `groupId`.
2467
+ #
2468
+ # * The namespace of an npm package is its `scope`.
2469
+ #
2470
+ # * Python and NuGet packages do not contain a corresponding component,
2471
+ # packages of those formats do not have a namespace.
2472
+ #
2473
+ # @option params [required, String] :package
2474
+ # The name of the package to be updated.
2475
+ #
2476
+ # @option params [required, Types::PackageOriginRestrictions] :restrictions
2477
+ # A [PackageOriginRestrictions][1] object that contains information
2478
+ # about the `upstream` and `publish` package origin restrictions. The
2479
+ # `upstream` restriction determines if new package versions can be
2480
+ # ingested or retained from external connections or upstream
2481
+ # repositories. The `publish` restriction determines if new package
2482
+ # versions can be published directly to the repository.
2483
+ #
2484
+ # You must include both the desired `upstream` and `publish`
2485
+ # restrictions.
2486
+ #
2487
+ #
2488
+ #
2489
+ # [1]: https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html
2490
+ #
2491
+ # @return [Types::PutPackageOriginConfigurationResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2492
+ #
2493
+ # * {Types::PutPackageOriginConfigurationResult#origin_configuration #origin_configuration} => Types::PackageOriginConfiguration
2494
+ #
2495
+ # @example Request syntax with placeholder values
2496
+ #
2497
+ # resp = client.put_package_origin_configuration({
2498
+ # domain: "DomainName", # required
2499
+ # domain_owner: "AccountId",
2500
+ # repository: "RepositoryName", # required
2501
+ # format: "npm", # required, accepts npm, pypi, maven, nuget
2502
+ # namespace: "PackageNamespace",
2503
+ # package: "PackageName", # required
2504
+ # restrictions: { # required
2505
+ # publish: "ALLOW", # required, accepts ALLOW, BLOCK
2506
+ # upstream: "ALLOW", # required, accepts ALLOW, BLOCK
2507
+ # },
2508
+ # })
2509
+ #
2510
+ # @example Response structure
2511
+ #
2512
+ # resp.origin_configuration.restrictions.publish #=> String, one of "ALLOW", "BLOCK"
2513
+ # resp.origin_configuration.restrictions.upstream #=> String, one of "ALLOW", "BLOCK"
2514
+ #
2515
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/PutPackageOriginConfiguration AWS API Documentation
2516
+ #
2517
+ # @overload put_package_origin_configuration(params = {})
2518
+ # @param [Hash] params ({})
2519
+ def put_package_origin_configuration(params = {}, options = {})
2520
+ req = build_request(:put_package_origin_configuration, params)
2521
+ req.send_request(options)
2522
+ end
2523
+
2305
2524
  # Sets the resource policy on a repository that specifies permissions to
2306
2525
  # access it.
2307
2526
  #
@@ -2446,15 +2665,17 @@ module Aws::CodeArtifact
2446
2665
  # update.
2447
2666
  #
2448
2667
  # @option params [String] :namespace
2449
- # The namespace of the package. The package component that specifies its
2450
- # namespace depends on its type. For example:
2668
+ # The namespace of the package version to be updated. The package
2669
+ # version component that specifies its namespace depends on its type.
2670
+ # For example:
2451
2671
  #
2452
- # * The namespace of a Maven package is its `groupId`.
2672
+ # * The namespace of a Maven package version is its `groupId`.
2453
2673
  #
2454
- # * The namespace of an npm package is its `scope`.
2674
+ # * The namespace of an npm package version is its `scope`.
2455
2675
  #
2456
- # * A Python package does not contain a corresponding component, so
2457
- # Python packages do not have a namespace.
2676
+ # * Python and NuGet package versions do not contain a corresponding
2677
+ # component, package versions of those formats do not have a
2678
+ # namespace.
2458
2679
  #
2459
2680
  # @option params [required, String] :package
2460
2681
  # The name of the package with the version statuses to update.
@@ -2598,7 +2819,7 @@ module Aws::CodeArtifact
2598
2819
  params: params,
2599
2820
  config: config)
2600
2821
  context[:gem_name] = 'aws-sdk-codeartifact'
2601
- context[:gem_version] = '1.20.0'
2822
+ context[:gem_version] = '1.21.0'
2602
2823
  Seahorse::Client::Request.new(handlers, context)
2603
2824
  end
2604
2825