default_views
Creates, updates, deletes, gets or lists a default_views resource.
Overview
| Name | default_views |
| Type | Resource |
| Id | aws.resource_explorer_2.default_views |
Fields
The following fields are returned by SELECT queries:
- get_default_view
| Name | Datatype | Description |
|---|---|---|
view_arn | string | The Amazon resource name (ARN) of the view that is the current default for 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_default_view | select | region | Retrieves the Amazon Resource Name (ARN) of the view that is the default for the Amazon Web Services Region in which you call this operation. You can then call GetView to retrieve the details of that view. | |
associate_default_view | update | region, ViewArn | Sets the specified view as the default for the Amazon Web Services Region in which you call this operation. When a user performs a Search that doesn't explicitly specify which view to use, then Amazon Web Services Resource Explorer automatically chooses this default view for searches performed in this Amazon Web Services Region. If an Amazon Web Services Region doesn't have a default view configured, then users must explicitly specify a view with every Search operation performed in that Region. | |
disassociate_default_view | update | region | After you call this operation, the affected Amazon Web Services Region no longer has a default view. All Search operations in that Region must explicitly specify a view or the operation fails. You can configure a new default by calling the AssociateDefaultView operation. If an Amazon Web Services Region doesn't have a default view configured, then users must explicitly specify a view with every Search operation performed in that Region. |
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_default_view
Retrieves the Amazon Resource Name (ARN) of the view that is the default for the Amazon Web Services Region in which you call this operation. You can then call GetView to retrieve the details of that view.
SELECT
view_arn
FROM aws.resource_explorer_2.default_views
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- associate_default_view
- disassociate_default_view
Sets the specified view as the default for the Amazon Web Services Region in which you call this operation. When a user performs a Search that doesn't explicitly specify which view to use, then Amazon Web Services Resource Explorer automatically chooses this default view for searches performed in this Amazon Web Services Region. If an Amazon Web Services Region doesn't have a default view configured, then users must explicitly specify a view with every Search operation performed in that Region.
UPDATE aws.resource_explorer_2.default_views
SET
ViewArn = '{{ ViewArn }}'
WHERE
region = '{{ region }}' --required
AND ViewArn = '{{ ViewArn }}' --required
RETURNING
view_arn;
After you call this operation, the affected Amazon Web Services Region no longer has a default view. All Search operations in that Region must explicitly specify a view or the operation fails. You can configure a new default by calling the AssociateDefaultView operation. If an Amazon Web Services Region doesn't have a default view configured, then users must explicitly specify a view with every Search operation performed in that Region.
UPDATE aws.resource_explorer_2.default_views
SET
-- No updatable properties
WHERE
region = '{{ region }}' --required;