Skip to main content

access_policies

Creates, updates, deletes or gets an access_policy resource or lists access_policies in a region

Overview

Nameaccess_policies
TypeResource
DescriptionResource schema for AWS::IoTSiteWise::AccessPolicy
Idaws.iotsitewise.access_policies

Fields

NameDatatypeDescription
access_policy_idstringThe ID of the access policy.
access_policy_arnstringThe ARN of the access policy.
access_policy_identityobjectThe identity for this access policy. Choose either a user or a group but not both.
access_policy_permissionstringThe permission level for this access policy. Valid values are ADMINISTRATOR or VIEWER.
access_policy_resourceobjectThe AWS IoT SiteWise Monitor resource for this access policy. Choose either portal or project but not both.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAccessPolicyIdentity, AccessPolicyPermission, AccessPolicyResource, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all access_policies in a region.

SELECT
region,
access_policy_id,
access_policy_arn,
access_policy_identity,
access_policy_permission,
access_policy_resource
FROM aws.iotsitewise.access_policies
WHERE region = 'us-east-1';

Gets all properties from an individual access_policy.

SELECT
region,
access_policy_id,
access_policy_arn,
access_policy_identity,
access_policy_permission,
access_policy_resource
FROM aws.iotsitewise.access_policies
WHERE region = 'us-east-1' AND data__Identifier = '<AccessPolicyId>';

INSERT example

Use the following StackQL query and manifest file to create a new access_policy resource, using stack-deploy.

/*+ create */
INSERT INTO aws.iotsitewise.access_policies (
AccessPolicyIdentity,
AccessPolicyPermission,
AccessPolicyResource,
region
)
SELECT
'{{ AccessPolicyIdentity }}',
'{{ AccessPolicyPermission }}',
'{{ AccessPolicyResource }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iotsitewise.access_policies
WHERE data__Identifier = '<AccessPolicyId>'
AND region = 'us-east-1';

Permissions

To operate on the access_policies resource, the following permissions are required:

Create

iotsitewise:CreateAccessPolicy

Read

iotsitewise:DescribeAccessPolicy

Update

iotsitewise:DescribeAccessPolicy,
iotsitewise:UpdateAccessPolicy

Delete

iotsitewise:DescribeAccessPolicy,
iotsitewise:DeleteAccessPolicy

List

iotsitewise:ListAccessPolicies