Skip to main content

access_policies

Creates, updates, deletes, gets or lists an access_policies resource.

Overview

Nameaccess_policies
TypeResource
Idaws.iotsitewise.access_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
access_policy_arnstringThe ARN of the access policy, which has the following format. arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId} (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-zA-Z0-9-:/_.]+$</code>)
access_policy_creation_datestring (date-time)The date the access policy was created, in Unix epoch time.
access_policy_idstringThe ID of the access policy. (pattern: <code>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>)
access_policy_identityobjectContains an identity that can access an IoT SiteWise Monitor resource. Currently, you can't use Amazon Web Services API operations to retrieve IAM Identity Center identity IDs. You can find the IAM Identity Center identity IDs in the URL of user and group pages in the IAM Identity Center console.
access_policy_last_update_datestring (date-time)The date the access policy was last updated, in Unix epoch time.
access_policy_permissionstringThe access policy permission. Note that a project ADMINISTRATOR is also known as a project owner. (ADMINISTRATOR, VIEWER)
access_policy_resourceobjectContains an IoT SiteWise Monitor resource ID for a portal or project.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_access_policyselectaccess_policy_id, regionDescribes an access policy, which specifies an identity's access to an IoT SiteWise Monitor portal or project.
list_access_policiesselectregionidentityType, identityId, resourceType, resourceId, iamArn, nextToken, maxResultsRetrieves a paginated list of access policies for an identity (an IAM Identity Center user, an IAM Identity Center group, or an IAM user) or an IoT SiteWise Monitor resource (a portal or project).
create_access_policyinsertregion, accessPolicyIdentity, accessPolicyResource, accessPolicyPermissionThe IoT SiteWise Monitor feature will no longer be open to new customers starting November 7, 2025. If you would like to use the IoT SiteWise Monitor feature, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see IoT SiteWise Monitor availability change. Creates an access policy that grants the specified identity (IAM Identity Center user, IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor portal or project resource. Support for access policies that use an SSO Group as the identity is not supported at this time.
update_access_policyupdateaccess_policy_id, region, accessPolicyIdentity, accessPolicyResource, accessPolicyPermissionThe IoT SiteWise Monitor feature will no longer be open to new customers starting November 7, 2025. If you would like to use the IoT SiteWise Monitor feature, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see IoT SiteWise Monitor availability change. Updates an existing access policy that specifies an identity's access to an IoT SiteWise Monitor portal or project resource.
delete_access_policydeleteaccess_policy_id, regionclientTokenDeletes an access policy that grants the specified identity access to the specified IoT SiteWise Monitor resource. You can use this operation to revoke access to an IoT SiteWise Monitor resource.

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.

NameDatatypeDescription
access_policy_idstringThe ID of the access policy to be deleted.
regionstringAWS region (default: us-east-1)
clientTokenstringA unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
iamArnstringThe ARN of the IAM user. For more information, see IAM ARNs in the IAM User Guide. This parameter is required if you specify IAM for identityType.
identityIdstringThe ID of the identity. This parameter is required if you specify USER or GROUP for identityType.
identityTypestringThe type of identity (IAM Identity Center user, IAM Identity Center group, or IAM user). This parameter is required if you specify identityId.
maxResultsintegerThe maximum number of results to return for each paginated request. Default: 50
nextTokenstringThe token to be used for the next set of paginated results.
resourceIdstringThe ID of the resource. This parameter is required if you specify resourceType.
resourceTypestringThe type of resource (portal or project). This parameter is required if you specify resourceId.

SELECT examples

Describes an access policy, which specifies an identity's access to an IoT SiteWise Monitor portal or project.

SELECT
access_policy_arn,
access_policy_creation_date,
access_policy_id,
access_policy_identity,
access_policy_last_update_date,
access_policy_permission,
access_policy_resource
FROM aws.iotsitewise.access_policies
WHERE access_policy_id = '{{ access_policy_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

The IoT SiteWise Monitor feature will no longer be open to new customers starting November 7, 2025. If you would like to use the IoT SiteWise Monitor feature, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see IoT SiteWise Monitor availability change. Creates an access policy that grants the specified identity (IAM Identity Center user, IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor portal or project resource. Support for access policies that use an SSO Group as the identity is not supported at this time.

INSERT INTO aws.iotsitewise.access_policies (
accessPolicyIdentity,
accessPolicyResource,
accessPolicyPermission,
clientToken,
tags,
region
)
SELECT
'{{ accessPolicyIdentity }}' /* required */,
'{{ accessPolicyResource }}' /* required */,
'{{ accessPolicyPermission }}' /* required */,
'{{ clientToken }}',
'{{ tags }}',
'{{ region }}'
RETURNING
access_policy_arn,
access_policy_id
;

UPDATE examples

The IoT SiteWise Monitor feature will no longer be open to new customers starting November 7, 2025. If you would like to use the IoT SiteWise Monitor feature, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see IoT SiteWise Monitor availability change. Updates an existing access policy that specifies an identity's access to an IoT SiteWise Monitor portal or project resource.

UPDATE aws.iotsitewise.access_policies
SET
accessPolicyIdentity = '{{ accessPolicyIdentity }}',
accessPolicyResource = '{{ accessPolicyResource }}',
accessPolicyPermission = '{{ accessPolicyPermission }}',
clientToken = '{{ clientToken }}'
WHERE
access_policy_id = '{{ access_policy_id }}' --required
AND region = '{{ region }}' --required
AND accessPolicyIdentity = '{{ accessPolicyIdentity }}' --required
AND accessPolicyResource = '{{ accessPolicyResource }}' --required
AND accessPolicyPermission = '{{ accessPolicyPermission }}' --required;

DELETE examples

Deletes an access policy that grants the specified identity access to the specified IoT SiteWise Monitor resource. You can use this operation to revoke access to an IoT SiteWise Monitor resource.

DELETE FROM aws.iotsitewise.access_policies
WHERE access_policy_id = '{{ access_policy_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;