pub struct ProjectMethods<'a, S>
where S: 'a,
{ /* private fields */ }
Expand description

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

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_composer1 as composer1;
 
use std::default::Default;
use composer1::{CloudComposer, oauth2, hyper, hyper_rustls, chrono, FieldMask};
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
        secret,
        oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = CloudComposer::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_environments_create(...)`, `locations_environments_database_failover(...)`, `locations_environments_delete(...)`, `locations_environments_execute_airflow_command(...)`, `locations_environments_fetch_database_properties(...)`, `locations_environments_get(...)`, `locations_environments_list(...)`, `locations_environments_load_snapshot(...)`, `locations_environments_patch(...)`, `locations_environments_poll_airflow_command(...)`, `locations_environments_save_snapshot(...)`, `locations_environments_stop_airflow_command(...)`, `locations_environments_user_workloads_config_maps_create(...)`, `locations_environments_user_workloads_config_maps_delete(...)`, `locations_environments_user_workloads_config_maps_get(...)`, `locations_environments_user_workloads_config_maps_list(...)`, `locations_environments_user_workloads_config_maps_update(...)`, `locations_environments_user_workloads_secrets_create(...)`, `locations_environments_user_workloads_secrets_delete(...)`, `locations_environments_user_workloads_secrets_get(...)`, `locations_environments_user_workloads_secrets_list(...)`, `locations_environments_user_workloads_secrets_update(...)`, `locations_environments_workloads_list(...)`, `locations_image_versions_list(...)`, `locations_operations_delete(...)`, `locations_operations_get(...)` and `locations_operations_list(...)`
// to build up your call.
let rb = hub.projects();

Implementations§

source§

impl<'a, S> ProjectMethods<'a, S>

source

pub fn locations_environments_user_workloads_config_maps_create( &self, request: UserWorkloadsConfigMap, parent: &str ) -> ProjectLocationEnvironmentUserWorkloadsConfigMapCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • request - No description provided.
  • parent - Required. The environment name to create a ConfigMap for, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_user_workloads_config_maps_delete( &self, name: &str ) -> ProjectLocationEnvironmentUserWorkloadsConfigMapDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • name - Required. The ConfigMap to delete, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}”
source

pub fn locations_environments_user_workloads_config_maps_get( &self, name: &str ) -> ProjectLocationEnvironmentUserWorkloadsConfigMapGetCall<'a, S>

Create a builder to help you perform the following task:

Gets an existing user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • name - Required. The resource name of the ConfigMap to get, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}”
source

pub fn locations_environments_user_workloads_config_maps_list( &self, parent: &str ) -> ProjectLocationEnvironmentUserWorkloadsConfigMapListCall<'a, S>

Create a builder to help you perform the following task:

Lists user workloads ConfigMaps. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • parent - Required. List ConfigMaps in the given environment, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_user_workloads_config_maps_update( &self, request: UserWorkloadsConfigMap, name: &str ) -> ProjectLocationEnvironmentUserWorkloadsConfigMapUpdateCall<'a, S>

Create a builder to help you perform the following task:

Updates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • request - No description provided.
  • name - Identifier. The resource name of the ConfigMap, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}”
source

pub fn locations_environments_user_workloads_secrets_create( &self, request: UserWorkloadsSecret, parent: &str ) -> ProjectLocationEnvironmentUserWorkloadsSecretCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • request - No description provided.
  • parent - Required. The environment name to create a Secret for, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_user_workloads_secrets_delete( &self, name: &str ) -> ProjectLocationEnvironmentUserWorkloadsSecretDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • name - Required. The Secret to delete, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}”
source

pub fn locations_environments_user_workloads_secrets_get( &self, name: &str ) -> ProjectLocationEnvironmentUserWorkloadsSecretGetCall<'a, S>

Create a builder to help you perform the following task:

Gets an existing user workloads Secret. Values of the “data” field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • name - Required. The resource name of the Secret to get, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}”
source

pub fn locations_environments_user_workloads_secrets_list( &self, parent: &str ) -> ProjectLocationEnvironmentUserWorkloadsSecretListCall<'a, S>

Create a builder to help you perform the following task:

Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • parent - Required. List Secrets in the given environment, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_user_workloads_secrets_update( &self, request: UserWorkloadsSecret, name: &str ) -> ProjectLocationEnvironmentUserWorkloadsSecretUpdateCall<'a, S>

Create a builder to help you perform the following task:

Updates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • request - No description provided.
  • name - Identifier. The resource name of the Secret, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}”
source

pub fn locations_environments_workloads_list( &self, parent: &str ) -> ProjectLocationEnvironmentWorkloadListCall<'a, S>

Create a builder to help you perform the following task:

Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

§Arguments
  • parent - Required. The environment name to get workloads for, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_create( &self, request: Environment, parent: &str ) -> ProjectLocationEnvironmentCreateCall<'a, S>

Create a builder to help you perform the following task:

Create a new environment.

§Arguments
  • request - No description provided.
  • parent - The parent must be of the form “projects/{projectId}/locations/{locationId}”.
source

pub fn locations_environments_database_failover( &self, request: DatabaseFailoverRequest, environment: &str ) -> ProjectLocationEnvironmentDatabaseFailoverCall<'a, S>

Create a builder to help you perform the following task:

Triggers database failover (only for highly resilient environments).

§Arguments
  • request - No description provided.
  • environment - Target environment: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_delete( &self, name: &str ) -> ProjectLocationEnvironmentDeleteCall<'a, S>

Create a builder to help you perform the following task:

Delete an environment.

§Arguments
  • name - The environment to delete, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_execute_airflow_command( &self, request: ExecuteAirflowCommandRequest, environment: &str ) -> ProjectLocationEnvironmentExecuteAirflowCommandCall<'a, S>

Create a builder to help you perform the following task:

Executes Airflow CLI command.

§Arguments
  • request - No description provided.
  • environment - The resource name of the environment in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”.
source

pub fn locations_environments_fetch_database_properties( &self, environment: &str ) -> ProjectLocationEnvironmentFetchDatabasePropertyCall<'a, S>

Create a builder to help you perform the following task:

Fetches database properties.

§Arguments
  • environment - Required. The resource name of the environment, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_get( &self, name: &str ) -> ProjectLocationEnvironmentGetCall<'a, S>

Create a builder to help you perform the following task:

Get an existing environment.

§Arguments
  • name - The resource name of the environment to get, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_list( &self, parent: &str ) -> ProjectLocationEnvironmentListCall<'a, S>

Create a builder to help you perform the following task:

List environments.

§Arguments
  • parent - List environments in the given project and location, in the form: “projects/{projectId}/locations/{locationId}”
source

pub fn locations_environments_load_snapshot( &self, request: LoadSnapshotRequest, environment: &str ) -> ProjectLocationEnvironmentLoadSnapshotCall<'a, S>

Create a builder to help you perform the following task:

Loads a snapshot of a Cloud Composer environment. As a result of this operation, a snapshot of environment’s specified in LoadSnapshotRequest is loaded into the environment.

§Arguments
  • request - No description provided.
  • environment - The resource name of the target environment in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_patch( &self, request: Environment, name: &str ) -> ProjectLocationEnvironmentPatchCall<'a, S>

Create a builder to help you perform the following task:

Update an environment.

§Arguments
  • request - No description provided.
  • name - The relative resource name of the environment to update, in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_poll_airflow_command( &self, request: PollAirflowCommandRequest, environment: &str ) -> ProjectLocationEnvironmentPollAirflowCommandCall<'a, S>

Create a builder to help you perform the following task:

Polls Airflow CLI command execution and fetches logs.

§Arguments
  • request - No description provided.
  • environment - The resource name of the environment in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_save_snapshot( &self, request: SaveSnapshotRequest, environment: &str ) -> ProjectLocationEnvironmentSaveSnapshotCall<'a, S>

Create a builder to help you perform the following task:

Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment’s state is stored in a location specified in the SaveSnapshotRequest.

§Arguments
  • request - No description provided.
  • environment - The resource name of the source environment in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”
source

pub fn locations_environments_stop_airflow_command( &self, request: StopAirflowCommandRequest, environment: &str ) -> ProjectLocationEnvironmentStopAirflowCommandCall<'a, S>

Create a builder to help you perform the following task:

Stops Airflow CLI command execution.

§Arguments
  • request - No description provided.
  • environment - The resource name of the environment in the form: “projects/{projectId}/locations/{locationId}/environments/{environmentId}”.
source

pub fn locations_image_versions_list( &self, parent: &str ) -> ProjectLocationImageVersionListCall<'a, S>

Create a builder to help you perform the following task:

List ImageVersions for provided location.

§Arguments
  • parent - List ImageVersions in the given project and location, in the form: “projects/{projectId}/locations/{locationId}”
source

pub fn locations_operations_delete( &self, name: &str ) -> ProjectLocationOperationDeleteCall<'a, S>

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

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

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 - The name of the operation’s parent resource.

Trait Implementations§

source§

impl<'a, S> MethodsBuilder for ProjectMethods<'a, S>

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for ProjectMethods<'a, S>

§

impl<'a, S> Send for ProjectMethods<'a, S>
where S: Sync,

§

impl<'a, S> Sync for ProjectMethods<'a, S>
where S: Sync,

§

impl<'a, S> Unpin for ProjectMethods<'a, S>

§

impl<'a, S> !UnwindSafe for ProjectMethods<'a, S>

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, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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