Cloud Resource Manager v3 API - Class Projects.ProjectsClient (2.4.0)

public class Projects.ProjectsClient : ClientBase<Projects.ProjectsClient>

Reference documentation and code samples for the Cloud Resource Manager v3 API class Projects.ProjectsClient.

Client for Projects

Inheritance

object > ClientBase > ClientBaseProjectsProjectsClient > Projects.ProjectsClient

Namespace

Google.Cloud.ResourceManager.V3

Assembly

Google.Cloud.ResourceManager.V3.dll

Constructors

ProjectsClient()

protected ProjectsClient()

Protected parameterless constructor to allow creation of test doubles.

ProjectsClient(CallInvoker)

public ProjectsClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ProjectsClient(ChannelBase)

public ProjectsClient(ChannelBase channel)

Creates a new client for Projects

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ProjectsClient(ClientBaseConfiguration)

protected ProjectsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
OperationsOperationsClient

A new Operations client for the same target as this client.

CreateProject(CreateProjectRequest, CallOptions)

public virtual Operation CreateProject(CreateProjectRequest request, CallOptions options)

Request that a new project be created. The result is an Operation which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking Operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Parameters
NameDescription
requestCreateProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateProject(CreateProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation CreateProject(CreateProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Request that a new project be created. The result is an Operation which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking Operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Parameters
NameDescription
requestCreateProjectRequest

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
Operation

The response received from the server.

CreateProjectAsync(CreateProjectRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> CreateProjectAsync(CreateProjectRequest request, CallOptions options)

Request that a new project be created. The result is an Operation which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking Operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Parameters
NameDescription
requestCreateProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

CreateProjectAsync(CreateProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> CreateProjectAsync(CreateProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Request that a new project be created. The result is an Operation which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking Operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Parameters
NameDescription
requestCreateProjectRequest

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
AsyncUnaryCallOperation

The call object.

DeleteProject(DeleteProjectRequest, CallOptions)

public virtual Operation DeleteProject(DeleteProjectRequest request, CallOptions options)

Marks the project identified by the specified name (for example, projects/415104041262) for deletion.

This method will only affect the project if it has a lifecycle state of [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].

This method changes the Project's lifecycle state from [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The deletion starts at an unspecified time, at which point the Project is no longer accessible.

Until the deletion completes, you can check the lifecycle state checked by retrieving the project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the project remains visible to [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the project.

After the deletion completes, the project is not retrievable by the [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects], and [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods.

This method behaves idempotently, such that deleting a DELETE_REQUESTED project will not cause an error, but also won't do anything.

The caller must have resourcemanager.projects.delete permissions for this project.

Parameters
NameDescription
requestDeleteProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

DeleteProject(DeleteProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation DeleteProject(DeleteProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Marks the project identified by the specified name (for example, projects/415104041262) for deletion.

This method will only affect the project if it has a lifecycle state of [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].

This method changes the Project's lifecycle state from [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The deletion starts at an unspecified time, at which point the Project is no longer accessible.

Until the deletion completes, you can check the lifecycle state checked by retrieving the project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the project remains visible to [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the project.

After the deletion completes, the project is not retrievable by the [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects], and [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods.

This method behaves idempotently, such that deleting a DELETE_REQUESTED project will not cause an error, but also won't do anything.

The caller must have resourcemanager.projects.delete permissions for this project.

Parameters
NameDescription
requestDeleteProjectRequest

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
Operation

The response received from the server.

DeleteProjectAsync(DeleteProjectRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> DeleteProjectAsync(DeleteProjectRequest request, CallOptions options)

Marks the project identified by the specified name (for example, projects/415104041262) for deletion.

This method will only affect the project if it has a lifecycle state of [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].

This method changes the Project's lifecycle state from [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The deletion starts at an unspecified time, at which point the Project is no longer accessible.

Until the deletion completes, you can check the lifecycle state checked by retrieving the project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the project remains visible to [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the project.

After the deletion completes, the project is not retrievable by the [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects], and [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods.

This method behaves idempotently, such that deleting a DELETE_REQUESTED project will not cause an error, but also won't do anything.

The caller must have resourcemanager.projects.delete permissions for this project.

Parameters
NameDescription
requestDeleteProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

DeleteProjectAsync(DeleteProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> DeleteProjectAsync(DeleteProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Marks the project identified by the specified name (for example, projects/415104041262) for deletion.

This method will only affect the project if it has a lifecycle state of [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].

This method changes the Project's lifecycle state from [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The deletion starts at an unspecified time, at which point the Project is no longer accessible.

Until the deletion completes, you can check the lifecycle state checked by retrieving the project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the project remains visible to [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the project.

After the deletion completes, the project is not retrievable by the [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects], and [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods.

This method behaves idempotently, such that deleting a DELETE_REQUESTED project will not cause an error, but also won't do anything.

The caller must have resourcemanager.projects.delete permissions for this project.

Parameters
NameDescription
requestDeleteProjectRequest

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
AsyncUnaryCallOperation

The call object.

GetIamPolicy(GetIamPolicyRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallOptions options)

Returns the IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123. Permission is denied if the policy or the resource do not exist.

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)

Returns the IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123. Permission is denied if the policy or the resource do not exist.

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)

Returns the IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123. Permission is denied if the policy or the resource do not exist.

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)

Returns the IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123. Permission is denied if the policy or the resource do not exist.

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.

GetProject(GetProjectRequest, CallOptions)

public virtual Project GetProject(GetProjectRequest request, CallOptions options)

Retrieves the project identified by the specified name (for example, projects/415104041262).

The caller must have resourcemanager.projects.get permission for this project.

Parameters
NameDescription
requestGetProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Project

The response received from the server.

GetProject(GetProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual Project GetProject(GetProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the project identified by the specified name (for example, projects/415104041262).

The caller must have resourcemanager.projects.get permission for this project.

Parameters
NameDescription
requestGetProjectRequest

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
Project

The response received from the server.

GetProjectAsync(GetProjectRequest, CallOptions)

public virtual AsyncUnaryCall<Project> GetProjectAsync(GetProjectRequest request, CallOptions options)

Retrieves the project identified by the specified name (for example, projects/415104041262).

The caller must have resourcemanager.projects.get permission for this project.

Parameters
NameDescription
requestGetProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallProject

The call object.

GetProjectAsync(GetProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Project> GetProjectAsync(GetProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the project identified by the specified name (for example, projects/415104041262).

The caller must have resourcemanager.projects.get permission for this project.

Parameters
NameDescription
requestGetProjectRequest

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
AsyncUnaryCallProject

The call object.

ListProjects(ListProjectsRequest, CallOptions)

public virtual ListProjectsResponse ListProjects(ListProjectsRequest request, CallOptions options)

Lists projects that are direct children of the specified folder or organization resource. list() provides a strongly consistent view of the projects underneath the specified parent resource. list() returns projects sorted based upon the (ascending) lexical ordering of their display_name. The caller must have resourcemanager.projects.list permission on the identified parent.

Parameters
NameDescription
requestListProjectsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListProjectsResponse

The response received from the server.

ListProjects(ListProjectsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListProjectsResponse ListProjects(ListProjectsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists projects that are direct children of the specified folder or organization resource. list() provides a strongly consistent view of the projects underneath the specified parent resource. list() returns projects sorted based upon the (ascending) lexical ordering of their display_name. The caller must have resourcemanager.projects.list permission on the identified parent.

Parameters
NameDescription
requestListProjectsRequest

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
ListProjectsResponse

The response received from the server.

ListProjectsAsync(ListProjectsRequest, CallOptions)

public virtual AsyncUnaryCall<ListProjectsResponse> ListProjectsAsync(ListProjectsRequest request, CallOptions options)

Lists projects that are direct children of the specified folder or organization resource. list() provides a strongly consistent view of the projects underneath the specified parent resource. list() returns projects sorted based upon the (ascending) lexical ordering of their display_name. The caller must have resourcemanager.projects.list permission on the identified parent.

Parameters
NameDescription
requestListProjectsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListProjectsResponse

The call object.

ListProjectsAsync(ListProjectsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListProjectsResponse> ListProjectsAsync(ListProjectsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists projects that are direct children of the specified folder or organization resource. list() provides a strongly consistent view of the projects underneath the specified parent resource. list() returns projects sorted based upon the (ascending) lexical ordering of their display_name. The caller must have resourcemanager.projects.list permission on the identified parent.

Parameters
NameDescription
requestListProjectsRequest

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
AsyncUnaryCallListProjectsResponse

The call object.

MoveProject(MoveProjectRequest, CallOptions)

public virtual Operation MoveProject(MoveProjectRequest request, CallOptions options)

Move a project to another place in your resource hierarchy, under a new resource parent.

Returns an operation which can be used to track the process of the project move workflow. Upon success, the Operation.response field will be populated with the moved project.

The caller must have resourcemanager.projects.move permission on the project, on the project's current and proposed new parent.

If project has no current parent, or it currently does not have an associated organization resource, you will also need the resourcemanager.projects.setIamPolicy permission in the project.

Parameters
NameDescription
requestMoveProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

MoveProject(MoveProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation MoveProject(MoveProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Move a project to another place in your resource hierarchy, under a new resource parent.

Returns an operation which can be used to track the process of the project move workflow. Upon success, the Operation.response field will be populated with the moved project.

The caller must have resourcemanager.projects.move permission on the project, on the project's current and proposed new parent.

If project has no current parent, or it currently does not have an associated organization resource, you will also need the resourcemanager.projects.setIamPolicy permission in the project.

Parameters
NameDescription
requestMoveProjectRequest

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
Operation

The response received from the server.

MoveProjectAsync(MoveProjectRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> MoveProjectAsync(MoveProjectRequest request, CallOptions options)

Move a project to another place in your resource hierarchy, under a new resource parent.

Returns an operation which can be used to track the process of the project move workflow. Upon success, the Operation.response field will be populated with the moved project.

The caller must have resourcemanager.projects.move permission on the project, on the project's current and proposed new parent.

If project has no current parent, or it currently does not have an associated organization resource, you will also need the resourcemanager.projects.setIamPolicy permission in the project.

Parameters
NameDescription
requestMoveProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

MoveProjectAsync(MoveProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> MoveProjectAsync(MoveProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Move a project to another place in your resource hierarchy, under a new resource parent.

Returns an operation which can be used to track the process of the project move workflow. Upon success, the Operation.response field will be populated with the moved project.

The caller must have resourcemanager.projects.move permission on the project, on the project's current and proposed new parent.

If project has no current parent, or it currently does not have an associated organization resource, you will also need the resourcemanager.projects.setIamPolicy permission in the project.

Parameters
NameDescription
requestMoveProjectRequest

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
AsyncUnaryCallOperation

The call object.

NewInstance(ClientBaseConfiguration)

protected override Projects.ProjectsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
ProjectsProjectsClient
Overrides

SearchProjects(SearchProjectsRequest, CallOptions)

public virtual SearchProjectsResponse SearchProjects(SearchProjectsRequest request, CallOptions options)

Search for projects that the caller has both resourcemanager.projects.get permission on, and also satisfy the specified query.

This method returns projects in an unspecified order.

This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.

Parameters
NameDescription
requestSearchProjectsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SearchProjectsResponse

The response received from the server.

SearchProjects(SearchProjectsRequest, Metadata, DateTime?, CancellationToken)

public virtual SearchProjectsResponse SearchProjects(SearchProjectsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Search for projects that the caller has both resourcemanager.projects.get permission on, and also satisfy the specified query.

This method returns projects in an unspecified order.

This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.

Parameters
NameDescription
requestSearchProjectsRequest

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
SearchProjectsResponse

The response received from the server.

SearchProjectsAsync(SearchProjectsRequest, CallOptions)

public virtual AsyncUnaryCall<SearchProjectsResponse> SearchProjectsAsync(SearchProjectsRequest request, CallOptions options)

Search for projects that the caller has both resourcemanager.projects.get permission on, and also satisfy the specified query.

This method returns projects in an unspecified order.

This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.

Parameters
NameDescription
requestSearchProjectsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSearchProjectsResponse

The call object.

SearchProjectsAsync(SearchProjectsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SearchProjectsResponse> SearchProjectsAsync(SearchProjectsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Search for projects that the caller has both resourcemanager.projects.get permission on, and also satisfy the specified query.

This method returns projects in an unspecified order.

This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.

Parameters
NameDescription
requestSearchProjectsRequest

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
AsyncUnaryCallSearchProjectsResponse

The call object.

SetIamPolicy(SetIamPolicyRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallOptions options)

Sets the IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123.

CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings.

Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.

The following constraints apply when using setIamPolicy():

  • Project does not support allUsers and allAuthenticatedUsers as members in a Binding of a Policy.

  • The owner role can be granted to a user, serviceAccount, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization.

  • Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited using the Cloud Platform console and must accept the invitation.

  • A user cannot be granted the owner role using setIamPolicy(). The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation.

  • Invitations to grant the owner role cannot be sent using setIamPolicy(); they must be sent only using the Cloud Platform Console.

  • If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling setIamPolicy() to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an organization, you can remove all owners, potentially making the organization inaccessible.

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 IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123.

CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings.

Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.

The following constraints apply when using setIamPolicy():

  • Project does not support allUsers and allAuthenticatedUsers as members in a Binding of a Policy.

  • The owner role can be granted to a user, serviceAccount, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization.

  • Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited using the Cloud Platform console and must accept the invitation.

  • A user cannot be granted the owner role using setIamPolicy(). The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation.

  • Invitations to grant the owner role cannot be sent using setIamPolicy(); they must be sent only using the Cloud Platform Console.

  • If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling setIamPolicy() to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an organization, you can remove all owners, potentially making the organization inaccessible.

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 IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123.

CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings.

Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.

The following constraints apply when using setIamPolicy():

  • Project does not support allUsers and allAuthenticatedUsers as members in a Binding of a Policy.

  • The owner role can be granted to a user, serviceAccount, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization.

  • Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited using the Cloud Platform console and must accept the invitation.

  • A user cannot be granted the owner role using setIamPolicy(). The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation.

  • Invitations to grant the owner role cannot be sent using setIamPolicy(); they must be sent only using the Cloud Platform Console.

  • If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling setIamPolicy() to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an organization, you can remove all owners, potentially making the organization inaccessible.

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 IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123.

CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings.

Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.

The following constraints apply when using setIamPolicy():

  • Project does not support allUsers and allAuthenticatedUsers as members in a Binding of a Policy.

  • The owner role can be granted to a user, serviceAccount, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization.

  • Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited using the Cloud Platform console and must accept the invitation.

  • A user cannot be granted the owner role using setIamPolicy(). The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation.

  • Invitations to grant the owner role cannot be sent using setIamPolicy(); they must be sent only using the Cloud Platform Console.

  • If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling setIamPolicy() to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an organization, you can remove all owners, potentially making the organization inaccessible.

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 permissions that a caller has on the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123..

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 permissions that a caller has on the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123..

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 permissions that a caller has on the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123..

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 permissions that a caller has on the specified project, in the format projects/{ProjectIdOrNumber} e.g. projects/123..

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.

UndeleteProject(UndeleteProjectRequest, CallOptions)

public virtual Operation UndeleteProject(UndeleteProjectRequest request, CallOptions options)

Restores the project identified by the specified name (for example, projects/415104041262). You can only use this method for a project that has a lifecycle state of [DELETE_REQUESTED] [Projects.State.DELETE_REQUESTED]. After deletion starts, the project cannot be restored.

The caller must have resourcemanager.projects.undelete permission for this project.

Parameters
NameDescription
requestUndeleteProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

UndeleteProject(UndeleteProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation UndeleteProject(UndeleteProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Restores the project identified by the specified name (for example, projects/415104041262). You can only use this method for a project that has a lifecycle state of [DELETE_REQUESTED] [Projects.State.DELETE_REQUESTED]. After deletion starts, the project cannot be restored.

The caller must have resourcemanager.projects.undelete permission for this project.

Parameters
NameDescription
requestUndeleteProjectRequest

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
Operation

The response received from the server.

UndeleteProjectAsync(UndeleteProjectRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> UndeleteProjectAsync(UndeleteProjectRequest request, CallOptions options)

Restores the project identified by the specified name (for example, projects/415104041262). You can only use this method for a project that has a lifecycle state of [DELETE_REQUESTED] [Projects.State.DELETE_REQUESTED]. After deletion starts, the project cannot be restored.

The caller must have resourcemanager.projects.undelete permission for this project.

Parameters
NameDescription
requestUndeleteProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

UndeleteProjectAsync(UndeleteProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> UndeleteProjectAsync(UndeleteProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Restores the project identified by the specified name (for example, projects/415104041262). You can only use this method for a project that has a lifecycle state of [DELETE_REQUESTED] [Projects.State.DELETE_REQUESTED]. After deletion starts, the project cannot be restored.

The caller must have resourcemanager.projects.undelete permission for this project.

Parameters
NameDescription
requestUndeleteProjectRequest

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
AsyncUnaryCallOperation

The call object.

UpdateProject(UpdateProjectRequest, CallOptions)

public virtual Operation UpdateProject(UpdateProjectRequest request, CallOptions options)

Updates the display_name and labels of the project identified by the specified name (for example, projects/415104041262). Deleting all labels requires an update mask for labels field.

The caller must have resourcemanager.projects.update permission for this project.

Parameters
NameDescription
requestUpdateProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

UpdateProject(UpdateProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation UpdateProject(UpdateProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the display_name and labels of the project identified by the specified name (for example, projects/415104041262). Deleting all labels requires an update mask for labels field.

The caller must have resourcemanager.projects.update permission for this project.

Parameters
NameDescription
requestUpdateProjectRequest

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
Operation

The response received from the server.

UpdateProjectAsync(UpdateProjectRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> UpdateProjectAsync(UpdateProjectRequest request, CallOptions options)

Updates the display_name and labels of the project identified by the specified name (for example, projects/415104041262). Deleting all labels requires an update mask for labels field.

The caller must have resourcemanager.projects.update permission for this project.

Parameters
NameDescription
requestUpdateProjectRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

UpdateProjectAsync(UpdateProjectRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> UpdateProjectAsync(UpdateProjectRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the display_name and labels of the project identified by the specified name (for example, projects/415104041262). Deleting all labels requires an update mask for labels field.

The caller must have resourcemanager.projects.update permission for this project.

Parameters
NameDescription
requestUpdateProjectRequest

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
AsyncUnaryCallOperation

The call object.