v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-132971121.5 KB
projects

Creates a Preview.

post/v1/{+parent}/previews

Path parameters

parentstring required

Required. The parent in whose context the Preview is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

Query parameters

previewIdstring

Optional. The preview ID.

requestIdstring

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Request body

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}

createTimestring google-datetime

Output only. Time the preview was created.

labelsobject

Optional. User-defined labels for the preview.

state'STATE_UNSPECIFIED' | 'CREATING' | 'SUCCEEDED' | 'APPLYING' | 'STALE' | 'DELETING' | 'FAILED' | 'DELETED'

Output only. Current state of the preview.

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.

previewMode'PREVIEW_MODE_UNSPECIFIED' | 'DEFAULT' | 'DELETE'

Optional. Current mode of preview.

serviceAccountstring

Required. User-specified Service Account (SA) credentials to be used when previewing resources. Format: projects/{projectID}/serviceAccounts/{serviceAccount}

artifactsGcsBucketstring

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

workerPoolstring

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.

errorCode'ERROR_CODE_UNSPECIFIED' | 'CLOUD_BUILD_PERMISSION_DENIED' | 'BUCKET_CREATION_PERMISSION_DENIED' | 'BUCKET_CREATION_FAILED' | 'DEPLOYMENT_LOCK_ACQUIRE_FAILED' | 'PREVIEW_BUILD_API_FAILED' | 'PREVIEW_BUILD_RUN_FAILED' | 'EXTERNAL_VALUE_SOURCE_IMPORT_FAILED'

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

buildstring

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

errorLogsstring

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

logsstring

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

tfVersionstring

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

tfVersionConstraintstring

The user-specified Terraform version constraint. Example: "=1.3.10".

annotationsobject

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.

Response

Successful response