Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

update_permissions

update_permissions(**kwargs)

Updates which users in a workspace have the Grafana Admin or Editor roles.

See also: AWS API Documentation

Request Syntax

response = client.update_permissions(
    updateInstructionBatch=[
        {
            'action': 'ADD'|'REVOKE',
            'role': 'ADMIN'|'EDITOR'|'VIEWER',
            'users': [
                {
                    'id': 'string',
                    'type': 'SSO_USER'|'SSO_GROUP'
                },
            ]
        },
    ],
    workspaceId='string'
)
Parameters
  • updateInstructionBatch (list) --

    [REQUIRED]

    An array of structures that contain the permission updates to make.

    • (dict) --

      Contains the instructions for one Grafana role permission update in a UpdatePermissions operation.

      • action (string) -- [REQUIRED]

        Specifies whether this update is to add or revoke role permissions.

      • role (string) -- [REQUIRED]

        The role to add or revoke for the user or the group specified in users .

      • users (list) -- [REQUIRED]

        A structure that specifies the user or group to add or revoke the role for.

        • (dict) --

          A structure that specifies one user or group in the workspace.

          • id (string) -- [REQUIRED]

            The ID of the user or group.

            Pattern: ^([0-9a-fA-F]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$

          • type (string) -- [REQUIRED]

            Specifies whether this is a single user or a group.

  • workspaceId (string) --

    [REQUIRED]

    The ID of the workspace to update.

Return type

dict

Returns

Response Syntax

{
    'errors': [
        {
            'causedBy': {
                'action': 'ADD'|'REVOKE',
                'role': 'ADMIN'|'EDITOR'|'VIEWER',
                'users': [
                    {
                        'id': 'string',
                        'type': 'SSO_USER'|'SSO_GROUP'
                    },
                ]
            },
            'code': 123,
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • errors (list) --

      An array of structures that contain the errors from the operation, if any.

      • (dict) --

        A structure containing information about one error encountered while performing an UpdatePermissions operation.

        • causedBy (dict) --

          Specifies which permission update caused the error.

          • action (string) --

            Specifies whether this update is to add or revoke role permissions.

          • role (string) --

            The role to add or revoke for the user or the group specified in users .

          • users (list) --

            A structure that specifies the user or group to add or revoke the role for.

            • (dict) --

              A structure that specifies one user or group in the workspace.

              • id (string) --

                The ID of the user or group.

                Pattern: ^([0-9a-fA-F]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$

              • type (string) --

                Specifies whether this is a single user or a group.

        • code (integer) --

          The error code.

        • message (string) --

          The message for this error.

Exceptions

  • ManagedGrafana.Client.exceptions.ResourceNotFoundException
  • ManagedGrafana.Client.exceptions.ThrottlingException
  • ManagedGrafana.Client.exceptions.ValidationException
  • ManagedGrafana.Client.exceptions.AccessDeniedException
  • ManagedGrafana.Client.exceptions.InternalServerException