delete_parameter

ParameterStoreApi.delete_parameter(role_id, key, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Delete a parameter from the store

Deletes the SSM parameter, DynamoDB item, and related secret/ACL when the caller is allowed. Blocked when Jobs, CodeRepositories, or Datalabs still reference the parameter. User-scoped delete requires owner; global delete requires the original creator.

Parameters:
  • role_id (str) – Amorphic role ID sent for authorization. Missing this header returns AUTH-1001. (required)

  • key (str) – Full stored ParameterKey, URL-decoded (for example /adp/amorphic/pstore/user/amp-db-host). (required)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

MessageResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: DELETE /parameters/{key}

Success (HTTP 200)

Parameter deleted. Message is “Successfully deleted parameter.”

Request / response example

{
  "Message": "Successfully deleted parameter."
}

Errors

Documented error codes: IPV-1002, AUTH-1002, RTE-1001.

HTTP 400

Parameter not found, unauthorized delete, System-owned, or remaining dependents. Dependent failures include DependentResources.

Jobs or repositories still reference the parameter

{
  "Message": "Parameter has dependent jobs/code-repositories, resolve the dependency to delete the parameter.",
  "DependentResources": [
    {
      "ResourceType": "Jobs",
      "Resources": [
        {
          "JobName": "sales_etl_daily",
          "JobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        }
      ]
    }
  ]
}

Parameter does not exist

{
  "Message": "IPV-1002 - Invalid ParameterKey - /adp/amorphic/pstore/user/missing, resource not found."
}

Caller is not allowed to delete

{
  "Message": "AUTH-1002 - Only the owner can delete this user-scoped parameter."
}

HTTP 500

Uncaught backend failure. Typical Message is “RTE-1001 - {exception}.”

Request / response example

{
  "Message": "RTE-1001 - Could not complete the request. Please try again."
}