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 | awscc.resourceexplorer2.views |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
filters | object | |
included_properties | array | |
scope | string | |
tags | object | |
view_arn | string | |
view_name | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
view_arn | string | |
region | string | AWS region. |
For more information, see AWS::ResourceExplorer2::View.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | views | INSERT | ViewName, region |
delete_resource | views | DELETE | Identifier, region |
update_resource | views | UPDATE | Identifier, PatchDocument, region |
list_resources | views_list_only | SELECT | region |
get_resource | views | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual view.
SELECT
region,
filters,
included_properties,
scope,
tags,
view_arn,
view_name
FROM awscc.resourceexplorer2.views
WHERE
region = 'us-east-1' AND
Identifier = '{{ view_arn }}';
Lists all views in a region.
SELECT
region,
view_arn
FROM awscc.resourceexplorer2.views_list_only
WHERE
region = 'us-east-1';
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 awscc.resourceexplorer2.views (
ViewName,
region
)
SELECT
'{{ view_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.resourceexplorer2.views (
Filters,
IncludedProperties,
Scope,
Tags,
ViewName,
region
)
SELECT
'{{ filters }}',
'{{ included_properties }}',
'{{ scope }}',
'{{ tags }}',
'{{ view_name }}',
'{{ 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:
filter_string: '{{ filter_string }}'
- name: included_properties
value:
- name: '{{ name }}'
- name: scope
value: '{{ scope }}'
- name: tags
value: {}
- name: view_name
value: '{{ view_name }}'
UPDATE example
Use the following StackQL query and manifest file to update a view resource, using stack-deploy.
/*+ update */
UPDATE awscc.resourceexplorer2.views
SET PatchDocument = string('{{ {
"Filters": filters,
"IncludedProperties": included_properties,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ view_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.resourceexplorer2.views
WHERE
Identifier = '{{ view_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the views resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
resource-explorer-2:CreateView,
resource-explorer-2:TagResource
resource-explorer-2:GetView
resource-explorer-2:UpdateView,
resource-explorer-2:TagResource,
resource-explorer-2:UntagResource,
resource-explorer-2:ListTagsForResource
resource-explorer-2:DeleteView,
resource-explorer-2:GetView,
resource-explorer-2:UntagResource
resource-explorer-2:ListViews