# Tag Manager API . accounts . permissions

## Instance Methods

Creates a user's Account & Container Permissions.

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

Gets a user's Account & Container Permissions.

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

Updates a user's Account & Container Permissions.

### Method Details

`create(accountId, body)`

    Creates a user's Account & Container Permissions.

    Args:
      accountId: string, The GTM 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": [ # List of Container permissions. Valid container permissions are: read, edit, delete, publish.
              "A String",
            ],
          },
        ],
        "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
          "permission": [ # List of Account permissions. Valid account permissions are read and manage.
            "A String",
          ],
        },
        "emailAddress": "A String", # User's email address.
        "permissionId": "A String", # Account Permission ID.
        "accountId": "A String", # GTM Account ID.
      }

    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": [ # List of Container permissions. Valid container permissions are: read, edit, delete, publish.
                "A String",
              ],
            },
          ],
          "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
            "permission": [ # List of Account permissions. Valid account permissions are read and manage.
              "A String",
            ],
          },
          "emailAddress": "A String", # User's email address.
          "permissionId": "A String", # Account Permission ID.
          "accountId": "A String", # GTM Account ID.
        }

`delete(accountId, permissionId)`

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

    Args:
      accountId: string, The GTM Account ID. (required)
      permissionId: string, The GTM User ID. (required)

`get(accountId, permissionId)`

    Gets a user's Account & Container Permissions.

    Args:
      accountId: string, The GTM Account ID. (required)
      permissionId: string, The GTM User 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": [ # List of Container permissions. Valid container permissions are: read, edit, delete, publish.
                "A String",
              ],
            },
          ],
          "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
            "permission": [ # List of Account permissions. Valid account permissions are read and manage.
              "A String",
            ],
          },
          "emailAddress": "A String", # User's email address.
          "permissionId": "A String", # Account Permission ID.
          "accountId": "A String", # GTM Account ID.
        }

`list(accountId)`

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

    Args:
      accountId: string, The GTM Account ID. @required tagmanager.accounts.permissions.list (required)

    Returns:
      An object of the form:

        { # List AccountUsers Response.
        "userAccess": [ # All GTM AccountUsers 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": [ # List of Container permissions. Valid container permissions are: read, edit, delete, publish.
                    "A String",
                  ],
                },
              ],
              "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
                "permission": [ # List of Account permissions. Valid account permissions are read and manage.
                  "A String",
                ],
              },
              "emailAddress": "A String", # User's email address.
              "permissionId": "A String", # Account Permission ID.
              "accountId": "A String", # GTM Account ID.
            },
        ],
      }

`update(accountId, permissionId, body)`

    Updates a user's Account & Container Permissions.

    Args:
      accountId: string, The GTM Account ID. (required)
      permissionId: string, The GTM User 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": [ # List of Container permissions. Valid container permissions are: read, edit, delete, publish.
              "A String",
            ],
          },
        ],
        "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
          "permission": [ # List of Account permissions. Valid account permissions are read and manage.
            "A String",
          ],
        },
        "emailAddress": "A String", # User's email address.
        "permissionId": "A String", # Account Permission ID.
        "accountId": "A String", # GTM Account ID.
      }

    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": [ # List of Container permissions. Valid container permissions are: read, edit, delete, publish.
                "A String",
              ],
            },
          ],
          "accountAccess": { # Defines the Google Tag Manager Account access permissions. # GTM Account access permissions.
            "permission": [ # List of Account permissions. Valid account permissions are read and manage.
              "A String",
            ],
          },
          "emailAddress": "A String", # User's email address.
          "permissionId": "A String", # Account Permission ID.
          "accountId": "A String", # GTM Account ID.
        }