pub struct ProjectMethods<'a, C>where
C: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on project resources.
It is not used directly, but through the CloudRun
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_run1 as run1;
use run1::{CloudRun, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http1()
.build()
);
let mut hub = CloudRun::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `authorizeddomains_list(...)`, `locations_authorizeddomains_list(...)`, `locations_configurations_get(...)`, `locations_configurations_list(...)`, `locations_domainmappings_create(...)`, `locations_domainmappings_delete(...)`, `locations_domainmappings_get(...)`, `locations_domainmappings_list(...)`, `locations_jobs_get_iam_policy(...)`, `locations_jobs_set_iam_policy(...)`, `locations_jobs_test_iam_permissions(...)`, `locations_list(...)`, `locations_operations_delete(...)`, `locations_operations_get(...)`, `locations_operations_list(...)`, `locations_operations_wait(...)`, `locations_revisions_delete(...)`, `locations_revisions_get(...)`, `locations_revisions_list(...)`, `locations_routes_get(...)`, `locations_routes_list(...)`, `locations_services_create(...)`, `locations_services_delete(...)`, `locations_services_get(...)`, `locations_services_get_iam_policy(...)`, `locations_services_list(...)`, `locations_services_replace_service(...)`, `locations_services_set_iam_policy(...)` and `locations_services_test_iam_permissions(...)`
// to build up your call.
let rb = hub.projects();
Implementations§
Source§impl<'a, C> ProjectMethods<'a, C>
impl<'a, C> ProjectMethods<'a, C>
Create a builder to help you perform the following task:
List authorized domains.
§Arguments
parent
- Name of the parent Project resource. Example:projects/myproject
.
Create a builder to help you perform the following task:
List authorized domains.
§Arguments
parent
- Name of the parent Project resource. Example:projects/myproject
.
Sourcepub fn locations_configurations_get(
&self,
name: &str,
) -> ProjectLocationConfigurationGetCall<'a, C>
pub fn locations_configurations_get( &self, name: &str, ) -> ProjectLocationConfigurationGetCall<'a, C>
Create a builder to help you perform the following task:
Get information about a configuration.
§Arguments
name
- The name of the configuration to retrieve. For Cloud Run, replace {namespace_id} with the project ID or number.
Sourcepub fn locations_configurations_list(
&self,
parent: &str,
) -> ProjectLocationConfigurationListCall<'a, C>
pub fn locations_configurations_list( &self, parent: &str, ) -> ProjectLocationConfigurationListCall<'a, C>
Create a builder to help you perform the following task:
List configurations. Results are sorted by creation time, descending.
§Arguments
parent
- The namespace from which the configurations should be listed. For Cloud Run, replace {namespace_id} with the project ID or number.
Sourcepub fn locations_domainmappings_create(
&self,
request: DomainMapping,
parent: &str,
) -> ProjectLocationDomainmappingCreateCall<'a, C>
pub fn locations_domainmappings_create( &self, request: DomainMapping, parent: &str, ) -> ProjectLocationDomainmappingCreateCall<'a, C>
Create a builder to help you perform the following task:
Create a new domain mapping.
§Arguments
request
- No description provided.parent
- Required. The namespace in which the domain mapping should be created. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
Sourcepub fn locations_domainmappings_delete(
&self,
name: &str,
) -> ProjectLocationDomainmappingDeleteCall<'a, C>
pub fn locations_domainmappings_delete( &self, name: &str, ) -> ProjectLocationDomainmappingDeleteCall<'a, C>
Create a builder to help you perform the following task:
Delete a domain mapping.
§Arguments
name
- Required. The name of the domain mapping to delete. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
Sourcepub fn locations_domainmappings_get(
&self,
name: &str,
) -> ProjectLocationDomainmappingGetCall<'a, C>
pub fn locations_domainmappings_get( &self, name: &str, ) -> ProjectLocationDomainmappingGetCall<'a, C>
Create a builder to help you perform the following task:
Get information about a domain mapping.
§Arguments
name
- Required. The name of the domain mapping to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
Sourcepub fn locations_domainmappings_list(
&self,
parent: &str,
) -> ProjectLocationDomainmappingListCall<'a, C>
pub fn locations_domainmappings_list( &self, parent: &str, ) -> ProjectLocationDomainmappingListCall<'a, C>
Create a builder to help you perform the following task:
List all domain mappings.
§Arguments
parent
- Required. The namespace from which the domain mappings should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
Sourcepub fn locations_jobs_get_iam_policy(
&self,
resource: &str,
) -> ProjectLocationJobGetIamPolicyCall<'a, C>
pub fn locations_jobs_get_iam_policy( &self, resource: &str, ) -> ProjectLocationJobGetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Get the IAM Access Control policy currently in effect for the given job. This result does not include any inherited policies.
§Arguments
resource
- REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
Sourcepub fn locations_jobs_set_iam_policy(
&self,
request: SetIamPolicyRequest,
resource: &str,
) -> ProjectLocationJobSetIamPolicyCall<'a, C>
pub fn locations_jobs_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str, ) -> ProjectLocationJobSetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Sets the IAM Access control policy for the specified job. Overwrites any existing policy.
§Arguments
request
- No description provided.resource
- REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.
Sourcepub fn locations_jobs_test_iam_permissions(
&self,
request: TestIamPermissionsRequest,
resource: &str,
) -> ProjectLocationJobTestIamPermissionCall<'a, C>
pub fn locations_jobs_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> ProjectLocationJobTestIamPermissionCall<'a, C>
Create a builder to help you perform the following task:
Returns permissions that a caller has on the specified job. There are no permissions required for making this API call.
§Arguments
request
- No description provided.resource
- REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.
Sourcepub fn locations_operations_delete(
&self,
name: &str,
) -> ProjectLocationOperationDeleteCall<'a, C>
pub fn locations_operations_delete( &self, name: &str, ) -> ProjectLocationOperationDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
§Arguments
name
- The name of the operation resource to be deleted.
Sourcepub fn locations_operations_get(
&self,
name: &str,
) -> ProjectLocationOperationGetCall<'a, C>
pub fn locations_operations_get( &self, name: &str, ) -> ProjectLocationOperationGetCall<'a, C>
Create a builder to help you perform the following task:
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
§Arguments
name
- The name of the operation resource.
Sourcepub fn locations_operations_list(
&self,
name: &str,
) -> ProjectLocationOperationListCall<'a, C>
pub fn locations_operations_list( &self, name: &str, ) -> ProjectLocationOperationListCall<'a, C>
Create a builder to help you perform the following task:
Lists operations that match the specified filter in the request. If the server doesn’t support this method, it returns UNIMPLEMENTED
.
§Arguments
name
- Required. To query for all of the operations for a project.
Sourcepub fn locations_operations_wait(
&self,
request: GoogleLongrunningWaitOperationRequest,
name: &str,
) -> ProjectLocationOperationWaitCall<'a, C>
pub fn locations_operations_wait( &self, request: GoogleLongrunningWaitOperationRequest, name: &str, ) -> ProjectLocationOperationWaitCall<'a, C>
Create a builder to help you perform the following task:
Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.
§Arguments
request
- No description provided.name
- The name of the operation resource to wait on.
Sourcepub fn locations_revisions_delete(
&self,
name: &str,
) -> ProjectLocationRevisionDeleteCall<'a, C>
pub fn locations_revisions_delete( &self, name: &str, ) -> ProjectLocationRevisionDeleteCall<'a, C>
Create a builder to help you perform the following task:
Delete a revision.
§Arguments
name
- The name of the revision to delete. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
Sourcepub fn locations_revisions_get(
&self,
name: &str,
) -> ProjectLocationRevisionGetCall<'a, C>
pub fn locations_revisions_get( &self, name: &str, ) -> ProjectLocationRevisionGetCall<'a, C>
Create a builder to help you perform the following task:
Get information about a revision.
§Arguments
name
- The name of the revision to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
Sourcepub fn locations_revisions_list(
&self,
parent: &str,
) -> ProjectLocationRevisionListCall<'a, C>
pub fn locations_revisions_list( &self, parent: &str, ) -> ProjectLocationRevisionListCall<'a, C>
Create a builder to help you perform the following task:
List revisions. Results are sorted by creation time, descending.
§Arguments
parent
- The namespace from which the revisions should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
Sourcepub fn locations_routes_get(
&self,
name: &str,
) -> ProjectLocationRouteGetCall<'a, C>
pub fn locations_routes_get( &self, name: &str, ) -> ProjectLocationRouteGetCall<'a, C>
Create a builder to help you perform the following task:
Get information about a route.
§Arguments
name
- The name of the route to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
Sourcepub fn locations_routes_list(
&self,
parent: &str,
) -> ProjectLocationRouteListCall<'a, C>
pub fn locations_routes_list( &self, parent: &str, ) -> ProjectLocationRouteListCall<'a, C>
Create a builder to help you perform the following task:
List routes. Results are sorted by creation time, descending.
§Arguments
parent
- The namespace from which the routes should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
Sourcepub fn locations_services_create(
&self,
request: Service,
parent: &str,
) -> ProjectLocationServiceCreateCall<'a, C>
pub fn locations_services_create( &self, request: Service, parent: &str, ) -> ProjectLocationServiceCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a new Service. Service creation will trigger a new deployment. Use GetService, and check service.status to determine if the Service is ready.
§Arguments
request
- No description provided.parent
- Required. The resource’s parent. In Cloud Run, it may be one of the following: *{project_id_or_number}
*namespaces/{project_id_or_number}
*namespaces/{project_id_or_number}/services
*projects/{project_id_or_number}/locations/{region}
*projects/{project_id_or_number}/regions/{region}
Sourcepub fn locations_services_delete(
&self,
name: &str,
) -> ProjectLocationServiceDeleteCall<'a, C>
pub fn locations_services_delete( &self, name: &str, ) -> ProjectLocationServiceDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes the provided service. This will cause the Service to stop serving traffic and will delete all associated Revisions.
§Arguments
name
- Required. The fully qualified name of the service to delete. It can be any of the following forms: *namespaces/{project_id_or_number}/services/{service_name}
(only when theendpoint
is regional) *projects/{project_id_or_number}/locations/{region}/services/{service_name}
*projects/{project_id_or_number}/regions/{region}/services/{service_name}
Sourcepub fn locations_services_get(
&self,
name: &str,
) -> ProjectLocationServiceGetCall<'a, C>
pub fn locations_services_get( &self, name: &str, ) -> ProjectLocationServiceGetCall<'a, C>
Create a builder to help you perform the following task:
Gets information about a service.
§Arguments
name
- Required. The fully qualified name of the service to retrieve. It can be any of the following forms: *namespaces/{project_id_or_number}/services/{service_name}
(only when theendpoint
is regional) *projects/{project_id_or_number}/locations/{region}/services/{service_name}
*projects/{project_id_or_number}/regions/{region}/services/{service_name}
Sourcepub fn locations_services_get_iam_policy(
&self,
resource: &str,
) -> ProjectLocationServiceGetIamPolicyCall<'a, C>
pub fn locations_services_get_iam_policy( &self, resource: &str, ) -> ProjectLocationServiceGetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Gets the IAM Access Control policy currently in effect for the given Cloud Run service. This result does not include any inherited policies.
§Arguments
resource
- REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
Sourcepub fn locations_services_list(
&self,
parent: &str,
) -> ProjectLocationServiceListCall<'a, C>
pub fn locations_services_list( &self, parent: &str, ) -> ProjectLocationServiceListCall<'a, C>
Create a builder to help you perform the following task:
Lists services for the given project and region. Results are sorted by creation time, descending.
§Arguments
parent
- Required. The parent from where the resources should be listed. In Cloud Run, it may be one of the following: *{project_id_or_number}
*namespaces/{project_id_or_number}
*namespaces/{project_id_or_number}/services
*projects/{project_id_or_number}/locations/{region}
*projects/{project_id_or_number}/regions/{region}
Sourcepub fn locations_services_replace_service(
&self,
request: Service,
name: &str,
) -> ProjectLocationServiceReplaceServiceCall<'a, C>
pub fn locations_services_replace_service( &self, request: Service, name: &str, ) -> ProjectLocationServiceReplaceServiceCall<'a, C>
Create a builder to help you perform the following task:
Replaces a service. Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the ‘status’ match the requested ‘spec’. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.
§Arguments
request
- No description provided.name
- Required. The fully qualified name of the service to replace. It can be any of the following forms: *namespaces/{project_id_or_number}/services/{service_name}
(only when theendpoint
is regional) *projects/{project_id_or_number}/locations/{region}/services/{service_name}
*projects/{project_id_or_number}/regions/{region}/services/{service_name}
Sourcepub fn locations_services_set_iam_policy(
&self,
request: SetIamPolicyRequest,
resource: &str,
) -> ProjectLocationServiceSetIamPolicyCall<'a, C>
pub fn locations_services_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str, ) -> ProjectLocationServiceSetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Sets the IAM Access control policy for the specified Service. Overwrites any existing policy.
§Arguments
request
- No description provided.resource
- REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.
Sourcepub fn locations_services_test_iam_permissions(
&self,
request: TestIamPermissionsRequest,
resource: &str,
) -> ProjectLocationServiceTestIamPermissionCall<'a, C>
pub fn locations_services_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> ProjectLocationServiceTestIamPermissionCall<'a, C>
Create a builder to help you perform the following task:
Returns permissions that a caller has on the specified Project. There are no permissions required for making this API call.
§Arguments
request
- No description provided.resource
- REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.
Sourcepub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>
pub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>
Create a builder to help you perform the following task:
Lists information about the supported locations for this service.
§Arguments
name
- The resource that owns the locations collection, if applicable.
Trait Implementations§
impl<'a, C> MethodsBuilder for ProjectMethods<'a, C>
Auto Trait Implementations§
impl<'a, C> Freeze for ProjectMethods<'a, C>
impl<'a, C> !RefUnwindSafe for ProjectMethods<'a, C>
impl<'a, C> Send for ProjectMethods<'a, C>where
C: Sync,
impl<'a, C> Sync for ProjectMethods<'a, C>where
C: Sync,
impl<'a, C> Unpin for ProjectMethods<'a, C>
impl<'a, C> !UnwindSafe for ProjectMethods<'a, C>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more