#[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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringIdentifier. 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: StateOutput only. Current state of the deployment.
latest_revision: StringOutput only. Revision name that was most recently applied.
Format: projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}
state_detail: StringOutput only. Additional information regarding the current state.
error_code: ErrorCodeOutput only. Error code describing errors that may have occurred.
delete_results: Option<ApplyResults>Output only. Location of artifacts from a DeleteDeployment operation.
delete_build: StringOutput only. Cloud Build instance UUID associated with deleting this deployment.
delete_logs: StringOutput 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: StringOutput 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: LockStateOutput 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: StringOutput 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: QuotaValidationOptional. 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
impl Deployment
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Deployment::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Deployment::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_latest_revision<T: Into<String>>(self, v: T) -> Self
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");Sourcepub fn set_state_detail<T: Into<String>>(self, v: T) -> Self
pub fn set_state_detail<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_error_code<T: Into<ErrorCode>>(self, v: T) -> Self
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);Sourcepub fn set_delete_results<T>(self, v: T) -> Selfwhere
T: Into<ApplyResults>,
pub fn set_delete_results<T>(self, v: T) -> Selfwhere
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 */);Sourcepub fn set_or_clear_delete_results<T>(self, v: Option<T>) -> Selfwhere
T: Into<ApplyResults>,
pub fn set_or_clear_delete_results<T>(self, v: Option<T>) -> Selfwhere
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>);Sourcepub fn set_delete_build<T: Into<String>>(self, v: T) -> Self
pub fn set_delete_build<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_delete_logs<T: Into<String>>(self, v: T) -> Self
pub fn set_delete_logs<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_tf_errors<T, V>(self, v: T) -> Self
pub fn set_tf_errors<T, V>(self, v: T) -> Self
Sourcepub fn set_error_logs<T: Into<String>>(self, v: T) -> Self
pub fn set_error_logs<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_artifacts_gcs_bucket<T>(self, v: T) -> Self
pub fn set_artifacts_gcs_bucket<T>(self, v: T) -> Self
Sets the value of artifacts_gcs_bucket.
§Example
let x = Deployment::new().set_artifacts_gcs_bucket("example");Sourcepub fn set_or_clear_artifacts_gcs_bucket<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_artifacts_gcs_bucket<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_service_account<T>(self, v: T) -> Self
pub fn set_service_account<T>(self, v: T) -> Self
Sets the value of service_account.
§Example
let x = Deployment::new().set_service_account("example");Sourcepub fn set_or_clear_service_account<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_service_account<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_import_existing_resources<T>(self, v: T) -> Self
pub fn set_import_existing_resources<T>(self, v: T) -> Self
Sets the value of import_existing_resources.
§Example
let x = Deployment::new().set_import_existing_resources(true);Sourcepub fn set_or_clear_import_existing_resources<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_import_existing_resources<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_worker_pool<T>(self, v: T) -> Self
pub fn set_worker_pool<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_worker_pool<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_worker_pool<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_lock_state<T: Into<LockState>>(self, v: T) -> Self
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);Sourcepub fn set_tf_version_constraint<T>(self, v: T) -> Self
pub fn set_tf_version_constraint<T>(self, v: T) -> Self
Sets the value of tf_version_constraint.
§Example
let x = Deployment::new().set_tf_version_constraint("example");Sourcepub fn set_or_clear_tf_version_constraint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_tf_version_constraint<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_tf_version<T: Into<String>>(self, v: T) -> Self
pub fn set_tf_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_quota_validation<T: Into<QuotaValidation>>(self, v: T) -> Self
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);Sourcepub fn set_annotations<T, K, V>(self, v: T) -> Self
pub fn set_annotations<T, K, V>(self, v: T) -> Self
Sets the value of annotations.
§Example
let x = Deployment::new().set_annotations([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_provider_config<T>(self, v: T) -> Selfwhere
T: Into<ProviderConfig>,
pub fn set_provider_config<T>(self, v: T) -> Selfwhere
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 */);Sourcepub fn set_or_clear_provider_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ProviderConfig>,
pub fn set_or_clear_provider_config<T>(self, v: Option<T>) -> Selfwhere
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>);Sourcepub fn set_blueprint<T: Into<Option<Blueprint>>>(self, v: T) -> Self
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())));Sourcepub fn terraform_blueprint(&self) -> Option<&Box<TerraformBlueprint>>
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.
Sourcepub fn set_terraform_blueprint<T: Into<Box<TerraformBlueprint>>>(
self,
v: T,
) -> Self
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
impl Clone for Deployment
Source§fn clone(&self) -> Deployment
fn clone(&self) -> Deployment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more