DeleteIndex - AWS Resource Explorer

DeleteIndex

Deletes the specified index and turns off AWS Resource Explorer in the specified AWS Region. When you delete an index, Resource Explorer stops discovering and indexing resources in that Region. Resource Explorer also deletes all views in that Region. These actions occur as asynchronous background tasks. You can check to see when the actions are complete by using the GetIndex operation and checking the Status response value.

Note

If the index you delete is the aggregator index for the AWS account, you must wait 24 hours before you can promote another local index to be the aggregator index for the account. Users can't perform account-wide searches using Resource Explorer until another aggregator index is configured.

Minimum permissions

To call this operation, you must have the following permissions:

Related operations

  • To turn on Resource Explorer in an AWS Region by creating an index, use CreateIndex.

  • To retrieve the details for an index and check its state or its type, use GetIndex.

  • To list all of the indexes in the AWS account, use ListIndexes.

  • To switch an index between being a local index or an aggregator index, use UpdateIndexType.

Request Syntax

POST /DeleteIndex HTTP/1.1 Content-type: application/json { "Arn": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

Arn

The Amazon resource name (ARN) of the index that you want to delete.

Type: String

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Arn": "string", "LastUpdatedAt": "string", "State": "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.

Arn

The Amazon resource name (ARN) of the index that you successfully started the deletion process.

Note

This operation is asynchronous. To check its status, call the GetIndex operation.

Type: String

LastUpdatedAt

The date and time when you last updated this index.

Type: Timestamp

State

Indicates the current state of the index.

Type: String

Valid Values: CREATING | ACTIVE | DELETING | DELETED | UPDATING

Errors

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

AccessDeniedException

The credentials that you used to call this operation don't have the minimum required permissions.

HTTP Status Code: 403

InternalServerException

The request failed because of internal service error. Try your request again later.

HTTP Status Code: 500

ResourceNotFoundException

You specified a resource that doesn't exist. Check the ID or ARN that you used to identity the resource, and try again.

HTTP Status Code: 404

ThrottlingException

The request failed because you exceeded a rate limit for this operation. For more information, see Quotas for Resource Explorer.

HTTP Status Code: 429

ValidationException

You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.

HTTP Status Code: 400

Examples

The following example deletes the Resource Explorer index in an AWS Region. In addition to specifying the ARN of the index, you must also call this operation from the Region in which the index exists. This turns off Resource Explorer in that Region, and users can no longer search for resources in that Region. You can get the ARN of the index by calling the ListIndexes operation.

Example

This example illustrates one usage of DeleteIndex.

Sample Request

POST /DeleteIndex HTTP/1.1 Host: resource-explorer-2.us-east-1.amazonaws.com X-Amz-Date: 20221101T200059Z Accept-Encoding: identity User-Agent: <UserAgentString> Content-Length: <PayloadSizeBytes> Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature> { "Arn": "arn:aws:resource-explorer-2:us-east-1:123456789012:index/EXAMPLE8-90ab-cdef-fedc-EXAMPLE11111" }

Sample Response

HTTP/1.1 200 OK Date: Tue, 01 Nov 2022 20:00:59 GMT Content-Type: application/json Content-Length: <PayloadSizeBytes> { "Arn":"arn:aws:resource-explorer-2:us-east-1:123456789012:index/EXAMPLE8-90ab-cdef-fedc-EXAMPLE11111", "State":"deleting" }

See Also

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