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.



1928
1929
1930
# File 'lib/google/apis/config_v1/classes.rb', line 1928

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


1799
1800
1801
# File 'lib/google/apis/config_v1/classes.rb', line 1799

def annotations
  @annotations
end

#artifacts_gcs_bucketString

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)


1810
1811
1812
# File 'lib/google/apis/config_v1/classes.rb', line 1810

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)


1815
1816
1817
# File 'lib/google/apis/config_v1/classes.rb', line 1815

def build
  @build
end

#create_timeString

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

Returns:

  • (String)


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

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)


1828
1829
1830
# File 'lib/google/apis/config_v1/classes.rb', line 1828

def deployment
  @deployment
end

#error_codeString

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

Returns:

  • (String)


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

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)


1840
1841
1842
# File 'lib/google/apis/config_v1/classes.rb', line 1840

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



1850
1851
1852
# File 'lib/google/apis/config_v1/classes.rb', line 1850

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


1855
1856
1857
# File 'lib/google/apis/config_v1/classes.rb', line 1855

def labels
  @labels
end

#logsString

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

Returns:

  • (String)


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

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)


1867
1868
1869
# File 'lib/google/apis/config_v1/classes.rb', line 1867

def name
  @name
end

#preview_artifactsGoogle::Apis::ConfigV1::PreviewArtifacts

Artifacts created by preview. Corresponds to the JSON property previewArtifacts



1872
1873
1874
# File 'lib/google/apis/config_v1/classes.rb', line 1872

def preview_artifacts
  @preview_artifacts
end

#preview_modeString

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

Returns:

  • (String)


1877
1878
1879
# File 'lib/google/apis/config_v1/classes.rb', line 1877

def preview_mode
  @preview_mode
end

#provider_configGoogle::Apis::ConfigV1::ProviderConfig

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



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

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)


1889
1890
1891
# File 'lib/google/apis/config_v1/classes.rb', line 1889

def 
  @service_account
end

#stateString

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

Returns:

  • (String)


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

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



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

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



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

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)


1912
1913
1914
# File 'lib/google/apis/config_v1/classes.rb', line 1912

def tf_version
  @tf_version
end

#tf_version_constraintString

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

Returns:

  • (String)


1917
1918
1919
# File 'lib/google/apis/config_v1/classes.rb', line 1917

def tf_version_constraint
  @tf_version_constraint
end

#worker_poolString

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)


1926
1927
1928
# File 'lib/google/apis/config_v1/classes.rb', line 1926

def worker_pool
  @worker_pool
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
# File 'lib/google/apis/config_v1/classes.rb', line 1933

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