Struct google_api_proto::google::cloud::compute::v1::projects_client::ProjectsClient
source · pub struct ProjectsClient<T> { /* private fields */ }
Expand description
The Projects API.
Implementations§
source§impl<T> ProjectsClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> ProjectsClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ProjectsClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn disable_xpn_host(
&mut self,
request: impl IntoRequest<DisableXpnHostProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn disable_xpn_host( &mut self, request: impl IntoRequest<DisableXpnHostProjectRequest>, ) -> Result<Response<Operation>, Status>
Disable this project as a shared VPC host project.
sourcepub async fn disable_xpn_resource(
&mut self,
request: impl IntoRequest<DisableXpnResourceProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn disable_xpn_resource( &mut self, request: impl IntoRequest<DisableXpnResourceProjectRequest>, ) -> Result<Response<Operation>, Status>
Disable a service resource (also known as service project) associated with this host project.
sourcepub async fn enable_xpn_host(
&mut self,
request: impl IntoRequest<EnableXpnHostProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn enable_xpn_host( &mut self, request: impl IntoRequest<EnableXpnHostProjectRequest>, ) -> Result<Response<Operation>, Status>
Enable this project as a shared VPC host project.
sourcepub async fn enable_xpn_resource(
&mut self,
request: impl IntoRequest<EnableXpnResourceProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn enable_xpn_resource( &mut self, request: impl IntoRequest<EnableXpnResourceProjectRequest>, ) -> Result<Response<Operation>, Status>
Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
sourcepub async fn get(
&mut self,
request: impl IntoRequest<GetProjectRequest>,
) -> Result<Response<Project>, Status>
pub async fn get( &mut self, request: impl IntoRequest<GetProjectRequest>, ) -> Result<Response<Project>, Status>
Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas
field). To exclude one or more fields, set your request’s fields
query parameter to only include the fields you need. For example, to only include the id
and selfLink
fields, add the query parameter ?fields=id,selfLink
to your request.
sourcepub async fn get_xpn_host(
&mut self,
request: impl IntoRequest<GetXpnHostProjectRequest>,
) -> Result<Response<Project>, Status>
pub async fn get_xpn_host( &mut self, request: impl IntoRequest<GetXpnHostProjectRequest>, ) -> Result<Response<Project>, Status>
Gets the shared VPC host project that this project links to. May be empty if no link exists.
sourcepub async fn get_xpn_resources(
&mut self,
request: impl IntoRequest<GetXpnResourcesProjectsRequest>,
) -> Result<Response<ProjectsGetXpnResources>, Status>
pub async fn get_xpn_resources( &mut self, request: impl IntoRequest<GetXpnResourcesProjectsRequest>, ) -> Result<Response<ProjectsGetXpnResources>, Status>
Gets service resources (a.k.a service project) associated with this host project.
sourcepub async fn list_xpn_hosts(
&mut self,
request: impl IntoRequest<ListXpnHostsProjectsRequest>,
) -> Result<Response<XpnHostList>, Status>
pub async fn list_xpn_hosts( &mut self, request: impl IntoRequest<ListXpnHostsProjectsRequest>, ) -> Result<Response<XpnHostList>, Status>
Lists all shared VPC host projects visible to the user in an organization.
sourcepub async fn move_disk(
&mut self,
request: impl IntoRequest<MoveDiskProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn move_disk( &mut self, request: impl IntoRequest<MoveDiskProjectRequest>, ) -> Result<Response<Operation>, Status>
Moves a persistent disk from one zone to another.
sourcepub async fn move_instance(
&mut self,
request: impl IntoRequest<MoveInstanceProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn move_instance( &mut self, request: impl IntoRequest<MoveInstanceProjectRequest>, ) -> Result<Response<Operation>, Status>
Moves an instance and its attached persistent disks from one zone to another. Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead.
sourcepub async fn set_cloud_armor_tier(
&mut self,
request: impl IntoRequest<SetCloudArmorTierProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn set_cloud_armor_tier( &mut self, request: impl IntoRequest<SetCloudArmorTierProjectRequest>, ) -> Result<Response<Operation>, Status>
Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information.
sourcepub async fn set_common_instance_metadata(
&mut self,
request: impl IntoRequest<SetCommonInstanceMetadataProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn set_common_instance_metadata( &mut self, request: impl IntoRequest<SetCommonInstanceMetadataProjectRequest>, ) -> Result<Response<Operation>, Status>
Sets metadata common to all instances within the specified project using the data included in the request.
sourcepub async fn set_default_network_tier(
&mut self,
request: impl IntoRequest<SetDefaultNetworkTierProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn set_default_network_tier( &mut self, request: impl IntoRequest<SetDefaultNetworkTierProjectRequest>, ) -> Result<Response<Operation>, Status>
Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
sourcepub async fn set_usage_export_bucket(
&mut self,
request: impl IntoRequest<SetUsageExportBucketProjectRequest>,
) -> Result<Response<Operation>, Status>
pub async fn set_usage_export_bucket( &mut self, request: impl IntoRequest<SetUsageExportBucketProjectRequest>, ) -> Result<Response<Operation>, Status>
Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
Trait Implementations§
source§impl<T: Clone> Clone for ProjectsClient<T>
impl<T: Clone> Clone for ProjectsClient<T>
source§fn clone(&self) -> ProjectsClient<T>
fn clone(&self) -> ProjectsClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for ProjectsClient<T>
impl<T> RefUnwindSafe for ProjectsClient<T>where
T: RefUnwindSafe,
impl<T> Send for ProjectsClient<T>where
T: Send,
impl<T> Sync for ProjectsClient<T>where
T: Sync,
impl<T> Unpin for ProjectsClient<T>where
T: Unpin,
impl<T> UnwindSafe for ProjectsClient<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request