# Google Identity and Access Management (IAM) API . roles

## Instance Methods

Queries roles that can be granted on a particular resource. A role is grantable if it can be used as the role in a binding for a policy for that resource.

### Method Details

`queryGrantableRoles(body, x__xgafv=None)`

    Queries roles that can be granted on a particular resource. A role is grantable if it can be used as the role in a binding for a policy for that resource.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # The grantable role query request.
        "fullResourceName": "A String", # Required. The full resource name to query from the list of grantable roles. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`.
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # The grantable role query response.
        "roles": [ # The list of matching roles.
          { # A role in the Identity and Access Management API.
            "description": "A String", # Optional. A human-readable description for the role.
            "name": "A String", # The name of the role. When Role is used in CreateRole, the role name must not be set. When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for curated roles and organizations/{organization-id}/roles/logging.viewer for custom roles.
            "title": "A String", # Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes.
          },
        ],
      }