Skip to main content

indices

Creates, updates, deletes or gets an index resource or lists indices in a region

Overview

Nameindices
TypeResource
DescriptionDefinition of AWS::ResourceExplorer2::Index Resource Type
Idawscc.resourceexplorer2.indices

Fields

NameDatatypeDescription
arnstring
tagsobject
typestring
index_statestring
regionstringAWS region.

For more information, see AWS::ResourceExplorer2::Index.

Methods

NameResourceAccessible byRequired Params
create_resourceindicesINSERTType, region
delete_resourceindicesDELETEIdentifier, region
update_resourceindicesUPDATEIdentifier, PatchDocument, region
list_resourcesindices_list_onlySELECTregion
get_resourceindicesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual index.

SELECT
region,
arn,
tags,
type,
index_state
FROM awscc.resourceexplorer2.indices
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new index resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.resourceexplorer2.indices (
Type,
region
)
SELECT
'{{ type }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a index resource, using stack-deploy.

/*+ update */
UPDATE awscc.resourceexplorer2.indices
SET PatchDocument = string('{{ {
"Tags": tags,
"Type": type
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.resourceexplorer2.indices
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

To operate on the indices resource, the following permissions are required:

resource-explorer-2:CreateIndex,
resource-explorer-2:GetIndex,
resource-explorer-2:TagResource,
resource-explorer-2:UpdateIndexType,
resource-explorer-2:DeleteIndex,
iam:CreateServiceLinkedRole