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

DeleteInventory

Delete a custom inventory type, or the data associated with a custom Inventory type. Deleting a custom inventory type is also referred to as deleting a custom inventory schema.

Request Syntax

{ "ClientToken": "string", "DryRun": boolean, "SchemaDeleteOption": "string", "TypeName": "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.

ClientToken

User-provided idempotency token.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: No

DryRun

Use this option to view a summary of the deletion request without deleting any data or the data type. This option is useful when you only want to understand what will be deleted. Once you validate that the data to be deleted is what you intend to delete, you can run the same command without specifying the DryRun option.

Type: Boolean

Required: No

SchemaDeleteOption

Use the SchemaDeleteOption to delete a custom inventory type (schema). If you don't choose this option, the system only deletes existing inventory data associated with the custom inventory type. Choose one of the following options:

DisableSchema: If you choose this option, the system ignores all inventory data for the specified version, and any earlier versions. To enable this schema again, you must call the PutInventory action for a version greater than the disbled version.

DeleteSchema: This option deletes the specified custom type from the Inventory service. You can recreate the schema later, if you want.

Type: String

Valid Values: DisableSchema | DeleteSchema

Required: No

TypeName

The name of the custom inventory type for which you want to delete either all previously collected data, or the inventory type itself.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^(AWS|Custom):.*$

Required: Yes

Response Syntax

{ "DeletionId": "string", "DeletionSummary": { "RemainingCount": number, "SummaryItems": [ { "Count": number, "RemainingCount": number, "Version": "string" } ], "TotalCount": number }, "TypeName": "string" }

Response Elements

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

The following data is returned in JSON format by the service.

DeletionId

Every DeleteInventory action is assigned a unique ID. This option returns a unique ID. You can use this ID to query the status of a delete operation. This option is useful for ensuring that a delete operation has completed before you begin other actions.

Type: String

DeletionSummary

A summary of the delete operation. For more information about this summary, see Understanding the Delete Inventory Summary in the AWS Systems Manager User Guide.

Type: InventoryDeletionSummary object

TypeName

The name of the inventory data type specified in the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^(AWS|Custom):.*$

Errors

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

InternalServerError

An error occurred on the server side.

HTTP Status Code: 400

InvalidDeleteInventoryParametersException

One or more of the parameters specified for the delete operation is not valid. Verify all parameters and try again.

HTTP Status Code: 400

InvalidInventoryRequestException

The request is not valid.

HTTP Status Code: 400

InvalidOptionException

The delete inventory option specified is not valid. Verify the option and try again.

HTTP Status Code: 400

InvalidTypeNameException

The parameter type name is not valid.

HTTP Status Code: 400

See Also

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