views
Creates, updates, deletes or gets a view
resource or lists views
in a region
Overview
Name | views |
Type | Resource |
Description | Definition of AWS::ResourceExplorer2::View Resource Type |
Id | aws.resourceexplorer2.views |
Fields
Name | Datatype | Description |
---|---|---|
filters | object | |
included_properties | array | |
scope | string | |
tags | object | |
view_arn | string | |
view_name | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ViewName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.resourceexplorer2.views (
ViewName,
region
)
SELECT
'{{ ViewName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.resourceexplorer2.views (
Filters,
IncludedProperties,
Scope,
Tags,
ViewName,
region
)
SELECT
'{{ Filters }}',
'{{ IncludedProperties }}',
'{{ Scope }}',
'{{ Tags }}',
'{{ ViewName }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: view
props:
- name: Filters
value:
FilterString: '{{ FilterString }}'
- name: IncludedProperties
value:
- Name: '{{ Name }}'
- name: Scope
value: '{{ Scope }}'
- name: Tags
value: {}
- name: ViewName
value: '{{ ViewName }}'
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