Struct google_cloudresourcemanager3::api::ProjectMethods[][src]

pub struct ProjectMethods<'a, C> where
    C: 'a, 
{ /* fields omitted */ }

A builder providing access to all methods supported on project resources. It is not used directly, but through the CloudResourceManager hub.

Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_cloudresourcemanager3 as cloudresourcemanager3;
 
use std::default::Default;
use oauth2;
use cloudresourcemanager3::CloudResourceManager;
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
        secret,
        yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = CloudResourceManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `create(...)`, `delete(...)`, `get(...)`, `get_iam_policy(...)`, `list(...)`, `move_(...)`, `patch(...)`, `search(...)`, `set_iam_policy(...)`, `test_iam_permissions(...)` and `undelete(...)`
// to build up your call.
let rb = hub.projects();

Implementations

impl<'a, C> ProjectMethods<'a, C>[src]

pub fn create(&self, request: Project) -> ProjectCreateCall<'a, C>[src]

Create a builder to help you perform the following task:

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.

Arguments

  • request - No description provided.

pub fn delete(&self, name: &str) -> ProjectDeleteCall<'a, C>[src]

Create a builder to help you perform the following task:

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

Arguments

  • name - Required. The name of the Project (for example, projects/415104041262).

pub fn get(&self, name: &str) -> ProjectGetCall<'a, C>[src]

Create a builder to help you perform the following task:

Retrieves the project identified by the specified name (for example, projects/415104041262). The caller must have resourcemanager.projects.get permission for this project.

Arguments

  • name - Required. The name of the project (for example, projects/415104041262).

pub fn get_iam_policy(
    &self,
    request: GetIamPolicyRequest,
    resource: &str
) -> ProjectGetIamPolicyCall<'a, C>
[src]

Create a builder to help you perform the following task:

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

Arguments

  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

pub fn list(&self) -> ProjectListCall<'a, C>[src]

Create a builder to help you perform the following task:

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.

pub fn move_(
    &self,
    request: MoveProjectRequest,
    name: &str
) -> ProjectMoveCall<'a, C>
[src]

Create a builder to help you perform the following task:

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.update permission on the project and have resourcemanager.projects.move permission on the project's current and proposed new parent.

Arguments

  • request - No description provided.
  • name - Required. The name of the project to move.

pub fn patch(&self, request: Project, name: &str) -> ProjectPatchCall<'a, C>[src]

Create a builder to help you perform the following task:

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.

Arguments

  • request - No description provided.
  • name - Output only. The unique resource name of the project. It is an int64 generated number prefixed by "projects/". Example: projects/415104041262

pub fn search(&self) -> ProjectSearchCall<'a, C>[src]

Create a builder to help you perform the following task:

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

pub fn set_iam_policy(
    &self,
    request: SetIamPolicyRequest,
    resource: &str
) -> ProjectSetIamPolicyCall<'a, C>
[src]

Create a builder to help you perform the following task:

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

Arguments

  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

pub fn test_iam_permissions(
    &self,
    request: TestIamPermissionsRequest,
    resource: &str
) -> ProjectTestIamPermissionCall<'a, C>
[src]

Create a builder to help you perform the following task:

Returns permissions that a caller has on the specified project.

Arguments

  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

pub fn undelete(
    &self,
    request: UndeleteProjectRequest,
    name: &str
) -> ProjectUndeleteCall<'a, C>
[src]

Create a builder to help you perform the following task:

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 resourcemanager.projects.undelete permission for this project.

Arguments

  • request - No description provided.
  • name - Required. The name of the project (for example, projects/415104041262). Required.

Trait Implementations

impl<'a, C> MethodsBuilder for ProjectMethods<'a, C>[src]

Auto Trait Implementations

impl<'a, C> !RefUnwindSafe for ProjectMethods<'a, C>[src]

impl<'a, C> !Send for ProjectMethods<'a, C>[src]

impl<'a, C> !Sync for ProjectMethods<'a, C>[src]

impl<'a, C> Unpin for ProjectMethods<'a, C>[src]

impl<'a, C> !UnwindSafe for ProjectMethods<'a, C>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.