Documentation

Google_Service_Iam_Resource_Roles extends Google_Service_Resource
in package

The "roles" collection of methods.

Typical usage is: $iamService = new Google_Service_Iam(...); $roles = $iamService->roles;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
get()  : Google_Service_Iam_Role
Gets the definition of a Role. (roles.get)
listRoles()  : Google_Service_Iam_ListRolesResponse
Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project. (roles.listRoles)
queryGrantableRoles()  : Google_Service_Iam_QueryGrantableRolesResponse
Lists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role. (roles.queryGrantableRoles)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

get()

Gets the definition of a Role. (roles.get)

public get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Iam_Role
Parameters
$name : string

The name parameter's value depends on the target resource for the request, namely roles, projects, or organizations. Each resource type's name value format is described below: * roles.get(): roles/{ROLE_NAME}. This method returns results from all [predefined roles](/iam/docs/understanding- roles#predefined_roles) in Cloud IAM. Example request URL: https://iam.googleapis.com/v1/roles/{ROLE_NAME} * projects.roles.get(): projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}. This method returns only custom roles that have been created at the project level. Example request URL: https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}

  • [organizations.roles.get()](/iam/reference/rest/v1/organizations.roles/ge t): organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}. This method returns only custom roles that have been created at the organization level. Example request URL: https://iam.goo gleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID} Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Iam_Role

listRoles()

Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project. (roles.listRoles)

public listRoles([array<string|int, mixed> $optParams = array() ]) : Google_Service_Iam_ListRolesResponse
Parameters
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

int pageSize Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000.

opt_param

string pageToken Optional pagination token returned in an earlier ListRolesResponse.

opt_param

string parent The parent parameter's value depends on the target resource for the request, namely roles, projects, or organizations. Each resource type's parent value format is described below: * roles.list(): An empty string. This method doesn't require a resource; it simply returns all predefined roles in Cloud IAM. Example request URL: https://iam.googleapis.com/v1/roles * projects.roles.list(): projects/{PROJECT_ID}. This method lists all project-level custom roles. Example request URL: https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles * organizations .roles.list(): organizations/{ORGANIZATION_ID}. This method lists all organization-level custom roles. Example request URL: https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.

opt_param

bool showDeleted Include Roles that have been deleted.

opt_param

string view Optional view for the returned Role objects. When FULL is specified, the includedPermissions field is returned, which includes a list of all permissions in the role. The default value is BASIC, which does not return the includedPermissions field.

Return values
Google_Service_Iam_ListRolesResponse

queryGrantableRoles()

Lists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role. (roles.queryGrantableRoles)

public queryGrantableRoles(Google_Service_Iam_QueryGrantableRolesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Iam_QueryGrantableRolesResponse
Parameters
$postBody : Google_Service_Iam_QueryGrantableRolesRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Iam_QueryGrantableRolesResponse

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results