access_policies
Creates, updates, deletes, gets or lists an access_policies resource.
Overview
| Name | access_policies |
| Type | Resource |
| Id | aws.iotsitewise.access_policies |
Fields
The following fields are returned by SELECT queries:
- describe_access_policy
- list_access_policies
| Name | Datatype | Description |
|---|---|---|
access_policy_arn | string | The 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_date | string (date-time) | The date the access policy was created, in Unix epoch time. |
access_policy_id | string | The 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_identity | object | Contains 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_date | string (date-time) | The date the access policy was last updated, in Unix epoch time. |
access_policy_permission | string | The access policy permission. Note that a project ADMINISTRATOR is also known as a project owner. (ADMINISTRATOR, VIEWER) |
access_policy_resource | object | Contains an IoT SiteWise Monitor resource ID for a portal or project. |
| Name | Datatype | Description |
|---|---|---|
id | string | The 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>) |
creation_date | string (date-time) | The date the access policy was created, in Unix epoch time. |
identity | object | Contains 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. |
last_update_date | string (date-time) | The date the access policy was last updated, in Unix epoch time. |
permission | string | The permissions for the access policy. Note that a project ADMINISTRATOR is also known as a project owner. (ADMINISTRATOR, VIEWER) |
resource | object | Contains an IoT SiteWise Monitor resource ID for a portal or project. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_access_policy | select | access_policy_id, region | Describes an access policy, which specifies an identity's access to an IoT SiteWise Monitor portal or project. | |
list_access_policies | select | region | identityType, identityId, resourceType, resourceId, iamArn, nextToken, maxResults | Retrieves 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_policy | insert | region, accessPolicyIdentity, accessPolicyResource, accessPolicyPermission | 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. | |
update_access_policy | update | access_policy_id, region, accessPolicyIdentity, accessPolicyResource, accessPolicyPermission | 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. | |
delete_access_policy | delete | access_policy_id, region | clientToken | 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. |
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 |
|---|---|---|
access_policy_id | string | The ID of the access policy to be deleted. |
region | string | AWS region (default: us-east-1) |
clientToken | string | A 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. |
iamArn | string | The 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. |
identityId | string | The ID of the identity. This parameter is required if you specify USER or GROUP for identityType. |
identityType | string | The type of identity (IAM Identity Center user, IAM Identity Center group, or IAM user). This parameter is required if you specify identityId. |
maxResults | integer | The maximum number of results to return for each paginated request. Default: 50 |
nextToken | string | The token to be used for the next set of paginated results. |
resourceId | string | The ID of the resource. This parameter is required if you specify resourceType. |
resourceType | string | The type of resource (portal or project). This parameter is required if you specify resourceId. |
SELECT examples
- describe_access_policy
- list_access_policies
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
;
Retrieves 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).
SELECT
id,
creation_date,
identity,
last_update_date,
permission,
resource
FROM aws.iotsitewise.access_policies
WHERE region = '{{ region }}' -- required
AND identityType = '{{ identityType }}'
AND identityId = '{{ identityId }}'
AND resourceType = '{{ resourceType }}'
AND resourceId = '{{ resourceId }}'
AND iamArn = '{{ iamArn }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_access_policy
- Manifest
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
;
# Description fields are for documentation purposes
- name: access_policies
props:
- name: region
value: "{{ region }}"
description: Required parameter for the access_policies resource.
- name: accessPolicyIdentity
description: |
Contains 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.
value:
user:
id: "{{ id }}"
group:
id: "{{ id }}"
iamUser:
arn: "{{ arn }}"
iamRole:
arn: "{{ arn }}"
- name: accessPolicyResource
description: |
Contains an IoT SiteWise Monitor resource ID for a portal or project.
value:
portal:
id: "{{ id }}"
project:
id: "{{ id }}"
- name: accessPolicyPermission
value: "{{ accessPolicyPermission }}"
valid_values: ['ADMINISTRATOR', 'VIEWER']
- name: clientToken
value: "{{ clientToken }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_access_policy
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
- delete_access_policy
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 }}'
;