cloudresourcemanager  v1
Classes | Public Member Functions | List of all members
Google.Apis.CloudResourceManager.v1.ProjectsResource Class Reference

The "projects" collection of methods. More...

Classes

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 etagset 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...
 

Public Member Functions

 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 etagset 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...
 

Detailed Description

The "projects" collection of methods.

Constructor & Destructor Documentation

◆ ProjectsResource()

Google.Apis.CloudResourceManager.v1.ProjectsResource.ProjectsResource ( Google.Apis.Services.IClientService  service)
inline

Constructs a new resource.

Member Function Documentation

◆ ClearOrgPolicy()

virtual ClearOrgPolicyRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.ClearOrgPolicy ( Google.Apis.CloudResourceManager.v1.Data.ClearOrgPolicyRequest  body,
string  resource 
)
inlinevirtual

Clears a Policy from a resource.

Parameters
bodyThe body of the request.
resourceName of the resource for the Policy to clear.

◆ Create()

virtual CreateRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.Create ( Google.Apis.CloudResourceManager.v1.Data.Project  body)
inlinevirtual

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
bodyThe body of the request.

◆ Delete()

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
projectIdThe Project ID (for example, foo-bar-123).

Required.

◆ Get()

virtual GetRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.Get ( string  projectId)
inlinevirtual

Retrieves the Project identified by the specified project_id (for example, my-project-123).

The caller must have read permissions for this Project.

Parameters
projectIdThe Project ID (for example, my-project-123).

Required.

◆ GetAncestry()

virtual GetAncestryRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.GetAncestry ( Google.Apis.CloudResourceManager.v1.Data.GetAncestryRequest  body,
string  projectId 
)
inlinevirtual

Gets a list of ancestors in the resource hierarchy for the Project identified by the specified project_id (for example, my-project-123).

The caller must have read permissions for this Project.

Parameters
bodyThe body of the request.
projectIdThe Project ID (for example, my-project-123).

Required.

◆ GetEffectiveOrgPolicy()

virtual GetEffectiveOrgPolicyRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.GetEffectiveOrgPolicy ( Google.Apis.CloudResourceManager.v1.Data.GetEffectiveOrgPolicyRequest  body,
string  resource 
)
inlinevirtual

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 etagset because it is a computed Policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.

Parameters
bodyThe body of the request.
resourceThe name of the resource to start computing the effective Policy.

◆ GetIamPolicy()

virtual GetIamPolicyRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.GetIamPolicy ( Google.Apis.CloudResourceManager.v1.Data.GetIamPolicyRequest  body,
string  resource 
)
inlinevirtual

Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist.

Authorization requires the Google IAM permission resourcemanager.projects.getIamPolicy on the project.

For additional information about resource structure and identification, see Resource Names.

Parameters
bodyThe body of the request.
resourceREQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

◆ GetOrgPolicy()

virtual GetOrgPolicyRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.GetOrgPolicy ( Google.Apis.CloudResourceManager.v1.Data.GetOrgPolicyRequest  body,
string  resource 
)
inlinevirtual

Gets a Policy on a resource.

If no Policy is set on the resource, a Policy is returned with default values including POLICY_TYPE_NOT_SET for the policy_type oneof. The etag value can be used with SetOrgPolicy() to create or update a Policy during read-modify-write.

Parameters
bodyThe body of the request.
resourceName of the resource the Policy is set on.

◆ List()

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.

◆ ListAvailableOrgPolicyConstraints()

virtual ListAvailableOrgPolicyConstraintsRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.ListAvailableOrgPolicyConstraints ( Google.Apis.CloudResourceManager.v1.Data.ListAvailableOrgPolicyConstraintsRequest  body,
string  resource 
)
inlinevirtual

Lists Constraints that could be applied on the specified resource.

Parameters
bodyThe body of the request.
resourceName of the resource to list Constraints for.

◆ ListOrgPolicies()

virtual ListOrgPoliciesRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.ListOrgPolicies ( Google.Apis.CloudResourceManager.v1.Data.ListOrgPoliciesRequest  body,
string  resource 
)
inlinevirtual

Lists all the Policies set for a particular resource.

Parameters
bodyThe body of the request.
resourceName of the resource to list Policies for.

◆ SetIamPolicy()

virtual SetIamPolicyRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.SetIamPolicy ( Google.Apis.CloudResourceManager.v1.Data.SetIamPolicyRequest  body,
string  resource 
)
inlinevirtual

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
bodyThe body of the request.
resourceREQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

◆ SetOrgPolicy()

virtual SetOrgPolicyRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.SetOrgPolicy ( Google.Apis.CloudResourceManager.v1.Data.SetOrgPolicyRequest  body,
string  resource 
)
inlinevirtual

Updates the specified Policy on the resource. Creates a new Policy for that Constraint on the resource if one does not exist.

Not supplying an etag on the request Policy results in an unconditional write of the Policy.

Parameters
bodyThe body of the request.
resourceResource name of the resource to attach the Policy.

◆ TestIamPermissions()

virtual TestIamPermissionsRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.TestIamPermissions ( Google.Apis.CloudResourceManager.v1.Data.TestIamPermissionsRequest  body,
string  resource 
)
inlinevirtual

Returns permissions that a caller has on the specified Project.

There are no permissions required for making this API call.

Parameters
bodyThe body of the request.
resourceREQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

◆ Undelete()

virtual UndeleteRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.Undelete ( Google.Apis.CloudResourceManager.v1.Data.UndeleteProjectRequest  body,
string  projectId 
)
inlinevirtual

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.

The caller must have modify permissions for this Project.

Parameters
bodyThe body of the request.
projectIdThe project ID (for example, foo-bar-123).

Required.

◆ Update()

virtual UpdateRequest Google.Apis.CloudResourceManager.v1.ProjectsResource.Update ( Google.Apis.CloudResourceManager.v1.Data.Project  body,
string  projectId 
)
inlinevirtual

Updates the attributes of the Project identified by the specified project_id (for example, my- project-123).

The caller must have modify permissions for this Project.

Parameters
bodyThe body of the request.
projectIdThe project ID (for example, my-project-123).

Required.


The documentation for this class was generated from the following file: