GetIndex
Retrieves details about the AWS Resource Explorer index in the AWS Region in which you invoked the operation.
Minimum permissions
To call this operation, you must have the following permissions:
-
Action:
resource-explorer-2:GetIndex
Resource: The ARN of the index in the AWS Region in which you call this operation.
Related operations
-
To create an index in a new AWS Region, use CreateIndex.
-
To delete an index and turn off Resource Explorer in an AWS Region, use DeleteIndex.
-
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 /GetIndex HTTP/1.1
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"Arn": "string",
"CreatedAt": "string",
"LastUpdatedAt": "string",
"ReplicatingFrom": [ "string" ],
"ReplicatingTo": [ "string" ],
"State": "string",
"Tags": {
"string" : "string"
},
"Type": "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.
Type: String
- CreatedAt
-
The date and time when the index was originally created.
Type: Timestamp
- LastUpdatedAt
-
The date and time when the index was last updated.
Type: Timestamp
- ReplicatingFrom
-
This response value is present only if this index is
Type=AGGREGATOR
.A list of the AWS Regions that replicate their content to the index in this Region.
Type: Array of strings
- ReplicatingTo
-
This response value is present only if this index is
Type=LOCAL
.The AWS Region that contains the aggregator index, if one exists. If an aggregator index does exist then the Region in which you called this operation replicates its index information to the Region specified in this response value.
Type: Array of strings
- State
-
The current state of the index in this AWS Region.
Type: String
Valid Values:
CREATING | ACTIVE | DELETING | DELETED | UPDATING
- Tags
-
Tag key and value pairs that are attached to the index.
Type: String to string map
- Type
-
The type of the index in this Region. For information about the aggregator index and how it differs from a local index, see Turning on cross-Region search by creating an aggregator index.
Type: String
Valid Values:
LOCAL | AGGREGATOR
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
Example
The following example displays the details for the Resource Explorer index in the specified AWS Region. Because the specified Region contains the aggregator index for the account, it lists the two other Regions in the account that replicate data into this Region's index.
Sample Request
POST /GetIndex 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>
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",
"CreatedAt": "2022-07-12T18:59:10.503000+00:00",
"LastUpdatedAt": "2022-07-13T18:41:58.799000+00:00",
"ReplicatingFrom": [
"ap-south-1",
"us-west-2"
],
"State": "active",
"Tags": {},
"Type": "aggregator"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: