views
Creates, updates, deletes, gets or lists a views resource.
Overview
| Name | views |
| Type | Resource |
| Id | aws.resource_explorer_2.views |
Fields
The following fields are returned by SELECT queries:
- get_view
- list_views
| Name | Datatype | Description |
|---|---|---|
tags | object | Tag key and value pairs that are attached to the view. |
view | object | A view is a structure that defines a set of filters that provide a view into the information in the Amazon Web Services Resource Explorer index. The filters specify which information from the index is visible to the users of the view. For example, you can specify filters that include only resources that are tagged with the key "ENV" and the value "DEVELOPMENT" in the results returned by this view. You could also create a second view that includes only resources that are tagged with "ENV" and "PRODUCTION". |
| Name | Datatype | Description |
|---|---|---|
view | string | The list of views available in the Amazon Web Services Region in which you called this operation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_view | select | region | Retrieves details of the specified view. | |
list_views | select | region | Lists the Amazon resource names (ARNs) of the views available in the Amazon Web Services Region in which you call this operation. Always check the NextToken response parameter for a null value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The NextToken response parameter value is null only when there are no more results to display. | |
create_view | insert | region, ViewName | Creates a view that users can query by using the Search operation. Results from queries that you make using this view include only resources that match the view's Filters. For more information about Amazon Web Services Resource Explorer views, see Managing views in the Amazon Web Services Resource Explorer User Guide. Only the principals with an IAM identity-based policy that grants Allow to the Search action on a Resource with the Amazon resource name (ARN) of this view can Search using views you create with this operation. | |
update_view | update | region, ViewArn | Modifies some of the details of a view. You can change the filter string and the list of included properties. You can't change the name of the view. | |
delete_view | delete | region | Deletes the specified view. If the specified view is the default view for its Amazon Web Services Region, then all Search operations in that Region must explicitly specify the view to use until you configure a new default by calling the AssociateDefaultView operation. | |
batch_get_view | exec | region | Retrieves details about a list of views. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_view
- list_views
Retrieves details of the specified view.
SELECT
tags,
view
FROM aws.resource_explorer_2.views
WHERE region = '{{ region }}' -- required
;
Lists the Amazon resource names (ARNs) of the views available in the Amazon Web Services Region in which you call this operation. Always check the NextToken response parameter for a null value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The NextToken response parameter value is null only when there are no more results to display.
SELECT
view
FROM aws.resource_explorer_2.views
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_view
- Manifest
Creates a view that users can query by using the Search operation. Results from queries that you make using this view include only resources that match the view's Filters. For more information about Amazon Web Services Resource Explorer views, see Managing views in the Amazon Web Services Resource Explorer User Guide. Only the principals with an IAM identity-based policy that grants Allow to the Search action on a Resource with the Amazon resource name (ARN) of this view can Search using views you create with this operation.
INSERT INTO aws.resource_explorer_2.views (
ClientToken,
ViewName,
IncludedProperties,
Scope,
Filters,
Tags,
region
)
SELECT
'{{ ClientToken }}',
'{{ ViewName }}' /* required */,
'{{ IncludedProperties }}',
'{{ Scope }}',
'{{ Filters }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
view
;
# Description fields are for documentation purposes
- name: views
props:
- name: region
value: "{{ region }}"
description: Required parameter for the views resource.
- name: ClientToken
value: "{{ ClientToken }}"
- name: ViewName
value: "{{ ViewName }}"
- name: IncludedProperties
value:
- Name: "{{ Name }}"
- name: Scope
value: "{{ Scope }}"
- name: Filters
description: |
A search filter defines which resources can be part of a search query result set.
value:
FilterString: "{{ FilterString }}"
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_view
Modifies some of the details of a view. You can change the filter string and the list of included properties. You can't change the name of the view.
UPDATE aws.resource_explorer_2.views
SET
ViewArn = '{{ ViewArn }}',
IncludedProperties = '{{ IncludedProperties }}',
Filters = '{{ Filters }}'
WHERE
region = '{{ region }}' --required
AND ViewArn = '{{ ViewArn }}' --required
RETURNING
view;
DELETE examples
- delete_view
Deletes the specified view. If the specified view is the default view for its Amazon Web Services Region, then all Search operations in that Region must explicitly specify the view to use until you configure a new default by calling the AssociateDefaultView operation.
DELETE FROM aws.resource_explorer_2.views
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- batch_get_view
Retrieves details about a list of views.
EXEC aws.resource_explorer_2.views.batch_get_view
@region='{{ region }}' --required
@@json=
'{
"ViewArns": "{{ ViewArns }}"
}'
;