Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Deletes one or more versions of a package. A deleted package version
cannot be restored in your repository. If you want to remove a package
version from your repository and be able to restore it later, set its
status to Archived
. Archived packages cannot be downloaded from a
repository and don't show up with list package APIs (for example,
ListackageVersions),
but you can restore them using
UpdatePackageVersionsStatus.
Synopsis
- data DeletePackageVersions = DeletePackageVersions' {
- expectedStatus :: Maybe PackageVersionStatus
- namespace :: Maybe Text
- domainOwner :: Maybe Text
- domain :: Text
- repository :: Text
- format :: PackageFormat
- package :: Text
- versions :: [Text]
- newDeletePackageVersions :: Text -> Text -> PackageFormat -> Text -> DeletePackageVersions
- deletePackageVersions_expectedStatus :: Lens' DeletePackageVersions (Maybe PackageVersionStatus)
- deletePackageVersions_namespace :: Lens' DeletePackageVersions (Maybe Text)
- deletePackageVersions_domainOwner :: Lens' DeletePackageVersions (Maybe Text)
- deletePackageVersions_domain :: Lens' DeletePackageVersions Text
- deletePackageVersions_repository :: Lens' DeletePackageVersions Text
- deletePackageVersions_format :: Lens' DeletePackageVersions PackageFormat
- deletePackageVersions_package :: Lens' DeletePackageVersions Text
- deletePackageVersions_versions :: Lens' DeletePackageVersions [Text]
- data DeletePackageVersionsResponse = DeletePackageVersionsResponse' {}
- newDeletePackageVersionsResponse :: Int -> DeletePackageVersionsResponse
- deletePackageVersionsResponse_failedVersions :: Lens' DeletePackageVersionsResponse (Maybe (HashMap Text PackageVersionError))
- deletePackageVersionsResponse_successfulVersions :: Lens' DeletePackageVersionsResponse (Maybe (HashMap Text SuccessfulPackageVersionInfo))
- deletePackageVersionsResponse_httpStatus :: Lens' DeletePackageVersionsResponse Int
Creating a Request
data DeletePackageVersions Source #
See: newDeletePackageVersions
smart constructor.
DeletePackageVersions' | |
|
Instances
newDeletePackageVersions Source #
:: Text | |
-> Text | |
-> PackageFormat | |
-> Text | |
-> DeletePackageVersions |
Create a value of DeletePackageVersions
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:expectedStatus:DeletePackageVersions'
, deletePackageVersions_expectedStatus
- The expected status of the package version to delete. Valid values are:
Published
Unfinished
Unlisted
Archived
Disposed
$sel:namespace:DeletePackageVersions'
, deletePackageVersions_namespace
- The namespace of the package. The package component that specifies its
namespace depends on its type. For example:
- The namespace of a Maven package is its
groupId
. - The namespace of an npm package is its
scope
. - A Python package does not contain a corresponding component, so Python packages do not have a namespace.
$sel:domainOwner:DeletePackageVersions'
, deletePackageVersions_domainOwner
- The 12-digit account number of the AWS account that owns the domain. It
does not include dashes or spaces.
$sel:domain:DeletePackageVersions'
, deletePackageVersions_domain
- The name of the domain that contains the package to delete.
$sel:repository:DeletePackageVersions'
, deletePackageVersions_repository
- The name of the repository that contains the package versions to delete.
$sel:format:DeletePackageVersions'
, deletePackageVersions_format
- The format of the package versions to delete. The valid values are:
npm
pypi
maven
$sel:package:DeletePackageVersions'
, deletePackageVersions_package
- The name of the package with the versions to delete.
$sel:versions:DeletePackageVersions'
, deletePackageVersions_versions
- An array of strings that specify the versions of the package to delete.
Request Lenses
deletePackageVersions_expectedStatus :: Lens' DeletePackageVersions (Maybe PackageVersionStatus) Source #
The expected status of the package version to delete. Valid values are:
Published
Unfinished
Unlisted
Archived
Disposed
deletePackageVersions_namespace :: Lens' DeletePackageVersions (Maybe Text) Source #
The namespace of the package. The package component that specifies its namespace depends on its type. For example:
- The namespace of a Maven package is its
groupId
. - The namespace of an npm package is its
scope
. - A Python package does not contain a corresponding component, so Python packages do not have a namespace.
deletePackageVersions_domainOwner :: Lens' DeletePackageVersions (Maybe Text) Source #
The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
deletePackageVersions_domain :: Lens' DeletePackageVersions Text Source #
The name of the domain that contains the package to delete.
deletePackageVersions_repository :: Lens' DeletePackageVersions Text Source #
The name of the repository that contains the package versions to delete.
deletePackageVersions_format :: Lens' DeletePackageVersions PackageFormat Source #
The format of the package versions to delete. The valid values are:
npm
pypi
maven
deletePackageVersions_package :: Lens' DeletePackageVersions Text Source #
The name of the package with the versions to delete.
deletePackageVersions_versions :: Lens' DeletePackageVersions [Text] Source #
An array of strings that specify the versions of the package to delete.
Destructuring the Response
data DeletePackageVersionsResponse Source #
See: newDeletePackageVersionsResponse
smart constructor.
DeletePackageVersionsResponse' | |
|
Instances
newDeletePackageVersionsResponse Source #
Create a value of DeletePackageVersionsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:failedVersions:DeletePackageVersionsResponse'
, deletePackageVersionsResponse_failedVersions
- A PackageVersionError
object that contains a map of errors codes for
the deleted package that failed. The possible error codes are:
ALREADY_EXISTS
MISMATCHED_REVISION
MISMATCHED_STATUS
NOT_ALLOWED
NOT_FOUND
SKIPPED
$sel:successfulVersions:DeletePackageVersionsResponse'
, deletePackageVersionsResponse_successfulVersions
- A list of the package versions that were successfully deleted.
$sel:httpStatus:DeletePackageVersionsResponse'
, deletePackageVersionsResponse_httpStatus
- The response's http status code.
Response Lenses
deletePackageVersionsResponse_failedVersions :: Lens' DeletePackageVersionsResponse (Maybe (HashMap Text PackageVersionError)) Source #
A PackageVersionError
object that contains a map of errors codes for
the deleted package that failed. The possible error codes are:
ALREADY_EXISTS
MISMATCHED_REVISION
MISMATCHED_STATUS
NOT_ALLOWED
NOT_FOUND
SKIPPED
deletePackageVersionsResponse_successfulVersions :: Lens' DeletePackageVersionsResponse (Maybe (HashMap Text SuccessfulPackageVersionInfo)) Source #
A list of the package versions that were successfully deleted.
deletePackageVersionsResponse_httpStatus :: Lens' DeletePackageVersionsResponse Int Source #
The response's http status code.