Google Cloud Config V1 Client - Class Preview (0.5.1)

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 \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ terraform_blueprint Google\Cloud\Config\V1\TerraformBlueprint

The terraform blueprint to preview.

↳ 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 Google\Protobuf\Timestamp

Output only. Time the preview was created.

↳ labels array|Google\Protobuf\Internal\MapField

Optional. User-defined labels for the preview.

↳ 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

Optional. 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 Google\Rpc\Status

Output only. Additional information regarding the current state.

↳ build string

Output only. Cloud Build instance UUID associated with this preview.

↳ tf_errors array<Google\Cloud\Config\V1\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 Google\Cloud\Config\V1\PreviewArtifacts

Output only. Artifacts from preview.

↳ 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".

getTerraformBlueprint

The terraform blueprint to preview.

Returns
Type Description
Google\Cloud\Config\V1\TerraformBlueprint|null

hasTerraformBlueprint

setTerraformBlueprint

The terraform blueprint to preview.

Parameter
Name Description
var Google\Cloud\Config\V1\TerraformBlueprint
Returns
Type Description
$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}

Returns
Type Description
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}

Parameter
Name Description
var string
Returns
Type Description
$this

getCreateTime

Output only. Time the preview was created.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. Time the preview was created.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getLabels

Optional. User-defined labels for the preview.

Returns
Type Description
Google\Protobuf\Internal\MapField

setLabels

Optional. User-defined labels for the preview.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getState

Output only. Current state of the preview.

Returns
Type Description
int

setState

Output only. Current state of the preview.

Parameter
Name Description
var int
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var string
Returns
Type Description
$this

getPreviewMode

Optional. Current mode of preview.

Returns
Type Description
int

setPreviewMode

Optional. Current mode of preview.

Parameter
Name Description
var int
Returns
Type Description
$this

getServiceAccount

Optional. User-specified Service Account (SA) credentials to be used when previewing resources.

Format: projects/{projectID}/serviceAccounts/{serviceAccount}

Returns
Type Description
string

setServiceAccount

Optional. User-specified Service Account (SA) credentials to be used when previewing resources.

Format: projects/{projectID}/serviceAccounts/{serviceAccount}

Parameter
Name Description
var string
Returns
Type Description
$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.
Returns
Type Description
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.
Parameter
Name Description
var string
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var string
Returns
Type Description
$this

getErrorCode

Output only. Code describing any errors that may have occurred.

Returns
Type Description
int

setErrorCode

Output only. Code describing any errors that may have occurred.

Parameter
Name Description
var int
Returns
Type Description
$this

getErrorStatus

Output only. Additional information regarding the current state.

Returns
Type Description
Google\Rpc\Status|null

hasErrorStatus

clearErrorStatus

setErrorStatus

Output only. Additional information regarding the current state.

Parameter
Name Description
var Google\Rpc\Status
Returns
Type Description
$this

getBuild

Output only. Cloud Build instance UUID associated with this preview.

Returns
Type Description
string

setBuild

Output only. Cloud Build instance UUID associated with this preview.

Parameter
Name Description
var string
Returns
Type Description
$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.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

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.

Parameter
Name Description
var array<Google\Cloud\Config\V1\TerraformError>
Returns
Type Description
$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}.

Returns
Type Description
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}.

Parameter
Name Description
var string
Returns
Type Description
$this

getPreviewArtifacts

Output only. Artifacts from preview.

Returns
Type Description
Google\Cloud\Config\V1\PreviewArtifacts|null

hasPreviewArtifacts

clearPreviewArtifacts

setPreviewArtifacts

Output only. Artifacts from preview.

Parameter
Name Description
var Google\Cloud\Config\V1\PreviewArtifacts
Returns
Type Description
$this

getLogs

Output only. Location of preview logs in gs://{bucket}/{object} format.

Returns
Type Description
string

setLogs

Output only. Location of preview logs in gs://{bucket}/{object} format.

Parameter
Name Description
var string
Returns
Type Description
$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".

Returns
Type Description
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".

Parameter
Name Description
var string
Returns
Type Description
$this

getTfVersionConstraint

Optional. The user-specified Terraform version constraint.

Example: "=1.3.10".

Returns
Type Description
string

hasTfVersionConstraint

clearTfVersionConstraint

setTfVersionConstraint

Optional. The user-specified Terraform version constraint.

Example: "=1.3.10".

Parameter
Name Description
var string
Returns
Type Description
$this

getBlueprint

Returns
Type Description
string