Class ProjectsResource
The "projects" collection of methods.
Inheritance
Inherited Members
Namespace: Google.Apis.CloudResourceManager.v3
Assembly: Google.Apis.CloudResourceManager.v3.dll
Syntax
public class ProjectsResource
Constructors
ProjectsResource(IClientService)
Constructs a new resource.
Declaration
public ProjectsResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Create(Project)
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.
Declaration
public virtual ProjectsResource.CreateRequest Create(Project body)
Parameters
| Type | Name | Description |
|---|---|---|
| Project | body | The body of the request. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.CreateRequest |
Delete(String)
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. This method changes the
Project's lifecycle state from ACTIVE to 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, and the Project remains visible to ListProjects.
However, you cannot update the project. After the deletion completes, the Project is not retrievable by the
GetProject, ListProjects, and SearchProjects methods. This method behaves idempotently (eg., deleting a
DELETE_REQUESTED project will not be an error, but also won't do anything). The caller must have delete
permissions for this Project.
Declaration
public virtual ProjectsResource.DeleteRequest Delete(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Required. The name of the Project (for example, |
Returns
| Type | Description |
|---|---|
| ProjectsResource.DeleteRequest |
Get(String)
Retrieves the Project identified by the specified name (for example, projects/415104041262). The caller
must have read permissions for this Project.
Declaration
public virtual ProjectsResource.GetRequest Get(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Required. The name of the project (for example, |
Returns
| Type | Description |
|---|---|
| ProjectsResource.GetRequest |
GetIamPolicy(GetIamPolicyRequest, String)
Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist.
Declaration
public virtual ProjectsResource.GetIamPolicyRequest GetIamPolicy(GetIamPolicyRequest body, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| GetIamPolicyRequest | body | The body of the request. |
| System.String | resource | REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.GetIamPolicyRequest |
List()
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.
Declaration
public virtual ProjectsResource.ListRequest List()
Returns
| Type | Description |
|---|---|
| ProjectsResource.ListRequest |
Move(MoveProjectRequest, String)
Move a Project 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.update permission on the Project and have
resourcemanager.projects.move permission on the Project's current and proposed new parent.
Declaration
public virtual ProjectsResource.MoveRequest Move(MoveProjectRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| MoveProjectRequest | body | The body of the request. |
| System.String | name | Required. The name of the project to move. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.MoveRequest |
Patch(Project, String)
Updates the attributes of the Project identified by the specified name (for example,
projects/415104041262). At present this is only useful for updating the display_name and labels. Deleting
all labels requires an update mask for labels field. The caller must have modify permissions for this
Project.
Declaration
public virtual ProjectsResource.PatchRequest Patch(Project body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| Project | body | The body of the request. |
| System.String | name | Output only. The unique resource name of the Project. It is an int64 generated number prefixed by
"projects/". Example: |
Returns
| Type | Description |
|---|---|
| ProjectsResource.PatchRequest |
Search()
Search for Projects that the caller has the resourcemanager.projects.get permission on and 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 method.
Declaration
public virtual ProjectsResource.SearchRequest Search()
Returns
| Type | Description |
|---|---|
| ProjectsResource.SearchRequest |
SetIamPolicy(SetIamPolicyRequest, String)
Sets the IAM access control policy for the specified Project. 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 via 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. + Membership changes
that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. +
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. + Calling this method requires enabling the App Engine Admin API.
Declaration
public virtual ProjectsResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| SetIamPolicyRequest | body | The body of the request. |
| System.String | resource | REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.SetIamPolicyRequest |
TestIamPermissions(TestIamPermissionsRequest, String)
Returns permissions that a caller has on the specified Project.
Declaration
public virtual ProjectsResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| TestIamPermissionsRequest | body | The body of the request. |
| System.String | resource | REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.TestIamPermissionsRequest |
Undelete(UndeleteProjectRequest, String)
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. After deletion starts, the
Project cannot be restored. The caller must have undelete permissions for this Project.
Declaration
public virtual ProjectsResource.UndeleteRequest Undelete(UndeleteProjectRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| UndeleteProjectRequest | body | The body of the request. |
| System.String | name | Required. The name of the Project (for example, |
Returns
| Type | Description |
|---|---|
| ProjectsResource.UndeleteRequest |