|
class | ClearOrgPolicyRequest |
| Clears a Policy from a resource. More...
|
|
class | CreateRequest |
| 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. More...
|
|
class | DeleteRequest |
| Marks the Project identified by the specified project_id (for example, my-project-123 ) for deletion. This method will only affect the Project if it has a lifecycle state of ACTIVE. More...
|
|
class | GetAncestryRequest |
| Gets a list of ancestors in the resource hierarchy for the Project identified by the specified project_id (for example, my-project-123 ). More...
|
|
class | GetEffectiveOrgPolicyRequest |
| Gets the effective Policy on a resource. This is the result of merging Policies in the resource hierarchy. The returned Policy will not have an etag set because it is a computed Policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded. More...
|
|
class | GetIamPolicyRequest |
| Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist. More...
|
|
class | GetOrgPolicyRequest |
| Gets a Policy on a resource. More...
|
|
class | GetRequest |
| Retrieves the Project identified by the specified project_id (for example, my-project-123 ). More...
|
|
class | ListAvailableOrgPolicyConstraintsRequest |
| Lists Constraints that could be applied on the specified resource. More...
|
|
class | ListOrgPoliciesRequest |
| Lists all the Policies set for a particular resource. More...
|
|
class | ListRequest |
| Lists Projects that the caller has the resourcemanager.projects.get permission on and satisfy the specified filter. More...
|
|
class | SetIamPolicyRequest |
| Sets the IAM access control policy for the specified Project. Overwrites any existing policy. More...
|
|
class | SetOrgPolicyRequest |
| Updates the specified Policy on the resource. Creates a new Policy for that Constraint on the resource if one does not exist. More...
|
|
class | TestIamPermissionsRequest |
| Returns permissions that a caller has on the specified Project. More...
|
|
class | UndeleteRequest |
| Restores the Project identified by the specified project_id (for example, my-project-123 ). 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. More...
|
|
class | UpdateRequest |
| Updates the attributes of the Project identified by the specified project_id (for example, my- project-123 ). More...
|
|
|
| ProjectsResource (Google.Apis.Services.IClientService service) |
| Constructs a new resource. More...
|
|
virtual ClearOrgPolicyRequest | ClearOrgPolicy (Google.Apis.CloudResourceManager.v1.Data.ClearOrgPolicyRequest body, string resource) |
| Clears a Policy from a resource. More...
|
|
virtual CreateRequest | Create (Google.Apis.CloudResourceManager.v1.Data.Project body) |
| 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. More...
|
|
virtual DeleteRequest | Delete (string projectId) |
| Marks the Project identified by the specified project_id (for example, my-project-123 ) for deletion. This method will only affect the Project if it has a lifecycle state of ACTIVE. More...
|
|
virtual GetRequest | Get (string projectId) |
| Retrieves the Project identified by the specified project_id (for example, my-project-123 ). More...
|
|
virtual GetAncestryRequest | GetAncestry (Google.Apis.CloudResourceManager.v1.Data.GetAncestryRequest body, string projectId) |
| Gets a list of ancestors in the resource hierarchy for the Project identified by the specified project_id (for example, my-project-123 ). More...
|
|
virtual GetEffectiveOrgPolicyRequest | GetEffectiveOrgPolicy (Google.Apis.CloudResourceManager.v1.Data.GetEffectiveOrgPolicyRequest body, string resource) |
| Gets the effective Policy on a resource. This is the result of merging Policies in the resource hierarchy. The returned Policy will not have an etag set because it is a computed Policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded. More...
|
|
virtual GetIamPolicyRequest | GetIamPolicy (Google.Apis.CloudResourceManager.v1.Data.GetIamPolicyRequest body, string resource) |
| Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist. More...
|
|
virtual GetOrgPolicyRequest | GetOrgPolicy (Google.Apis.CloudResourceManager.v1.Data.GetOrgPolicyRequest body, string resource) |
| Gets a Policy on a resource. More...
|
|
virtual ListRequest | List () |
| Lists Projects that the caller has the resourcemanager.projects.get permission on and satisfy the specified filter. More...
|
|
virtual ListAvailableOrgPolicyConstraintsRequest | ListAvailableOrgPolicyConstraints (Google.Apis.CloudResourceManager.v1.Data.ListAvailableOrgPolicyConstraintsRequest body, string resource) |
| Lists Constraints that could be applied on the specified resource. More...
|
|
virtual ListOrgPoliciesRequest | ListOrgPolicies (Google.Apis.CloudResourceManager.v1.Data.ListOrgPoliciesRequest body, string resource) |
| Lists all the Policies set for a particular resource. More...
|
|
virtual SetIamPolicyRequest | SetIamPolicy (Google.Apis.CloudResourceManager.v1.Data.SetIamPolicyRequest body, string resource) |
| Sets the IAM access control policy for the specified Project. Overwrites any existing policy. More...
|
|
virtual SetOrgPolicyRequest | SetOrgPolicy (Google.Apis.CloudResourceManager.v1.Data.SetOrgPolicyRequest body, string resource) |
| Updates the specified Policy on the resource. Creates a new Policy for that Constraint on the resource if one does not exist. More...
|
|
virtual TestIamPermissionsRequest | TestIamPermissions (Google.Apis.CloudResourceManager.v1.Data.TestIamPermissionsRequest body, string resource) |
| Returns permissions that a caller has on the specified Project. More...
|
|
virtual UndeleteRequest | Undelete (Google.Apis.CloudResourceManager.v1.Data.UndeleteProjectRequest body, string projectId) |
| Restores the Project identified by the specified project_id (for example, my-project-123 ). 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. More...
|
|
virtual UpdateRequest | Update (Google.Apis.CloudResourceManager.v1.Data.Project body, string projectId) |
| Updates the attributes of the Project identified by the specified project_id (for example, my- project-123 ). More...
|
|
The "projects" collection of methods.
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.
Authorization requires the Google IAM permission resourcemanager.projects.create
on the specified parent for the new project. The parent is identified by a specified ResourceId, which must include both an ID and a type, such as organization.
This method does not associate the new project with a billing account. You can set or update the billing account associated with a project using the projects.updateBillingInfo
method.
- Parameters
-
body | The body of the request. |
virtual DeleteRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.Delete |
( |
string |
projectId | ) |
|
|
inlinevirtual |
Marks the Project identified by the specified project_id
(for example, my-project-123
) 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 and ListProjects methods.
The caller must have modify permissions for this Project.
- Parameters
-
projectId | The Project ID (for example, foo-bar-123 ). |
Required.
virtual ListRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.List |
( |
| ) |
|
|
inlinevirtual |
Lists Projects that the caller has the resourcemanager.projects.get
permission on and satisfy the specified filter.
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.
NOTE: If the request filter contains a parent.type
and parent.id
and the caller has the resourcemanager.projects.list
permission on the parent, the results will be drawn from an alternate index which provides more consistent results. In future versions of this API, this List method will be split into List and Search to properly capture the behavorial difference.
Sets the IAM access control policy for the specified Project. Overwrites any existing policy.
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.nosp@m.@myo.nosp@m.wnper.nosp@m.sona.nosp@m.ldoma.nosp@m.in.c.nosp@m.om 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.
- You can only grant ownership of a project to a member by using the GCP Console. Inviting a member will deliver an invitation email that they must accept. An invitation email is not generated if you are granting a role other than owner, or if both the member you are inviting and the project are part of your organization.
- 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.
- 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.
Authorization requires the Google IAM permission resourcemanager.projects.setIamPolicy
on the project
- Parameters
-
body | The body of the request. |
resource | REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |