# Google Cloud Config V1 Client - Class Deployment (1.8.0)

1.8.0 (latest) 1.7.2 1.6.1 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.5.2 0.2.0 0.1.3 Reference documentation and code samples for the Google Cloud Config V1 Client class Deployment.

A Deployment is a group of resources and configs managed and provisioned by
Infra Manager.

Generated from protobuf message `google.cloud.config.v1.Deployment`

## Namespace

Google \\ Cloud \\ Config \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ terraform_blueprint` | `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.TerraformBlueprint` A blueprint described using Terraform's HashiCorp Configuration Language as a root module. |
| `↳ name` | `string` Identifier. Resource name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}` |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Time when the deployment was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Time when the deployment was last modified. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. User-defined metadata for the deployment. |
| `↳ state` | `int` Output only. Current state of the deployment. |
| `↳ latest_revision` | `string` Output only. Revision name that was most recently applied. Format: `projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}` |
| `↳ state_detail` | `string` Output only. Additional information regarding the current state. |
| `↳ error_code` | `int` Output only. Error code describing errors that may have occurred. |
| `↳ delete_results` | `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.ApplyResults` Output only. Location of artifacts from a DeleteDeployment operation. |
| `↳ delete_build` | `string` Output only. Cloud Build instance UUID associated with deleting this deployment. |
| `↳ delete_logs` | `string` Output only. Location of Cloud Build logs in Google Cloud Storage, populated when deleting this deployment. Format: `gs://{bucket}/{object}`. |
| `↳ tf_errors` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.TerraformError>` Output only. Errors encountered when deleting this deployment. Errors are truncated to 10 entries, see `delete_results` and `error_logs` for full details. |
| `↳ error_logs` | `string` Output only. Location of Terraform error logs in Google Cloud Storage. Format: `gs://{bucket}/{object}`. |
| `↳ artifacts_gcs_bucket` | `string` Optional. User-defined location of Cloud Build logs and artifacts 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` - The field cannot be updated, including changing its presence |
| `↳ service_account` | `string` Required. User-specified Service Account (SA) credentials to be used when actuating resources. Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` |
| `↳ import_existing_resources` | `bool` 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` | `string` Optional. 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. |
| `↳ lock_state` | `int` Output only. Current lock state of the deployment. |
| `↳ tf_version_constraint` | `string` Optional. The user-specified Terraform version constraint. Example: "=1.3.10". |
| `↳ tf_version` | `string` Output only. The current Terraform version set on the deployment. It is in the format of "Major.Minor.Patch", for example, "1.3.10". |
| `↳ quota_validation` | `int` Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies. |
| `↳ annotations` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployments during automation. See <https://google.aip.dev/148#annotations> for details on format and size limitations. |
| `↳ provider_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.ProviderConfig` Optional. This field specifies the provider configurations. |

### getTerraformBlueprint

A blueprint described using Terraform's HashiCorp Configuration Language
as a root module.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.TerraformBlueprint|null` |   |

### hasTerraformBlueprint

### setTerraformBlueprint

A blueprint described using Terraform's HashiCorp Configuration Language
as a root module.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.TerraformBlueprint` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getName

Identifier. Resource name of the deployment.

Format: `projects/{project}/locations/{location}/deployments/{deployment}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Identifier. Resource name of the deployment.

Format: `projects/{project}/locations/{location}/deployments/{deployment}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. Time when the deployment was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Time when the deployment was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

Output only. Time when the deployment was last modified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Time when the deployment was last modified.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLabels

Optional. User-defined metadata for the deployment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Optional. User-defined metadata for the deployment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getState

Output only. Current state of the deployment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.Deployment.State). |

### setState

Output only. Current state of the deployment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.Deployment.State). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLatestRevision

Output only. Revision name that was most recently applied.

Format: `projects/{project}/locations/{location}/deployments/{deployment}/
revisions/{revision}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setLatestRevision

Output only. Revision name that was most recently applied.

Format: `projects/{project}/locations/{location}/deployments/{deployment}/
revisions/{revision}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStateDetail

Output only. Additional information regarding the current state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setStateDetail

Output only. Additional information regarding the current state.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getErrorCode

Output only. Error code describing errors that may have occurred.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ErrorCode](https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.Deployment.ErrorCode). |

### setErrorCode

Output only. Error code describing errors that may have occurred.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ErrorCode](https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.Deployment.ErrorCode). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDeleteResults

Output only. Location of artifacts from a DeleteDeployment operation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.ApplyResults|null` |   |

### hasDeleteResults

### clearDeleteResults

### setDeleteResults

Output only. Location of artifacts from a DeleteDeployment operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.ApplyResults` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDeleteBuild

Output only. Cloud Build instance UUID associated with deleting this
deployment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDeleteBuild

Output only. Cloud Build instance UUID associated with deleting this
deployment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDeleteLogs

Output only. Location of Cloud Build logs in Google Cloud Storage,
populated when deleting this deployment. Format: `gs://{bucket}/{object}`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDeleteLogs

Output only. Location of Cloud Build logs in Google Cloud Storage,
populated when deleting this deployment. Format: `gs://{bucket}/{object}`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTfErrors

Output only. Errors encountered when deleting this deployment.

Errors are truncated to 10 entries, see `delete_results` and `error_logs`
for full details.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.TerraformError>` |   |

### setTfErrors

Output only. Errors encountered when deleting this deployment.

Errors are truncated to 10 entries, see `delete_results` and `error_logs`
for full details.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.TerraformError>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getErrorLogs

Output only. Location of Terraform error logs in Google Cloud Storage.

Format: `gs://{bucket}/{object}`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setErrorLogs

Output only. Location of Terraform error logs in Google Cloud Storage.

Format: `gs://{bucket}/{object}`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getArtifactsGcsBucket

Optional. User-defined location of Cloud Build logs and artifacts 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`
- The field cannot be updated, including changing its presence

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasArtifactsGcsBucket

### clearArtifactsGcsBucket

### setArtifactsGcsBucket

Optional. User-defined location of Cloud Build logs and artifacts 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`
- The field cannot be updated, including changing its presence

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getServiceAccount

Required. User-specified Service Account (SA) credentials to be used when
actuating resources.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasServiceAccount

### clearServiceAccount

### setServiceAccount

Required. User-specified Service Account (SA) credentials to be used when
actuating resources.

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getImportExistingResources

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasImportExistingResources

### clearImportExistingResources

### setImportExistingResources

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getWorkerPool

Optional. 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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasWorkerPool

### clearWorkerPool

### setWorkerPool

Optional. 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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLockState

Output only. Current lock state of the deployment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [LockState](https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.Deployment.LockState). |

### setLockState

Output only. Current lock state of the deployment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [LockState](https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.Deployment.LockState). |

| **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` |   |

### getTfVersion

Output only. The current Terraform version set on the deployment.

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 deployment.

It is in the format of "Major.Minor.Patch", for example, "1.3.10".

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getQuotaValidation

Optional. Input to control quota checks for resources in terraform
configuration files. There are limited resources on which quota validation
applies.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [QuotaValidation](https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.QuotaValidation). |

### setQuotaValidation

Optional. Input to control quota checks for resources in terraform
configuration files. There are limited resources on which quota validation
applies.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [QuotaValidation](https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.QuotaValidation). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAnnotations

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setAnnotations

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getProviderConfig

Optional. This field specifies the provider configurations.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.ProviderConfig|null` |   |

### hasProviderConfig

### clearProviderConfig

### setProviderConfig

Optional. This field specifies the provider configurations.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.ProviderConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBlueprint

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |