IoTSiteWise / Client / list_access_policies

list_access_policies#

IoTSiteWise.Client.list_access_policies(**kwargs)#

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).

See also: AWS API Documentation

Request Syntax

response = client.list_access_policies(
    identityType='USER'|'GROUP'|'IAM',
    identityId='string',
    resourceType='PORTAL'|'PROJECT',
    resourceId='string',
    iamArn='string',
    nextToken='string',
    maxResults=123
)
Parameters:
  • 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.

  • identityId (string) – The ID of the identity. This parameter is required if you specify USER or GROUP for identityType.

  • resourceType (string) – The type of resource (portal or project). This parameter is required if you specify resourceId.

  • resourceId (string) – The ID of the resource. This parameter is required if you specify resourceType.

  • 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.

  • nextToken (string) – The token to be used for the next set of paginated results.

  • maxResults (integer) –

    The maximum number of results to return for each paginated request.

    Default: 50

Return type:

dict

Returns:

Response Syntax

{
    'accessPolicySummaries': [
        {
            'id': 'string',
            'identity': {
                'user': {
                    'id': 'string'
                },
                'group': {
                    'id': 'string'
                },
                'iamUser': {
                    'arn': 'string'
                },
                'iamRole': {
                    'arn': 'string'
                }
            },
            'resource': {
                'portal': {
                    'id': 'string'
                },
                'project': {
                    'id': 'string'
                }
            },
            'permission': 'ADMINISTRATOR'|'VIEWER',
            'creationDate': datetime(2015, 1, 1),
            'lastUpdateDate': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • accessPolicySummaries (list) –

      A list that summarizes each access policy.

      • (dict) –

        Contains an access policy that defines an identity’s access to an IoT SiteWise Monitor resource.

        • id (string) –

          The ID of the access policy.

        • identity (dict) –

          The identity (an IAM Identity Center user, an IAM Identity Center group, or an IAM user).

          • user (dict) –

            An IAM Identity Center user identity.

            • id (string) –

              The IAM Identity Center ID of the user.

          • group (dict) –

            An IAM Identity Center group identity.

            • id (string) –

              The IAM Identity Center ID of the group.

          • iamUser (dict) –

            An IAM user identity.

            • arn (string) –

              The ARN of the IAM user. For more information, see IAM ARNs in the IAM User Guide.

              Note

              If you delete the IAM user, access policies that contain this identity include an empty arn. You can delete the access policy for the IAM user that no longer exists.

          • iamRole (dict) –

            An IAM role identity.

            • arn (string) –

              The ARN of the IAM role. For more information, see IAM ARNs in the IAM User Guide.

        • resource (dict) –

          The IoT SiteWise Monitor resource (a portal or project).

          • portal (dict) –

            A portal resource.

            • id (string) –

              The ID of the portal.

          • project (dict) –

            A project resource.

            • id (string) –

              The ID of the project.

        • permission (string) –

          The permissions for the access policy. Note that a project ADMINISTRATOR is also known as a project owner.

        • creationDate (datetime) –

          The date the access policy was created, in Unix epoch time.

        • lastUpdateDate (datetime) –

          The date the access policy was last updated, in Unix epoch time.

    • nextToken (string) –

      The token for the next set of results, or null if there are no additional results.

Exceptions

  • IoTSiteWise.Client.exceptions.InvalidRequestException

  • IoTSiteWise.Client.exceptions.InternalFailureException

  • IoTSiteWise.Client.exceptions.ThrottlingException