Class: Google::Apis::ConfigV1::Preview

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/config_v1/classes.rb,
lib/google/apis/config_v1/representations.rb,
lib/google/apis/config_v1/representations.rb

Overview

A preview represents a set of actions Infra Manager would perform to move the resources towards the desired state as specified in the configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Preview

Returns a new instance of Preview.



1921
1922
1923
# File 'lib/google/apis/config_v1/classes.rb', line 1921

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#annotationsHash<String,String>

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

Returns:

  • (Hash<String,String>)


1792
1793
1794
# File 'lib/google/apis/config_v1/classes.rb', line 1792

def annotations
  @annotations
end

#artifacts_gcs_bucketString

Optional. User-defined location of Cloud Build logs, artifacts, and 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://-- blueprint-configConstraints: - The bucket needs to be in the same project as the deployment - The path cannot be within the path ofgcs_sourceIf omitted and deployment resource ref provided has artifacts_gcs_bucket defined, that artifact bucket is used. Corresponds to the JSON propertyartifactsGcsBucket`

Returns:

  • (String)


1803
1804
1805
# File 'lib/google/apis/config_v1/classes.rb', line 1803

def artifacts_gcs_bucket
  @artifacts_gcs_bucket
end

#buildString

Output only. Cloud Build instance UUID associated with this preview. Corresponds to the JSON property build

Returns:

  • (String)


1808
1809
1810
# File 'lib/google/apis/config_v1/classes.rb', line 1808

def build
  @build
end

#create_timeString

Output only. Time the preview was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1813
1814
1815
# File 'lib/google/apis/config_v1/classes.rb', line 1813

def create_time
  @create_time
end

#deploymentString

Optional. Optional deployment reference. If specified, the preview will be performed using the provided deployment's current state and use any relevant fields from the deployment unless explicitly specified in the preview create request. Corresponds to the JSON property deployment

Returns:

  • (String)


1821
1822
1823
# File 'lib/google/apis/config_v1/classes.rb', line 1821

def deployment
  @deployment
end

#error_codeString

Output only. Code describing any errors that may have occurred. Corresponds to the JSON property errorCode

Returns:

  • (String)


1826
1827
1828
# File 'lib/google/apis/config_v1/classes.rb', line 1826

def error_code
  @error_code
end

#error_logsString

Output only. Link to tf-error.ndjson file, which contains the full list of the errors encountered during a Terraform preview. Format: gs://bucket/object` . Corresponds to the JSON propertyerrorLogs`

Returns:

  • (String)


1833
1834
1835
# File 'lib/google/apis/config_v1/classes.rb', line 1833

def error_logs
  @error_logs
end

#error_statusGoogle::Apis::ConfigV1::Status

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. Corresponds to the JSON property errorStatus



1843
1844
1845
# File 'lib/google/apis/config_v1/classes.rb', line 1843

def error_status
  @error_status
end

#labelsHash<String,String>

Optional. User-defined labels for the preview. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1848
1849
1850
# File 'lib/google/apis/config_v1/classes.rb', line 1848

def labels
  @labels
end

#logsString

Output only. Location of preview logs in gs://bucket/object`format. Corresponds to the JSON propertylogs`

Returns:

  • (String)


1853
1854
1855
# File 'lib/google/apis/config_v1/classes.rb', line 1853

def logs
  @logs
end

#nameString

Identifier. Resource name of the preview. Resource name can be user provided or server generated ID if unspecified. Format: projects/project/locations/ location/previews/preview` Corresponds to the JSON propertyname`

Returns:

  • (String)


1860
1861
1862
# File 'lib/google/apis/config_v1/classes.rb', line 1860

def name
  @name
end

#preview_artifactsGoogle::Apis::ConfigV1::PreviewArtifacts

Artifacts created by preview. Corresponds to the JSON property previewArtifacts



1865
1866
1867
# File 'lib/google/apis/config_v1/classes.rb', line 1865

def preview_artifacts
  @preview_artifacts
end

#preview_modeString

Optional. Current mode of preview. Corresponds to the JSON property previewMode

Returns:

  • (String)


1870
1871
1872
# File 'lib/google/apis/config_v1/classes.rb', line 1870

def preview_mode
  @preview_mode
end

#provider_configGoogle::Apis::ConfigV1::ProviderConfig

ProviderConfig contains the provider configurations. Corresponds to the JSON property providerConfig



1875
1876
1877
# File 'lib/google/apis/config_v1/classes.rb', line 1875

def provider_config
  @provider_config
end

#service_accountString

Required. User-specified Service Account (SA) credentials to be used when previewing resources. Format: projects/projectID/serviceAccounts/ serviceAccount` Corresponds to the JSON propertyserviceAccount`

Returns:

  • (String)


1882
1883
1884
# File 'lib/google/apis/config_v1/classes.rb', line 1882

def 
  @service_account
end

#stateString

Output only. Current state of the preview. Corresponds to the JSON property state

Returns:

  • (String)


1887
1888
1889
# File 'lib/google/apis/config_v1/classes.rb', line 1887

def state
  @state
end

#terraform_blueprintGoogle::Apis::ConfigV1::TerraformBlueprint

TerraformBlueprint describes the source of a Terraform root module which describes the resources and configs to be deployed. Corresponds to the JSON property terraformBlueprint



1893
1894
1895
# File 'lib/google/apis/config_v1/classes.rb', line 1893

def terraform_blueprint
  @terraform_blueprint
end

#tf_errorsArray<Google::Apis::ConfigV1::TerraformError>

Output only. Summary of errors encountered during Terraform preview. It has a size limit of 10, i.e. only top 10 errors will be summarized here. Corresponds to the JSON property tfErrors



1899
1900
1901
# File 'lib/google/apis/config_v1/classes.rb', line 1899

def tf_errors
  @tf_errors
end

#tf_versionString

Output only. The current Terraform version set on the preview. It is in the format of "Major.Minor.Patch", for example, "1.3.10". Corresponds to the JSON property tfVersion

Returns:

  • (String)


1905
1906
1907
# File 'lib/google/apis/config_v1/classes.rb', line 1905

def tf_version
  @tf_version
end

#tf_version_constraintString

Optional. The user-specified Terraform version constraint. Example: "=1.3.10". Corresponds to the JSON property tfVersionConstraint

Returns:

  • (String)


1910
1911
1912
# File 'lib/google/apis/config_v1/classes.rb', line 1910

def tf_version_constraint
  @tf_version_constraint
end

#worker_poolString

Optional. The user-specified 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. If omitted and deployment resource ref provided has worker_pool defined, that worker pool is used. Corresponds to the JSON property workerPool

Returns:

  • (String)


1919
1920
1921
# File 'lib/google/apis/config_v1/classes.rb', line 1919

def worker_pool
  @worker_pool
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
# File 'lib/google/apis/config_v1/classes.rb', line 1926

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @artifacts_gcs_bucket = args[:artifacts_gcs_bucket] if args.key?(:artifacts_gcs_bucket)
  @build = args[:build] if args.key?(:build)
  @create_time = args[:create_time] if args.key?(:create_time)
  @deployment = args[:deployment] if args.key?(:deployment)
  @error_code = args[:error_code] if args.key?(:error_code)
  @error_logs = args[:error_logs] if args.key?(:error_logs)
  @error_status = args[:error_status] if args.key?(:error_status)
  @labels = args[:labels] if args.key?(:labels)
  @logs = args[:logs] if args.key?(:logs)
  @name = args[:name] if args.key?(:name)
  @preview_artifacts = args[:preview_artifacts] if args.key?(:preview_artifacts)
  @preview_mode = args[:preview_mode] if args.key?(:preview_mode)
  @provider_config = args[:provider_config] if args.key?(:provider_config)
  @service_account = args[:service_account] if args.key?(:service_account)
  @state = args[:state] if args.key?(:state)
  @terraform_blueprint = args[:terraform_blueprint] if args.key?(:terraform_blueprint)
  @tf_errors = args[:tf_errors] if args.key?(:tf_errors)
  @tf_version = args[:tf_version] if args.key?(:tf_version)
  @tf_version_constraint = args[:tf_version_constraint] if args.key?(:tf_version_constraint)
  @worker_pool = args[:worker_pool] if args.key?(:worker_pool)
end