Deployment

Struct Deployment 

Source
#[non_exhaustive]
pub struct Deployment {
Show 24 fields pub name: String, pub create_time: Option<Timestamp>, pub update_time: Option<Timestamp>, pub labels: HashMap<String, String>, pub state: State, pub latest_revision: String, pub state_detail: String, pub error_code: ErrorCode, pub delete_results: Option<ApplyResults>, pub delete_build: String, pub delete_logs: String, pub tf_errors: Vec<TerraformError>, pub error_logs: String, pub artifacts_gcs_bucket: Option<String>, pub service_account: Option<String>, pub import_existing_resources: Option<bool>, pub worker_pool: Option<String>, pub lock_state: LockState, pub tf_version_constraint: Option<String>, pub tf_version: String, pub quota_validation: QuotaValidation, pub annotations: HashMap<String, String>, pub provider_config: Option<ProviderConfig>, pub blueprint: Option<Blueprint>, /* private fields */
}
Expand description

A Deployment is a group of resources and configs managed and provisioned by Infra Manager.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Identifier. Resource name of the deployment. Format: projects/{project}/locations/{location}/deployments/{deployment}

§create_time: Option<Timestamp>

Output only. Time when the deployment was created.

§update_time: Option<Timestamp>

Output only. Time when the deployment was last modified.

§labels: HashMap<String, String>

Optional. User-defined metadata for the deployment.

§state: State

Output only. Current state of the deployment.

§latest_revision: String

Output only. Revision name that was most recently applied. Format: projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}

§state_detail: String

Output only. Additional information regarding the current state.

§error_code: ErrorCode

Output only. Error code describing errors that may have occurred.

§delete_results: Option<ApplyResults>

Output only. Location of artifacts from a DeleteDeployment operation.

§delete_build: String

Output only. Cloud Build instance UUID associated with deleting this deployment.

§delete_logs: String

Output only. Location of Cloud Build logs in Google Cloud Storage, populated when deleting this deployment. Format: gs://{bucket}/{object}.

§tf_errors: Vec<TerraformError>

Output only. Errors encountered when deleting this deployment. Errors are truncated to 10 entries, see delete_results and error_logs for full details.

§error_logs: String

Output only. Location of Terraform error logs in Google Cloud Storage. Format: gs://{bucket}/{object}.

§artifacts_gcs_bucket: Option<String>

Optional. User-defined location of Cloud Build logs and artifacts in Google Cloud Storage. Format: gs://{bucket}/{folder}

A default bucket will be bootstrapped if the field is not set or empty. Default bucket format: gs://<project number>-<region>-blueprint-config Constraints:

  • The bucket needs to be in the same project as the deployment
  • The path cannot be within the path of gcs_source
  • The field cannot be updated, including changing its presence
§service_account: Option<String>

Required. User-specified Service Account (SA) credentials to be used when actuating resources. Format: projects/{projectID}/serviceAccounts/{serviceAccount}

§import_existing_resources: Option<bool>

By default, Infra Manager will return a failure when Terraform encounters a 409 code (resource conflict error) during actuation. If this flag is set to true, Infra Manager will instead attempt to automatically import the resource into the Terraform state (for supported resource types) and continue actuation.

Not all resource types are supported, refer to documentation.

§worker_pool: Option<String>

Optional. The user-specified Cloud Build worker pool resource in which the Cloud Build job will execute. Format: projects/{project}/locations/{location}/workerPools/{workerPoolId}. If this field is unspecified, the default Cloud Build worker pool will be used.

§lock_state: LockState

Output only. Current lock state of the deployment.

§tf_version_constraint: Option<String>

Optional. The user-specified Terraform version constraint. Example: “=1.3.10”.

§tf_version: String

Output only. The current Terraform version set on the deployment. It is in the format of “Major.Minor.Patch”, for example, “1.3.10”.

§quota_validation: QuotaValidation

Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies.

§annotations: HashMap<String, String>

Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployments during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.

§provider_config: Option<ProviderConfig>

Optional. This field specifies the provider configurations.

§blueprint: Option<Blueprint>

Blueprint to deploy.

Implementations§

Source§

impl Deployment

Source

pub fn new() -> Self

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

§Example
let x = Deployment::new().set_name("example");
Source

pub fn set_create_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of create_time.

§Example
use wkt::Timestamp;
let x = Deployment::new().set_create_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of create_time.

§Example
use wkt::Timestamp;
let x = Deployment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Deployment::new().set_or_clear_create_time(None::<Timestamp>);
Source

pub fn set_update_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of update_time.

§Example
use wkt::Timestamp;
let x = Deployment::new().set_update_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of update_time.

§Example
use wkt::Timestamp;
let x = Deployment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Deployment::new().set_or_clear_update_time(None::<Timestamp>);
Source

pub fn set_labels<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of labels.

§Example
let x = Deployment::new().set_labels([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

pub fn set_state<T: Into<State>>(self, v: T) -> Self

Sets the value of state.

§Example
use google_cloud_config_v1::model::deployment::State;
let x0 = Deployment::new().set_state(State::Creating);
let x1 = Deployment::new().set_state(State::Active);
let x2 = Deployment::new().set_state(State::Updating);
Source

pub fn set_latest_revision<T: Into<String>>(self, v: T) -> Self

Sets the value of latest_revision.

§Example
let x = Deployment::new().set_latest_revision("example");
Source

pub fn set_state_detail<T: Into<String>>(self, v: T) -> Self

Sets the value of state_detail.

§Example
let x = Deployment::new().set_state_detail("example");
Source

pub fn set_error_code<T: Into<ErrorCode>>(self, v: T) -> Self

Sets the value of error_code.

§Example
use google_cloud_config_v1::model::deployment::ErrorCode;
let x0 = Deployment::new().set_error_code(ErrorCode::RevisionFailed);
let x1 = Deployment::new().set_error_code(ErrorCode::CloudBuildPermissionDenied);
let x2 = Deployment::new().set_error_code(ErrorCode::DeleteBuildApiFailed);
Source

pub fn set_delete_results<T>(self, v: T) -> Self
where T: Into<ApplyResults>,

Sets the value of delete_results.

§Example
use google_cloud_config_v1::model::ApplyResults;
let x = Deployment::new().set_delete_results(ApplyResults::default()/* use setters */);
Source

pub fn set_or_clear_delete_results<T>(self, v: Option<T>) -> Self
where T: Into<ApplyResults>,

Sets or clears the value of delete_results.

§Example
use google_cloud_config_v1::model::ApplyResults;
let x = Deployment::new().set_or_clear_delete_results(Some(ApplyResults::default()/* use setters */));
let x = Deployment::new().set_or_clear_delete_results(None::<ApplyResults>);
Source

pub fn set_delete_build<T: Into<String>>(self, v: T) -> Self

Sets the value of delete_build.

§Example
let x = Deployment::new().set_delete_build("example");
Source

pub fn set_delete_logs<T: Into<String>>(self, v: T) -> Self

Sets the value of delete_logs.

§Example
let x = Deployment::new().set_delete_logs("example");
Source

pub fn set_tf_errors<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<TerraformError>,

Sets the value of tf_errors.

§Example
use google_cloud_config_v1::model::TerraformError;
let x = Deployment::new()
    .set_tf_errors([
        TerraformError::default()/* use setters */,
        TerraformError::default()/* use (different) setters */,
    ]);
Source

pub fn set_error_logs<T: Into<String>>(self, v: T) -> Self

Sets the value of error_logs.

§Example
let x = Deployment::new().set_error_logs("example");
Source

pub fn set_artifacts_gcs_bucket<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of artifacts_gcs_bucket.

§Example
let x = Deployment::new().set_artifacts_gcs_bucket("example");
Source

pub fn set_or_clear_artifacts_gcs_bucket<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of artifacts_gcs_bucket.

§Example
let x = Deployment::new().set_or_clear_artifacts_gcs_bucket(Some("example"));
let x = Deployment::new().set_or_clear_artifacts_gcs_bucket(None::<String>);
Source

pub fn set_service_account<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of service_account.

§Example
let x = Deployment::new().set_service_account("example");
Source

pub fn set_or_clear_service_account<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of service_account.

§Example
let x = Deployment::new().set_or_clear_service_account(Some("example"));
let x = Deployment::new().set_or_clear_service_account(None::<String>);
Source

pub fn set_import_existing_resources<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of import_existing_resources.

§Example
let x = Deployment::new().set_import_existing_resources(true);
Source

pub fn set_or_clear_import_existing_resources<T>(self, v: Option<T>) -> Self
where T: Into<bool>,

Sets or clears the value of import_existing_resources.

§Example
let x = Deployment::new().set_or_clear_import_existing_resources(Some(false));
let x = Deployment::new().set_or_clear_import_existing_resources(None::<bool>);
Source

pub fn set_worker_pool<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of worker_pool.

§Example
let x = Deployment::new().set_worker_pool("example");
Source

pub fn set_or_clear_worker_pool<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of worker_pool.

§Example
let x = Deployment::new().set_or_clear_worker_pool(Some("example"));
let x = Deployment::new().set_or_clear_worker_pool(None::<String>);
Source

pub fn set_lock_state<T: Into<LockState>>(self, v: T) -> Self

Sets the value of lock_state.

§Example
use google_cloud_config_v1::model::deployment::LockState;
let x0 = Deployment::new().set_lock_state(LockState::Locked);
let x1 = Deployment::new().set_lock_state(LockState::Unlocked);
let x2 = Deployment::new().set_lock_state(LockState::Locking);
Source

pub fn set_tf_version_constraint<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of tf_version_constraint.

§Example
let x = Deployment::new().set_tf_version_constraint("example");
Source

pub fn set_or_clear_tf_version_constraint<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of tf_version_constraint.

§Example
let x = Deployment::new().set_or_clear_tf_version_constraint(Some("example"));
let x = Deployment::new().set_or_clear_tf_version_constraint(None::<String>);
Source

pub fn set_tf_version<T: Into<String>>(self, v: T) -> Self

Sets the value of tf_version.

§Example
let x = Deployment::new().set_tf_version("example");
Source

pub fn set_quota_validation<T: Into<QuotaValidation>>(self, v: T) -> Self

Sets the value of quota_validation.

§Example
use google_cloud_config_v1::model::QuotaValidation;
let x0 = Deployment::new().set_quota_validation(QuotaValidation::Enabled);
let x1 = Deployment::new().set_quota_validation(QuotaValidation::Enforced);
Source

pub fn set_annotations<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of annotations.

§Example
let x = Deployment::new().set_annotations([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

pub fn set_provider_config<T>(self, v: T) -> Self
where T: Into<ProviderConfig>,

Sets the value of provider_config.

§Example
use google_cloud_config_v1::model::ProviderConfig;
let x = Deployment::new().set_provider_config(ProviderConfig::default()/* use setters */);
Source

pub fn set_or_clear_provider_config<T>(self, v: Option<T>) -> Self
where T: Into<ProviderConfig>,

Sets or clears the value of provider_config.

§Example
use google_cloud_config_v1::model::ProviderConfig;
let x = Deployment::new().set_or_clear_provider_config(Some(ProviderConfig::default()/* use setters */));
let x = Deployment::new().set_or_clear_provider_config(None::<ProviderConfig>);
Source

pub fn set_blueprint<T: Into<Option<Blueprint>>>(self, v: T) -> Self

Sets the value of blueprint.

Note that all the setters affecting blueprint are mutually exclusive.

§Example
use google_cloud_config_v1::model::TerraformBlueprint;
let x = Deployment::new().set_blueprint(Some(
    google_cloud_config_v1::model::deployment::Blueprint::TerraformBlueprint(TerraformBlueprint::default().into())));
Source

pub fn terraform_blueprint(&self) -> Option<&Box<TerraformBlueprint>>

The value of blueprint if it holds a TerraformBlueprint, None if the field is not set or holds a different branch.

Source

pub fn set_terraform_blueprint<T: Into<Box<TerraformBlueprint>>>( self, v: T, ) -> Self

Sets the value of blueprint to hold a TerraformBlueprint.

Note that all the setters affecting blueprint are mutually exclusive.

§Example
use google_cloud_config_v1::model::TerraformBlueprint;
let x = Deployment::new().set_terraform_blueprint(TerraformBlueprint::default()/* use setters */);
assert!(x.terraform_blueprint().is_some());

Trait Implementations§

Source§

impl Clone for Deployment

Source§

fn clone(&self) -> Deployment

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Deployment

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Deployment

Source§

fn default() -> Deployment

Returns the “default value” for a type. Read more
Source§

impl Message for Deployment

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Deployment

Source§

fn eq(&self, other: &Deployment) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Deployment

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,