Skip to main content

views

Creates, updates, deletes or gets a view resource or lists views in a region

Overview

Nameviews
TypeResource
DescriptionDefinition of AWS::ResourceExplorer2::View Resource Type
Idaws.resourceexplorer2.views

Fields

NameDatatypeDescription
filtersobject
included_propertiesarray
scopestring
tagsobject
view_arnstring
view_namestring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTViewName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all views in a region.

SELECT
region,
filters,
included_properties,
scope,
tags,
view_arn,
view_name
FROM aws.resourceexplorer2.views
WHERE region = 'us-east-1';

Gets all properties from an individual view.

SELECT
region,
filters,
included_properties,
scope,
tags,
view_arn,
view_name
FROM aws.resourceexplorer2.views
WHERE region = 'us-east-1' AND data__Identifier = '<ViewArn>';

INSERT example

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

/*+ create */
INSERT INTO aws.resourceexplorer2.views (
ViewName,
region
)
SELECT
'{{ ViewName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.resourceexplorer2.views
WHERE data__Identifier = '<ViewArn>'
AND region = 'us-east-1';

Permissions

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

Create

resource-explorer-2:CreateView,
resource-explorer-2:TagResource

Read

resource-explorer-2:GetView

Update

resource-explorer-2:UpdateView,
resource-explorer-2:TagResource,
resource-explorer-2:UntagResource,
resource-explorer-2:ListTagsForResource

Delete

resource-explorer-2:DeleteView,
resource-explorer-2:GetView,
resource-explorer-2:UntagResource

List

resource-explorer-2:ListViews