class Organizations extends Resource (View source)

The "organizations" collection of methods.

Typical usage is:

 $cloudresourcemanagerService = new Google\Service\CloudResourceManager(...);
 $organizations = $cloudresourcemanagerService->organizations;

Methods

get(string $name, array $optParams = [])

Fetches an organization resource identified by the specified resource name.

getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for an organization resource. The policy may be empty if no such policy or resource exists. The resource field should be the organization's resource name, for example: "organizations/123".

search(array $optParams = [])

Searches organization resources that are visible to the user and satisfy the specified filter. This method returns organizations in an unspecified order.

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on an organization resource. Replaces any existing policy. The resource field should be the organization's resource name, for example: "organizations/123". Authorization requires the IAM permission resourcemanager.organizations.setIamPolicy on the specified organization. (organizations.setIamPolicy)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns the permissions that a caller has on the specified organization. The resource field should be the organization's resource name, for example: "organizations/123". There are no permissions required for making this API call. (organizations.testIamPermissions)

Details

Organization get(string $name, array $optParams = [])

Fetches an organization resource identified by the specified resource name.

(organizations.get)

Parameters

string $name

Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/[organizationId]". For example, "organizations/1234".

array $optParams

Optional parameters.

Return Value

Organization

Exceptions

Exception

Policy getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for an organization resource. The policy may be empty if no such policy or resource exists. The resource field should be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission resourcemanager.organizations.getIamPolicy on the specified organization. (organizations.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

GetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Searches organization resources that are visible to the user and satisfy the specified filter. This method returns organizations in an unspecified order.

New organizations do not necessarily appear at the end of the results, and may take a small amount of time to appear. Search will only return organizations on which the user has the permission resourcemanager.organizations.get or has super admin privileges. (organizations.search)

Parameters

array $optParams

Optional parameters.

Return Value

SearchOrganizationsResponse

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on an organization resource. Replaces any existing policy. The resource field should be the organization's resource name, for example: "organizations/123". Authorization requires the IAM permission resourcemanager.organizations.setIamPolicy on the specified organization. (organizations.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns the permissions that a caller has on the specified organization. The resource field should be the organization's resource name, for example: "organizations/123". There are no permissions required for making this API call. (organizations.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception