Tag Manager API . accounts . user_permissions

Instance Methods

create(parent, body)

Creates a user's Account & Container access.

delete(path)

Removes a user from the account, revoking access to it and all of its containers.

get(path)

Gets a user's Account & Container access.

list(parent, pageToken=None)

List all users that have access to the account along with Account and Container user access granted to each of them.

list_next(previous_request, previous_response)

Retrieves the next page of results.

update(path, body)

Updates a user's Account & Container access.

Method Details

create(parent, body)
Creates a user's Account & Container access.

Args:
  parent: string, GTM Account's API relative path. Example: accounts/{account_id} (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents a user's permissions to an account and its container.
    "containerAccess": [ # GTM Container access permissions.
      { # Defines the Google Tag Manager Container access permissions.
        "containerId": "A String", # GTM Container ID.
        "permission": "A String", # List of Container permissions.
      },
    ],
    "path": "A String", # GTM UserPermission's API relative path.
    "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
      "permission": "A String", # Whether the user has no access, user access, or admin access to an account.
    },
    "emailAddress": "A String", # User's email address.
    "accountId": "A String", # The Account ID uniquely identifies the GTM Account.
  }


Returns:
  An object of the form:

    { # Represents a user's permissions to an account and its container.
      "containerAccess": [ # GTM Container access permissions.
        { # Defines the Google Tag Manager Container access permissions.
          "containerId": "A String", # GTM Container ID.
          "permission": "A String", # List of Container permissions.
        },
      ],
      "path": "A String", # GTM UserPermission's API relative path.
      "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
        "permission": "A String", # Whether the user has no access, user access, or admin access to an account.
      },
      "emailAddress": "A String", # User's email address.
      "accountId": "A String", # The Account ID uniquely identifies the GTM Account.
    }
delete(path)
Removes a user from the account, revoking access to it and all of its containers.

Args:
  path: string, GTM UserPermission's API relative path. Example: accounts/{account_id}/user_permissions/{user_permission_id} (required)
get(path)
Gets a user's Account & Container access.

Args:
  path: string, GTM UserPermission's API relative path. Example: accounts/{account_id}/user_permissions/{user_permission_id} (required)

Returns:
  An object of the form:

    { # Represents a user's permissions to an account and its container.
      "containerAccess": [ # GTM Container access permissions.
        { # Defines the Google Tag Manager Container access permissions.
          "containerId": "A String", # GTM Container ID.
          "permission": "A String", # List of Container permissions.
        },
      ],
      "path": "A String", # GTM UserPermission's API relative path.
      "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
        "permission": "A String", # Whether the user has no access, user access, or admin access to an account.
      },
      "emailAddress": "A String", # User's email address.
      "accountId": "A String", # The Account ID uniquely identifies the GTM Account.
    }
list(parent, pageToken=None)
List all users that have access to the account along with Account and Container user access granted to each of them.

Args:
  parent: string, GTM Accounts's API relative path. Example: accounts/{account_id} (required)
  pageToken: string, Continuation token for fetching the next page of results.

Returns:
  An object of the form:

    { # List user permissions response.
    "nextPageToken": "A String", # Continuation token for fetching the next page of results.
    "userPermission": [ # All GTM UserPermissions of a GTM Account.
      { # Represents a user's permissions to an account and its container.
          "containerAccess": [ # GTM Container access permissions.
            { # Defines the Google Tag Manager Container access permissions.
              "containerId": "A String", # GTM Container ID.
              "permission": "A String", # List of Container permissions.
            },
          ],
          "path": "A String", # GTM UserPermission's API relative path.
          "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
            "permission": "A String", # Whether the user has no access, user access, or admin access to an account.
          },
          "emailAddress": "A String", # User's email address.
          "accountId": "A String", # The Account ID uniquely identifies the GTM Account.
        },
    ],
  }
list_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
    
update(path, body)
Updates a user's Account & Container access.

Args:
  path: string, GTM UserPermission's API relative path. Example: accounts/{account_id}/user_permissions/{user_permission_id} (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents a user's permissions to an account and its container.
    "containerAccess": [ # GTM Container access permissions.
      { # Defines the Google Tag Manager Container access permissions.
        "containerId": "A String", # GTM Container ID.
        "permission": "A String", # List of Container permissions.
      },
    ],
    "path": "A String", # GTM UserPermission's API relative path.
    "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
      "permission": "A String", # Whether the user has no access, user access, or admin access to an account.
    },
    "emailAddress": "A String", # User's email address.
    "accountId": "A String", # The Account ID uniquely identifies the GTM Account.
  }


Returns:
  An object of the form:

    { # Represents a user's permissions to an account and its container.
      "containerAccess": [ # GTM Container access permissions.
        { # Defines the Google Tag Manager Container access permissions.
          "containerId": "A String", # GTM Container ID.
          "permission": "A String", # List of Container permissions.
        },
      ],
      "path": "A String", # GTM UserPermission's API relative path.
      "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
        "permission": "A String", # Whether the user has no access, user access, or admin access to an account.
      },
      "emailAddress": "A String", # User's email address.
      "accountId": "A String", # The Account ID uniquely identifies the GTM Account.
    }