Menu
AWS Systems Manager
API Reference (API Version 2014-11-06)

DeleteDocument

Deletes the Systems Manager document and all instance associations to the document.

Before you delete the document, we recommend that you use DeleteAssociation to disassociate all instances that are associated with the document.

Request Syntax

{
   "Name": "string"
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Name

The name of the document.

Type: String

Pattern: ^[a-zA-Z0-9_\-.]{3,128}$

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

AssociatedInstances

You must disassociate a document from all instances before you can delete it.

HTTP Status Code: 400

InternalServerError

An error occurred on the server side.

HTTP Status Code: 400

InvalidDocument

The specified document does not exist.

HTTP Status Code: 400

InvalidDocumentOperation

You attempted to delete a document while it is still shared. You must stop sharing the document before you can delete it.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: