Cloud Resource Manager v3 API - Class Organizations.OrganizationsClient (2.4.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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

OrganizationsClient(ChannelBase)

public OrganizationsClient(ChannelBase channel)

Creates a new client for Organizations

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

OrganizationsClient(ClientBaseConfiguration)

protected OrganizationsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

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
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetOrganizationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetOrganizationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetOrganizationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetOrganizationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOrganization

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
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
NameDescription
requestSearchOrganizationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSearchOrganizationsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSearchOrganizationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSearchOrganizationsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallTestIamPermissionsResponse

The call object.