Cloud Resource Manager v3 API - Class Organizations.OrganizationsClient (2.5.0)

public class Organizations.OrganizationsClient : ClientBase<Organizations.OrganizationsClient>

Reference documentation and code samples for the Cloud Resource Manager v3 API class Organizations.OrganizationsClient.

Client for Organizations

Inheritance

object > ClientBase > ClientBaseOrganizationsOrganizationsClient > Organizations.OrganizationsClient

Namespace

Google.Cloud.ResourceManager.V3

Assembly

Google.Cloud.ResourceManager.V3.dll

Constructors

OrganizationsClient()

protected OrganizationsClient()

Protected parameterless constructor to allow creation of test doubles.

OrganizationsClient(CallInvoker)

public OrganizationsClient(CallInvoker callInvoker)

Creates a new client for Organizations that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

OrganizationsClient(ChannelBase)

public OrganizationsClient(ChannelBase channel)

Creates a new client for Organizations

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

OrganizationsClient(ClientBaseConfiguration)

protected OrganizationsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

GetIamPolicy(GetIamPolicyRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallOptions options)

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.

Parameters
Name Description
request GetIamPolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Policy

The response received from the server.

GetIamPolicy(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request GetIamPolicyRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Policy

The response received from the server.

GetIamPolicyAsync(GetIamPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallOptions options)

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.

Parameters
Name Description
request GetIamPolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

GetIamPolicyAsync(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request GetIamPolicyRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

GetOrganization(GetOrganizationRequest, CallOptions)

public virtual Organization GetOrganization(GetOrganizationRequest request, CallOptions options)

Fetches an organization resource identified by the specified resource name.

Parameters
Name Description
request GetOrganizationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Organization

The response received from the server.

GetOrganization(GetOrganizationRequest, Metadata, DateTime?, CancellationToken)

public virtual Organization GetOrganization(GetOrganizationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Fetches an organization resource identified by the specified resource name.

Parameters
Name Description
request GetOrganizationRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Organization

The response received from the server.

GetOrganizationAsync(GetOrganizationRequest, CallOptions)

public virtual AsyncUnaryCall<Organization> GetOrganizationAsync(GetOrganizationRequest request, CallOptions options)

Fetches an organization resource identified by the specified resource name.

Parameters
Name Description
request GetOrganizationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOrganization

The call object.

GetOrganizationAsync(GetOrganizationRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Organization> GetOrganizationAsync(GetOrganizationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Fetches an organization resource identified by the specified resource name.

Parameters
Name Description
request GetOrganizationRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOrganization

The call object.

NewInstance(ClientBaseConfiguration)

protected override Organizations.OrganizationsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
OrganizationsOrganizationsClient
Overrides

SearchOrganizations(SearchOrganizationsRequest, CallOptions)

public virtual SearchOrganizationsResponse SearchOrganizations(SearchOrganizationsRequest request, CallOptions options)

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

Parameters
Name Description
request SearchOrganizationsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
SearchOrganizationsResponse

The response received from the server.

SearchOrganizations(SearchOrganizationsRequest, Metadata, DateTime?, CancellationToken)

public virtual SearchOrganizationsResponse SearchOrganizations(SearchOrganizationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SearchOrganizationsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
SearchOrganizationsResponse

The response received from the server.

SearchOrganizationsAsync(SearchOrganizationsRequest, CallOptions)

public virtual AsyncUnaryCall<SearchOrganizationsResponse> SearchOrganizationsAsync(SearchOrganizationsRequest request, CallOptions options)

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

Parameters
Name Description
request SearchOrganizationsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallSearchOrganizationsResponse

The call object.

SearchOrganizationsAsync(SearchOrganizationsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SearchOrganizationsResponse> SearchOrganizationsAsync(SearchOrganizationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SearchOrganizationsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallSearchOrganizationsResponse

The call object.

SetIamPolicy(SetIamPolicyRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallOptions options)

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.

Parameters
Name Description
request SetIamPolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Policy

The response received from the server.

SetIamPolicy(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request SetIamPolicyRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Policy

The response received from the server.

SetIamPolicyAsync(SetIamPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallOptions options)

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.

Parameters
Name Description
request SetIamPolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

SetIamPolicyAsync(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request SetIamPolicyRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

TestIamPermissions(TestIamPermissionsRequest, CallOptions)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallOptions options)

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.

Parameters
Name Description
request TestIamPermissionsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
TestIamPermissionsResponse

The response received from the server.

TestIamPermissions(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request TestIamPermissionsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
TestIamPermissionsResponse

The response received from the server.

TestIamPermissionsAsync(TestIamPermissionsRequest, CallOptions)

public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallOptions options)

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.

Parameters
Name Description
request TestIamPermissionsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallTestIamPermissionsResponse

The call object.

TestIamPermissionsAsync(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request TestIamPermissionsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallTestIamPermissionsResponse

The call object.