dispose_package_versions
¶
dispose_package_versions(
domain: DomainName,
repository: RepositoryName,
format: PackageFormat,
package: PackageName,
versions: PackageVersionList,
*,
config_overrides: Optional[codeartifactClientConfig] = None,
domain_owner: Optional[AccountId] = None,
namespace: Optional[PackageNamespace] = None,
version_revisions: Optional[PackageVersionRevisionMap] = None,
expected_status: Optional[PackageVersionStatus] = None,
) -> DisposePackageVersionsResult
Deletes the assets in package versions and sets the package versions' status to Disposed. A disposed package version cannot be restored in your repository because its assets are deleted.
To view all disposed package versions in a repository, use ListPackageVersions and set the status parameter to Disposed.
To view information about a disposed package version, use DescribePackageVersion.
Parameters:
-
domain(DomainName) –The name of the domain that contains the repository you want to dispose.
-
domain_owner(Optional[AccountId], default:None) –The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
-
repository(RepositoryName) –The name of the repository that contains the package versions you want to dispose.
-
format(PackageFormat) –A format that specifies the type of package versions you want to dispose.
-
namespace(Optional[PackageNamespace], default:None) –The namespace of the package versions to be disposed. The package component that specifies its namespace depends on its type. For example:
The namespace is required when disposing package versions of the following formats:
-
Maven
-
Swift
-
generic
-
The namespace of a Maven package version is its
groupId. -
The namespace of an npm or Swift package version is its
scope. -
The namespace of a generic package is its
namespace. -
Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.
-
-
package(PackageName) –The name of the package with the versions you want to dispose.
-
versions(PackageVersionList) –The versions of the package you want to dispose.
-
version_revisions(Optional[PackageVersionRevisionMap], default:None) –The revisions of the package versions you want to dispose.
-
expected_status(Optional[PackageVersionStatus], default:None) –The expected status of the package version to dispose.
Raises:
-
AccessDeniedException–The operation did not succeed because of an unauthorized access attempt.
-
ConflictException–The operation did not succeed because prerequisites are not met.
-
InternalServerException–The operation did not succeed because of an error that occurred inside CodeArtifact.
-
ResourceNotFoundException–The operation did not succeed because the resource requested is not found in the service.
-
ThrottlingException–The operation did not succeed because too many requests are sent to the service.
-
ValidationException–The operation did not succeed because a parameter in the request was sent with an invalid value.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codeartifact/_services/codeartifact.py
1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 | |