#[non_exhaustive]pub struct Revision {Show 21 fields
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub action: Action,
pub state: State,
pub apply_results: Option<ApplyResults>,
pub state_detail: String,
pub error_code: ErrorCode,
pub build: String,
pub logs: String,
pub tf_errors: Vec<TerraformError>,
pub error_logs: String,
pub service_account: String,
pub import_existing_resources: bool,
pub worker_pool: String,
pub tf_version_constraint: String,
pub tf_version: String,
pub quota_validation_results: String,
pub quota_validation: QuotaValidation,
pub provider_config: Option<ProviderConfig>,
pub blueprint: Option<Blueprint>,
/* private fields */
}Expand description
A child resource of a Deployment generated by a ‘CreateDeployment’ or ‘UpdateDeployment’ call. Each Revision contains metadata pertaining to a snapshot of a particular Deployment.
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: StringRevision name. Format:
projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}
create_time: Option<Timestamp>Output only. Time when the revision was created.
update_time: Option<Timestamp>Output only. Time when the revision was last modified.
action: ActionOutput only. The action which created this revision
state: StateOutput only. Current state of the revision.
apply_results: Option<ApplyResults>Output only. Outputs and artifacts from applying a deployment.
state_detail: StringOutput only. Additional info regarding the current state.
error_code: ErrorCodeOutput only. Code describing any errors that may have occurred.
build: StringOutput only. Cloud Build instance UUID associated with this revision.
logs: StringOutput only. Location of Revision operation logs in
gs://{bucket}/{object} format.
tf_errors: Vec<TerraformError>Output only. Errors encountered when creating or updating 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}.
service_account: StringOutput only. User-specified Service Account (SA) to be used as credential
to manage resources. Format:
projects/{projectID}/serviceAccounts/{serviceAccount}
import_existing_resources: boolOutput only. 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: StringOutput only. 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.
tf_version_constraint: StringOutput only. The user-specified Terraform version constraint. Example: “=1.3.10”.
tf_version: StringOutput only. The version of Terraform used to create the Revision. It is in the format of “Major.Minor.Patch”, for example, “1.3.10”.
quota_validation_results: StringOutput only. Cloud Storage path containing quota validation results. This
field is set when a user sets Deployment.quota_validation field to ENABLED
or ENFORCED. Format: gs://{bucket}/{object}.
quota_validation: QuotaValidationOptional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies.
provider_config: Option<ProviderConfig>Output only. This field specifies the provider configurations.
blueprint: Option<Blueprint>Blueprint that was deployed.
Implementations§
Source§impl Revision
impl Revision
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 = Revision::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 = Revision::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Revision::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 = Revision::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 = Revision::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Revision::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_action<T: Into<Action>>(self, v: T) -> Self
pub fn set_action<T: Into<Action>>(self, v: T) -> Self
Sourcepub fn set_apply_results<T>(self, v: T) -> Selfwhere
T: Into<ApplyResults>,
pub fn set_apply_results<T>(self, v: T) -> Selfwhere
T: Into<ApplyResults>,
Sets the value of apply_results.
§Example
use google_cloud_config_v1::model::ApplyResults;
let x = Revision::new().set_apply_results(ApplyResults::default()/* use setters */);Sourcepub fn set_or_clear_apply_results<T>(self, v: Option<T>) -> Selfwhere
T: Into<ApplyResults>,
pub fn set_or_clear_apply_results<T>(self, v: Option<T>) -> Selfwhere
T: Into<ApplyResults>,
Sets or clears the value of apply_results.
§Example
use google_cloud_config_v1::model::ApplyResults;
let x = Revision::new().set_or_clear_apply_results(Some(ApplyResults::default()/* use setters */));
let x = Revision::new().set_or_clear_apply_results(None::<ApplyResults>);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::revision::ErrorCode;
let x0 = Revision::new().set_error_code(ErrorCode::CloudBuildPermissionDenied);
let x1 = Revision::new().set_error_code(ErrorCode::ApplyBuildApiFailed);
let x2 = Revision::new().set_error_code(ErrorCode::ApplyBuildRunFailed);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_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
§Example
let x = Revision::new().set_service_account("example");Sourcepub fn set_import_existing_resources<T: Into<bool>>(self, v: T) -> Self
pub fn set_import_existing_resources<T: Into<bool>>(self, v: T) -> Self
Sets the value of import_existing_resources.
§Example
let x = Revision::new().set_import_existing_resources(true);Sourcepub fn set_worker_pool<T: Into<String>>(self, v: T) -> Self
pub fn set_worker_pool<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_tf_version_constraint<T: Into<String>>(self, v: T) -> Self
pub fn set_tf_version_constraint<T: Into<String>>(self, v: T) -> Self
Sets the value of tf_version_constraint.
§Example
let x = Revision::new().set_tf_version_constraint("example");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_results<T: Into<String>>(self, v: T) -> Self
pub fn set_quota_validation_results<T: Into<String>>(self, v: T) -> Self
Sets the value of quota_validation_results.
§Example
let x = Revision::new().set_quota_validation_results("example");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 = Revision::new().set_quota_validation(QuotaValidation::Enabled);
let x1 = Revision::new().set_quota_validation(QuotaValidation::Enforced);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 = Revision::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 = Revision::new().set_or_clear_provider_config(Some(ProviderConfig::default()/* use setters */));
let x = Revision::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 = Revision::new().set_blueprint(Some(
google_cloud_config_v1::model::revision::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 = Revision::new().set_terraform_blueprint(TerraformBlueprint::default()/* use setters */);
assert!(x.terraform_blueprint().is_some());