Struct ProjectMethods

Source
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>

Source

pub fn authorizeddomains_list( &self, parent: &str, ) -> ProjectAuthorizeddomainListCall<'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.
Source

pub fn locations_authorizeddomains_list( &self, parent: &str, ) -> ProjectLocationAuthorizeddomainListCall<'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.
Source

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

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

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
Source

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
Source

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
Source

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
Source

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

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

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

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

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

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

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

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
Source

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
Source

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
Source

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
Source

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
Source

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}
Source

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 the endpoint is regional) * projects/{project_id_or_number}/locations/{region}/services/{service_name} * projects/{project_id_or_number}/regions/{region}/services/{service_name}
Source

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 the endpoint is regional) * projects/{project_id_or_number}/locations/{region}/services/{service_name} * projects/{project_id_or_number}/regions/{region}/services/{service_name}
Source

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

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}
Source

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 the endpoint is regional) * projects/{project_id_or_number}/locations/{region}/services/{service_name} * projects/{project_id_or_number}/regions/{region}/services/{service_name}
Source

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

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

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§

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,