Admin SDK . roles

Instance Methods

close()

Close httplib2 connections.

delete(customer, roleId, x__xgafv=None)

Deletes a role.

get(customer, roleId, x__xgafv=None)

Retrieves a role.

insert(customer, body=None, x__xgafv=None)

Creates a role.

list(customer, maxResults=None, pageToken=None, x__xgafv=None)

Retrieves a paginated list of all the roles in a domain.

list_next(previous_request, previous_response)

Retrieves the next page of results.

patch(customer, roleId, body=None, x__xgafv=None)

Patch role via Apiary Patch Orchestration

update(customer, roleId, body=None, x__xgafv=None)

Updates a role.

Method Details

close()
Close httplib2 connections.
delete(customer, roleId, x__xgafv=None)
Deletes a role.

Args:
  customer: string, Immutable ID of the G Suite account. (required)
  roleId: string, Immutable ID of the role. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format
get(customer, roleId, x__xgafv=None)
Retrieves a role.

Args:
  customer: string, Immutable ID of the G Suite account. (required)
  roleId: string, Immutable ID of the role. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
      "kind": "admin#directory#role", # The type of the API resource. This is always admin#directory#role.
      "roleName": "A String", # Name of the role.
      "isSystemRole": True or False, # Returns true if this is a pre-defined system role.
      "roleDescription": "A String", # A short description of the role.
      "isSuperAdminRole": True or False, # Returns true if the role is a super admin role.
      "etag": "A String", # ETag of the resource.
      "roleId": "A String", # ID of the role.
      "rolePrivileges": [ # The set of privileges that are granted to this role.
        {
          "serviceId": "A String", # The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().
          "privilegeName": "A String", # The name of the privilege.
        },
      ],
    }
insert(customer, body=None, x__xgafv=None)
Creates a role.

Args:
  customer: string, Immutable ID of the G Suite account. (required)
  body: object, The request body.
    The object takes the form of:

{
    "kind": "admin#directory#role", # The type of the API resource. This is always admin#directory#role.
    "roleName": "A String", # Name of the role.
    "isSystemRole": True or False, # Returns true if this is a pre-defined system role.
    "roleDescription": "A String", # A short description of the role.
    "isSuperAdminRole": True or False, # Returns true if the role is a super admin role.
    "etag": "A String", # ETag of the resource.
    "roleId": "A String", # ID of the role.
    "rolePrivileges": [ # The set of privileges that are granted to this role.
      {
        "serviceId": "A String", # The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().
        "privilegeName": "A String", # The name of the privilege.
      },
    ],
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
      "kind": "admin#directory#role", # The type of the API resource. This is always admin#directory#role.
      "roleName": "A String", # Name of the role.
      "isSystemRole": True or False, # Returns true if this is a pre-defined system role.
      "roleDescription": "A String", # A short description of the role.
      "isSuperAdminRole": True or False, # Returns true if the role is a super admin role.
      "etag": "A String", # ETag of the resource.
      "roleId": "A String", # ID of the role.
      "rolePrivileges": [ # The set of privileges that are granted to this role.
        {
          "serviceId": "A String", # The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().
          "privilegeName": "A String", # The name of the privilege.
        },
      ],
    }
list(customer, maxResults=None, pageToken=None, x__xgafv=None)
Retrieves a paginated list of all the roles in a domain.

Args:
  customer: string, Immutable ID of the G Suite account. (required)
  maxResults: integer, Maximum number of results to return.
  pageToken: string, Token to specify the next page in the list.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
    "nextPageToken": "A String",
    "items": [ # A list of Role resources.
      {
          "kind": "admin#directory#role", # The type of the API resource. This is always admin#directory#role.
          "roleName": "A String", # Name of the role.
          "isSystemRole": True or False, # Returns true if this is a pre-defined system role.
          "roleDescription": "A String", # A short description of the role.
          "isSuperAdminRole": True or False, # Returns true if the role is a super admin role.
          "etag": "A String", # ETag of the resource.
          "roleId": "A String", # ID of the role.
          "rolePrivileges": [ # The set of privileges that are granted to this role.
            {
              "serviceId": "A String", # The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().
              "privilegeName": "A String", # The name of the privilege.
            },
          ],
        },
    ],
    "kind": "admin#directory#roles", # The type of the API resource. This is always admin#directory#roles.
    "etag": "A String", # ETag of the resource.
  }
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.
    
patch(customer, roleId, body=None, x__xgafv=None)
Patch role via Apiary Patch Orchestration

Args:
  customer: string, Immutable ID of the G Suite account. (required)
  roleId: string, Immutable ID of the role. (required)
  body: object, The request body.
    The object takes the form of:

{
    "kind": "admin#directory#role", # The type of the API resource. This is always admin#directory#role.
    "roleName": "A String", # Name of the role.
    "isSystemRole": True or False, # Returns true if this is a pre-defined system role.
    "roleDescription": "A String", # A short description of the role.
    "isSuperAdminRole": True or False, # Returns true if the role is a super admin role.
    "etag": "A String", # ETag of the resource.
    "roleId": "A String", # ID of the role.
    "rolePrivileges": [ # The set of privileges that are granted to this role.
      {
        "serviceId": "A String", # The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().
        "privilegeName": "A String", # The name of the privilege.
      },
    ],
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
      "kind": "admin#directory#role", # The type of the API resource. This is always admin#directory#role.
      "roleName": "A String", # Name of the role.
      "isSystemRole": True or False, # Returns true if this is a pre-defined system role.
      "roleDescription": "A String", # A short description of the role.
      "isSuperAdminRole": True or False, # Returns true if the role is a super admin role.
      "etag": "A String", # ETag of the resource.
      "roleId": "A String", # ID of the role.
      "rolePrivileges": [ # The set of privileges that are granted to this role.
        {
          "serviceId": "A String", # The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().
          "privilegeName": "A String", # The name of the privilege.
        },
      ],
    }
update(customer, roleId, body=None, x__xgafv=None)
Updates a role.

Args:
  customer: string, Immutable ID of the G Suite account. (required)
  roleId: string, Immutable ID of the role. (required)
  body: object, The request body.
    The object takes the form of:

{
    "kind": "admin#directory#role", # The type of the API resource. This is always admin#directory#role.
    "roleName": "A String", # Name of the role.
    "isSystemRole": True or False, # Returns true if this is a pre-defined system role.
    "roleDescription": "A String", # A short description of the role.
    "isSuperAdminRole": True or False, # Returns true if the role is a super admin role.
    "etag": "A String", # ETag of the resource.
    "roleId": "A String", # ID of the role.
    "rolePrivileges": [ # The set of privileges that are granted to this role.
      {
        "serviceId": "A String", # The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().
        "privilegeName": "A String", # The name of the privilege.
      },
    ],
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
      "kind": "admin#directory#role", # The type of the API resource. This is always admin#directory#role.
      "roleName": "A String", # Name of the role.
      "isSystemRole": True or False, # Returns true if this is a pre-defined system role.
      "roleDescription": "A String", # A short description of the role.
      "isSuperAdminRole": True or False, # Returns true if the role is a super admin role.
      "etag": "A String", # ETag of the resource.
      "roleId": "A String", # ID of the role.
      "rolePrivileges": [ # The set of privileges that are granted to this role.
        {
          "serviceId": "A String", # The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list().
          "privilegeName": "A String", # The name of the privilege.
        },
      ],
    }