default_view_associations
Creates, updates, deletes or gets a default_view_association
resource or lists default_view_associations
in a region
Overview
Name | default_view_associations |
Type | Resource |
Description | Definition of AWS::ResourceExplorer2::DefaultViewAssociation Resource Type |
Id | aws.resourceexplorer2.default_view_associations |
Fields
Name | Datatype | Description |
---|---|---|
view_arn | string | |
associated_aws_principal | string | The AWS principal that the default view is associated with, used as the unique identifier for this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ViewArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all properties from an individual default_view_association
.
SELECT
region,
view_arn,
associated_aws_principal
FROM aws.resourceexplorer2.default_view_associations
WHERE region = 'us-east-1' AND data__Identifier = '<AssociatedAwsPrincipal>';
INSERT
example
Use the following StackQL query and manifest file to create a new default_view_association
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.resourceexplorer2.default_view_associations (
ViewArn,
region
)
SELECT
'{{ ViewArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.resourceexplorer2.default_view_associations (
ViewArn,
region
)
SELECT
'{{ ViewArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: default_view_association
props:
- name: ViewArn
value: '{{ ViewArn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.resourceexplorer2.default_view_associations
WHERE data__Identifier = '<AssociatedAwsPrincipal>'
AND region = 'us-east-1';
Permissions
To operate on the default_view_associations
resource, the following permissions are required:
Create
resource-explorer-2:GetDefaultView,
resource-explorer-2:AssociateDefaultView
Update
resource-explorer-2:GetDefaultView,
resource-explorer-2:AssociateDefaultView
Read
resource-explorer-2:GetDefaultView
Delete
resource-explorer-2:GetDefaultView,
resource-explorer-2:DisassociateDefaultView