Struct gapi_grpc::google::cloud::resourcemanager::v3::projects_client::ProjectsClient [−][src]
Manages Google Cloud Projects.
Implementations
impl ProjectsClient<Channel>
[src]
pub async fn connect<D>(dst: D) -> Result<Self, Error> where
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
[src]
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
Attempt to create a new client by connecting to a given endpoint.
impl<T> ProjectsClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
[src]
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
[src]
pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self
[src]
pub async fn get_project(
&mut self,
request: impl IntoRequest<GetProjectRequest>
) -> Result<Response<Project>, Status>
[src]
&mut self,
request: impl IntoRequest<GetProjectRequest>
) -> Result<Response<Project>, Status>
Retrieves the project identified by the specified name
(for example,
projects/415104041262
).
The caller must have resourcemanager.projects.get
permission
for this project.
pub async fn list_projects(
&mut self,
request: impl IntoRequest<ListProjectsRequest>
) -> Result<Response<ListProjectsResponse>, Status>
[src]
&mut self,
request: impl IntoRequest<ListProjectsRequest>
) -> Result<Response<ListProjectsResponse>, Status>
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 async fn search_projects(
&mut self,
request: impl IntoRequest<SearchProjectsRequest>
) -> Result<Response<SearchProjectsResponse>, Status>
[src]
&mut self,
request: impl IntoRequest<SearchProjectsRequest>
) -> Result<Response<SearchProjectsResponse>, Status>
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.
pub async fn create_project(
&mut self,
request: impl IntoRequest<CreateProjectRequest>
) -> Result<Response<Operation>, Status>
[src]
&mut self,
request: impl IntoRequest<CreateProjectRequest>
) -> Result<Response<Operation>, Status>
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
.
pub async fn update_project(
&mut self,
request: impl IntoRequest<UpdateProjectRequest>
) -> Result<Response<Operation>, Status>
[src]
&mut self,
request: impl IntoRequest<UpdateProjectRequest>
) -> Result<Response<Operation>, Status>
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.
pub async fn move_project(
&mut self,
request: impl IntoRequest<MoveProjectRequest>
) -> Result<Response<Operation>, Status>
[src]
&mut self,
request: impl IntoRequest<MoveProjectRequest>
) -> Result<Response<Operation>, Status>
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.
pub async fn delete_project(
&mut self,
request: impl IntoRequest<DeleteProjectRequest>
) -> Result<Response<Operation>, Status>
[src]
&mut self,
request: impl IntoRequest<DeleteProjectRequest>
) -> Result<Response<Operation>, Status>
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.
pub async fn undelete_project(
&mut self,
request: impl IntoRequest<UndeleteProjectRequest>
) -> Result<Response<Operation>, Status>
[src]
&mut self,
request: impl IntoRequest<UndeleteProjectRequest>
) -> Result<Response<Operation>, Status>
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.
pub async fn get_iam_policy(
&mut self,
request: impl IntoRequest<GetIamPolicyRequest>
) -> Result<Response<Policy>, Status>
[src]
&mut self,
request: impl IntoRequest<GetIamPolicyRequest>
) -> Result<Response<Policy>, Status>
Returns the IAM access control policy for the specified project. Permission is denied if the policy or the resource do not exist.
pub async fn set_iam_policy(
&mut self,
request: impl IntoRequest<SetIamPolicyRequest>
) -> Result<Response<Policy>, Status>
[src]
&mut self,
request: impl IntoRequest<SetIamPolicyRequest>
) -> Result<Response<Policy>, Status>
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
andallAuthenticatedUsers
asmembers
in aBinding
of aPolicy
. -
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.
pub async fn test_iam_permissions(
&mut self,
request: impl IntoRequest<TestIamPermissionsRequest>
) -> Result<Response<TestIamPermissionsResponse>, Status>
[src]
&mut self,
request: impl IntoRequest<TestIamPermissionsRequest>
) -> Result<Response<TestIamPermissionsResponse>, Status>
Returns permissions that a caller has on the specified project.
Trait Implementations
impl<T: Clone> Clone for ProjectsClient<T>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for ProjectsClient<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for ProjectsClient<T>
impl<T> Send for ProjectsClient<T> where
T: Send,
T: Send,
impl<T> Sync for ProjectsClient<T> where
T: Sync,
T: Sync,
impl<T> Unpin for ProjectsClient<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for ProjectsClient<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,