# Cloud Build V1 API - Class Google::Cloud::Build::V1::BuildOptions (v1.12.0)

1.12.0 (latest) 1.11.0 1.10.0 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.1 0.27.1 0.26.2 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.3 Reference documentation and code samples for the Cloud Build V1 API class Google::Cloud::Build::V1::BuildOptions.

Optional arguments to enable specific features of builds.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #automap_substitutions

    def automap_substitutions() -> ::Boolean

**Returns**

- (::Boolean) --- Option to include built-in and custom substitutions as env variables for all build steps.

### #automap_substitutions=

    def automap_substitutions=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Option to include built-in and custom substitutions as env variables for all build steps.
**Returns**

- (::Boolean) --- Option to include built-in and custom substitutions as env variables for all build steps.

### #default_logs_bucket_behavior

    def default_logs_bucket_behavior() -> ::Google::Cloud::Build::V1::BuildOptions::DefaultLogsBucketBehavior

**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::DefaultLogsBucketBehavior](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-DefaultLogsBucketBehavior)) --- Optional. Option to specify how default logs buckets are setup.

### #default_logs_bucket_behavior=

    def default_logs_bucket_behavior=(value) -> ::Google::Cloud::Build::V1::BuildOptions::DefaultLogsBucketBehavior

**Parameter**

- **value** ([::Google::Cloud::Build::V1::BuildOptions::DefaultLogsBucketBehavior](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-DefaultLogsBucketBehavior)) --- Optional. Option to specify how default logs buckets are setup.
**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::DefaultLogsBucketBehavior](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-DefaultLogsBucketBehavior)) --- Optional. Option to specify how default logs buckets are setup.

### #disk_size_gb

    def disk_size_gb() -> ::Integer

**Returns**

- (::Integer) --- Requested disk size for the VM that runs the build. Note that this is *NOT* "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 4000GB; builds that request more than the maximum are rejected with an error.

### #disk_size_gb=

    def disk_size_gb=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Requested disk size for the VM that runs the build. Note that this is *NOT* "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 4000GB; builds that request more than the maximum are rejected with an error.
**Returns**

- (::Integer) --- Requested disk size for the VM that runs the build. Note that this is *NOT* "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 4000GB; builds that request more than the maximum are rejected with an error.

### #dynamic_substitutions

    def dynamic_substitutions() -> ::Boolean

**Returns**

- (::Boolean) --- Option to specify whether or not to apply bash style string operations to the substitutions.

  NOTE: this is always enabled for triggered builds and cannot be
  overridden in the build configuration file.

### #dynamic_substitutions=

    def dynamic_substitutions=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Option to specify whether or not to apply bash style string operations to the substitutions.


  NOTE: this is always enabled for triggered builds and cannot be
  overridden in the build configuration file.
**Returns**

- (::Boolean) --- Option to specify whether or not to apply bash style string operations to the substitutions.

  NOTE: this is always enabled for triggered builds and cannot be
  overridden in the build configuration file.

### #enable_structured_logging

    def enable_structured_logging() -> ::Boolean

**Returns**

- (::Boolean) --- Optional. Option to specify whether structured logging is enabled.

  If true, JSON-formatted logs are parsed as structured logs.

### #enable_structured_logging=

    def enable_structured_logging=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Optional. Option to specify whether structured logging is enabled.


  If true, JSON-formatted logs are parsed as structured logs.
**Returns**

- (::Boolean) --- Optional. Option to specify whether structured logging is enabled.

  If true, JSON-formatted logs are parsed as structured logs.

### #env

    def env() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

  The elements are of the form "KEY=VALUE" for the environment variable "KEY"
  being given the value "VALUE".

### #env=

    def env=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.


  The elements are of the form "KEY=VALUE" for the environment variable "KEY"
  being given the value "VALUE".
**Returns**

- (::Array\<::String\>) --- A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

  The elements are of the form "KEY=VALUE" for the environment variable "KEY"
  being given the value "VALUE".

### #log_streaming_option

    def log_streaming_option() -> ::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption

**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-LogStreamingOption)) --- Option to define build log streaming behavior to Cloud Storage.

### #log_streaming_option=

    def log_streaming_option=(value) -> ::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption

**Parameter**

- **value** ([::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-LogStreamingOption)) --- Option to define build log streaming behavior to Cloud Storage.
**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-LogStreamingOption)) --- Option to define build log streaming behavior to Cloud Storage.

### #logging

    def logging() -> ::Google::Cloud::Build::V1::BuildOptions::LoggingMode

**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::LoggingMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-LoggingMode)) --- Option to specify the logging mode, which determines if and where build logs are stored.

### #logging=

    def logging=(value) -> ::Google::Cloud::Build::V1::BuildOptions::LoggingMode

**Parameter**

- **value** ([::Google::Cloud::Build::V1::BuildOptions::LoggingMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-LoggingMode)) --- Option to specify the logging mode, which determines if and where build logs are stored.
**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::LoggingMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-LoggingMode)) --- Option to specify the logging mode, which determines if and where build logs are stored.

### #machine_type

    def machine_type() -> ::Google::Cloud::Build::V1::BuildOptions::MachineType

**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::MachineType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-MachineType)) --- Compute Engine machine type on which to run the build.

### #machine_type=

    def machine_type=(value) -> ::Google::Cloud::Build::V1::BuildOptions::MachineType

**Parameter**

- **value** ([::Google::Cloud::Build::V1::BuildOptions::MachineType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-MachineType)) --- Compute Engine machine type on which to run the build.
**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::MachineType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-MachineType)) --- Compute Engine machine type on which to run the build.

### #pool

    def pool() -> ::Google::Cloud::Build::V1::BuildOptions::PoolOption

**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::PoolOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-PoolOption)) --- Optional. Specification for execution on a `WorkerPool`.


  See [running builds in a private
  pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
  for more information.

### #pool=

    def pool=(value) -> ::Google::Cloud::Build::V1::BuildOptions::PoolOption

**Parameter**

- **value** ([::Google::Cloud::Build::V1::BuildOptions::PoolOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-PoolOption)) --- Optional. Specification for execution on a `WorkerPool`.


  See [running builds in a private
  pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
  for more information.
**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::PoolOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-PoolOption)) --- Optional. Specification for execution on a `WorkerPool`.


  See [running builds in a private
  pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
  for more information.

### #requested_verify_option

    def requested_verify_option() -> ::Google::Cloud::Build::V1::BuildOptions::VerifyOption

**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::VerifyOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-VerifyOption)) --- Requested verifiability options.

### #requested_verify_option=

    def requested_verify_option=(value) -> ::Google::Cloud::Build::V1::BuildOptions::VerifyOption

**Parameter**

- **value** ([::Google::Cloud::Build::V1::BuildOptions::VerifyOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-VerifyOption)) --- Requested verifiability options.
**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::VerifyOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-VerifyOption)) --- Requested verifiability options.

### #secret_env

    def secret_env() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. These variables will be available to all build steps in this build.

### #secret_env=

    def secret_env=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. These variables will be available to all build steps in this build.
**Returns**

- (::Array\<::String\>) --- A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. These variables will be available to all build steps in this build.

### #source_provenance_hash

    def source_provenance_hash() -> ::Array<::Google::Cloud::Build::V1::Hash::HashType>

**Returns**

- (::Array\<[::Google::Cloud::Build::V1::Hash::HashType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-Hash-HashType)\>) --- Requested hash for SourceProvenance.

### #source_provenance_hash=

    def source_provenance_hash=(value) -> ::Array<::Google::Cloud::Build::V1::Hash::HashType>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Build::V1::Hash::HashType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-Hash-HashType)\>) --- Requested hash for SourceProvenance.
**Returns**

- (::Array\<[::Google::Cloud::Build::V1::Hash::HashType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-Hash-HashType)\>) --- Requested hash for SourceProvenance.

### #substitution_option

    def substitution_option() -> ::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption

**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-SubstitutionOption)) --- Option to specify behavior when there is an error in the substitution checks.


  NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
  be overridden in the build configuration file.

### #substitution_option=

    def substitution_option=(value) -> ::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption

**Parameter**

- **value** ([::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-SubstitutionOption)) --- Option to specify behavior when there is an error in the substitution checks.


  NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
  be overridden in the build configuration file.
**Returns**

- ([::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-BuildOptions-SubstitutionOption)) --- Option to specify behavior when there is an error in the substitution checks.


  NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
  be overridden in the build configuration file.

### #volumes

    def volumes() -> ::Array<::Google::Cloud::Build::V1::Volume>

**Returns**

- (::Array\<[::Google::Cloud::Build::V1::Volume](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-Volume)\>) --- Global list of volumes to mount for ALL build steps


  Each volume is created as an empty volume prior to starting the build
  process. Upon completion of the build, volumes and their contents are
  discarded. Global volume names and paths cannot conflict with the volumes
  defined a build step.

  Using a global volume in a build with only one step is not valid as
  it is indicative of a build request with an incorrect configuration.

### #volumes=

    def volumes=(value) -> ::Array<::Google::Cloud::Build::V1::Volume>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Build::V1::Volume](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-Volume)\>) --- Global list of volumes to mount for ALL build steps


  Each volume is created as an empty volume prior to starting the build
  process. Upon completion of the build, volumes and their contents are
  discarded. Global volume names and paths cannot conflict with the volumes
  defined a build step.

  Using a global volume in a build with only one step is not valid as
  it is indicative of a build request with an incorrect configuration.
**Returns**

- (::Array\<[::Google::Cloud::Build::V1::Volume](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest/Google-Cloud-Build-V1-Volume)\>) --- Global list of volumes to mount for ALL build steps


  Each volume is created as an empty volume prior to starting the build
  process. Upon completion of the build, volumes and their contents are
  discarded. Global volume names and paths cannot conflict with the volumes
  defined a build step.

  Using a global volume in a build with only one step is not valid as
  it is indicative of a build request with an incorrect configuration.

### #worker_pool

    def worker_pool() -> ::String

**Returns**

- (::String) --- This field deprecated; please use `pool.name` instead.

### #worker_pool=

    def worker_pool=(value) -> ::String

**Parameter**

- **value** (::String) --- This field deprecated; please use `pool.name` instead.
**Returns**

- (::String) --- This field deprecated; please use `pool.name` instead.