Google Cloud Build V1 Client - Class Secret (0.3.8)

Reference documentation and code samples for the Google Cloud Build V1 Client class Secret.

Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.

Note: Use kmsKeyName with available_secrets instead of using kmsKeyName with secret. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.

Generated from protobuf message google.devtools.cloudbuild.v1.Secret

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ kms_key_name string

Cloud KMS key name to use to decrypt these envs.

↳ secret_env array|Google\Protobuf\Internal\MapField

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

getKmsKeyName

Cloud KMS key name to use to decrypt these envs.

Returns
TypeDescription
string

setKmsKeyName

Cloud KMS key name to use to decrypt these envs.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSecretEnv

Map of environment variable name to its encrypted value.

Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setSecretEnv

Map of environment variable name to its encrypted value.

Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this