Reference documentation and code samples for the Google Cloud Config V1 Client class Preview.
A preview represents a set of actions Infra Manager would perform to move the resources towards the desired state as specified in the configuration.
Generated from protobuf message google.cloud.config.v1.Preview
Namespace
Google \ Cloud \ Config \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ terraform_blueprint
↳ name
string
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}
↳ create_time
↳ labels
↳ state
int
Output only. Current state of the preview.
↳ deployment
string
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.
↳ preview_mode
int
Optional. Current mode of preview.
↳ service_account
string
Required. User-specified Service Account (SA) credentials to be used when previewing resources. Format: projects/{projectID}/serviceAccounts/{serviceAccount}
↳ artifacts_gcs_bucket
string
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://<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
If omitted and deployment resource ref provided has artifacts_gcs_bucket defined, that artifact bucket is used.
↳ worker_pool
string
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.
↳ error_code
int
Output only. Code describing any errors that may have occurred.
↳ error_status
↳ build
string
Output only. Cloud Build instance UUID associated with this preview.
↳ tf_errors
array< 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.
↳ error_logs
string
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}
.
↳ preview_artifacts
↳ logs
string
Output only. Location of preview logs in gs://{bucket}/{object}
format.
↳ tf_version
string
Output only. The current Terraform version set on the preview. It is in the format of "Major.Minor.Patch", for example, "1.3.10".
↳ tf_version_constraint
string
Optional. The user-specified Terraform version constraint. Example: "=1.3.10".
↳ annotations
array| Google\Protobuf\Internal\MapField
Optional. Arbitrary key-value metadata storage e.g. to help client tools identifiy preview during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
getTerraformBlueprint
The terraform blueprint to preview.
hasTerraformBlueprint
setTerraformBlueprint
The terraform blueprint to preview.
$this
getName
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}
string
setName
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}
var
string
$this
getCreateTime
Output only. Time the preview was created.
hasCreateTime
clearCreateTime
setCreateTime
Output only. Time the preview was created.
$this
getLabels
Optional. User-defined labels for the preview.
setLabels
Optional. User-defined labels for the preview.
$this
getState
Output only. Current state of the preview.
int
setState
Output only. Current state of the preview.
var
int
$this
getDeployment
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.
string
setDeployment
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.
var
string
$this
getPreviewMode
Optional. Current mode of preview.
int
setPreviewMode
Optional. Current mode of preview.
var
int
$this
getServiceAccount
Required. User-specified Service Account (SA) credentials to be used when previewing resources.
Format: projects/{projectID}/serviceAccounts/{serviceAccount}
string
setServiceAccount
Required. User-specified Service Account (SA) credentials to be used when previewing resources.
Format: projects/{projectID}/serviceAccounts/{serviceAccount}
var
string
$this
getArtifactsGcsBucket
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://<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
If omitted and deployment resource ref provided has artifacts_gcs_bucket defined, that artifact bucket is used.
string
hasArtifactsGcsBucket
clearArtifactsGcsBucket
setArtifactsGcsBucket
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://<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
If omitted and deployment resource ref provided has artifacts_gcs_bucket defined, that artifact bucket is used.
var
string
$this
getWorkerPool
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.
string
hasWorkerPool
clearWorkerPool
setWorkerPool
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.
var
string
$this
getErrorCode
Output only. Code describing any errors that may have occurred.
int
setErrorCode
Output only. Code describing any errors that may have occurred.
var
int
$this
getErrorStatus
Output only. Additional information regarding the current state.
hasErrorStatus
clearErrorStatus
setErrorStatus
Output only. Additional information regarding the current state.
$this
getBuild
Output only. Cloud Build instance UUID associated with this preview.
string
setBuild
Output only. Cloud Build instance UUID associated with this preview.
var
string
$this
getTfErrors
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.
setTfErrors
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.
$this
getErrorLogs
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}
.
string
setErrorLogs
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}
.
var
string
$this
getPreviewArtifacts
Output only. Artifacts from preview.
hasPreviewArtifacts
clearPreviewArtifacts
setPreviewArtifacts
Output only. Artifacts from preview.
$this
getLogs
Output only. Location of preview logs in gs://{bucket}/{object}
format.
string
setLogs
Output only. Location of preview logs in gs://{bucket}/{object}
format.
var
string
$this
getTfVersion
Output only. The current Terraform version set on the preview.
It is in the format of "Major.Minor.Patch", for example, "1.3.10".
string
setTfVersion
Output only. The current Terraform version set on the preview.
It is in the format of "Major.Minor.Patch", for example, "1.3.10".
var
string
$this
getTfVersionConstraint
Optional. The user-specified Terraform version constraint.
Example: "=1.3.10".
string
hasTfVersionConstraint
clearTfVersionConstraint
setTfVersionConstraint
Optional. The user-specified Terraform version constraint.
Example: "=1.3.10".
var
string
$this
getAnnotations
Optional. Arbitrary key-value metadata storage e.g. to help client tools identifiy preview during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
setAnnotations
Optional. Arbitrary key-value metadata storage e.g. to help client tools identifiy preview during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
$this
getBlueprint
string