Class Preview (0.1.7)

Preview(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A preview represents a set of actions Infra Manager would perform to move the resources towards the desired state as specified in the configuration.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

NameDescription
terraform_blueprint google.cloud.config_v1.types.TerraformBlueprint
The terraform blueprint to preview. This field is a member of oneof_ blueprint.
name str
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_pb2.Timestamp
Output only. Time the preview was created.
labels MutableMapping[str, str]
Optional. User-defined labels for the preview.
state google.cloud.config_v1.types.Preview.State
Output only. Current state of the preview.
deployment str
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 google.cloud.config_v1.types.Preview.PreviewMode
Optional. Current mode of preview.
service_account str
Optional. Optional service account. If omitted, the deployment resource reference must be provided, and the service account attached to the deployment will be used.
artifacts_gcs_bucket str
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:// 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. This field is a member of oneof_ _artifacts_gcs_bucket.
worker_pool str
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. This field is a member of oneof_ _worker_pool.
error_code google.cloud.config_v1.types.Preview.ErrorCode
Output only. Code describing any errors that may have occurred.
error_status google.rpc.status_pb2.Status
Output only. Additional information regarding the current state.
build str
Output only. Cloud Build instance UUID associated with this preview.
tf_errors MutableSequence[google.cloud.config_v1.types.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 str
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.types.PreviewArtifacts
Output only. Artifacts from preview.
logs str
Output only. Location of preview logs in gs://{bucket}/{object} format.

Classes

ErrorCode

ErrorCode(value)

Possible errors that can occur with previews.

Values: ERROR_CODE_UNSPECIFIED (0): No error code was specified. CLOUD_BUILD_PERMISSION_DENIED (1): Cloud Build failed due to a permissions issue. BUCKET_CREATION_PERMISSION_DENIED (2): Cloud Storage bucket failed to create due to a permissions issue. BUCKET_CREATION_FAILED (3): Cloud Storage bucket failed for a non-permissions-related issue. DEPLOYMENT_LOCK_ACQUIRE_FAILED (4): Acquiring lock on provided deployment reference failed. PREVIEW_BUILD_API_FAILED (5): Preview encountered an error when trying to access Cloud Build API. PREVIEW_BUILD_RUN_FAILED (6): Preview created a build but build failed and logs were generated.

LabelsEntry

LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.

PreviewMode

PreviewMode(value)

Preview mode provides options for customizing preview operations.

Values: PREVIEW_MODE_UNSPECIFIED (0): Unspecified policy, default mode will be used. DEFAULT (1): DEFAULT mode generates an execution plan for reconciling current resource state into expected resource state. DELETE (2): DELETE mode generates as execution plan for destroying current resources.

State

State(value)

Possible states of a preview.

Values: STATE_UNSPECIFIED (0): The default value. This value is used if the state is unknown. CREATING (1): The preview is being created. SUCCEEDED (2): The preview has succeeded. APPLYING (3): The preview is being applied. STALE (4): The preview is stale. A preview can become stale if a revision has been applied after this preview was created. DELETING (5): The preview is being deleted. FAILED (6): The preview has encountered an unexpected error. DELETED (7): The preview has been deleted.