Class AttachedDiskInitializeParams.Builder (1.91.0)

public static final class AttachedDiskInitializeParams.Builder extends GeneratedMessageV3.Builder<AttachedDiskInitializeParams.Builder> implements AttachedDiskInitializeParamsOrBuilder

[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.

This field is persisted and returned for instanceTemplate and not returned in the context of instance.

This property is mutually exclusive with the source property; you can only define one or the other, but not both.

Protobuf type google.cloud.compute.v1.AttachedDiskInitializeParams

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllLicenses(Iterable<String> values)

public AttachedDiskInitializeParams.Builder addAllLicenses(Iterable<String> values)

A list of publicly visible licenses. Reserved for Google's use.

repeated string licenses = 337642578;

Parameter
Name Description
values Iterable<String>

The licenses to add.

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

addAllReplicaZones(Iterable<String> values)

public AttachedDiskInitializeParams.Builder addAllReplicaZones(Iterable<String> values)

Required for each regional disk associated with the instance. Specify the URLs of the zones where the disk should be replicated to. You must provide exactly two replica zones, and one zone must be the same as the instance zone.

repeated string replica_zones = 48438272;

Parameter
Name Description
values Iterable<String>

The replicaZones to add.

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

addAllResourcePolicies(Iterable<String> values)

public AttachedDiskInitializeParams.Builder addAllResourcePolicies(Iterable<String> values)

Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.

repeated string resource_policies = 22220385;

Parameter
Name Description
values Iterable<String>

The resourcePolicies to add.

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

addLicenses(String value)

public AttachedDiskInitializeParams.Builder addLicenses(String value)

A list of publicly visible licenses. Reserved for Google's use.

repeated string licenses = 337642578;

Parameter
Name Description
value String

The licenses to add.

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

addLicensesBytes(ByteString value)

public AttachedDiskInitializeParams.Builder addLicensesBytes(ByteString value)

A list of publicly visible licenses. Reserved for Google's use.

repeated string licenses = 337642578;

Parameter
Name Description
value ByteString

The bytes of the licenses to add.

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AttachedDiskInitializeParams.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AttachedDiskInitializeParams.Builder
Overrides

addReplicaZones(String value)

public AttachedDiskInitializeParams.Builder addReplicaZones(String value)

Required for each regional disk associated with the instance. Specify the URLs of the zones where the disk should be replicated to. You must provide exactly two replica zones, and one zone must be the same as the instance zone.

repeated string replica_zones = 48438272;

Parameter
Name Description
value String

The replicaZones to add.

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

addReplicaZonesBytes(ByteString value)

public AttachedDiskInitializeParams.Builder addReplicaZonesBytes(ByteString value)

Required for each regional disk associated with the instance. Specify the URLs of the zones where the disk should be replicated to. You must provide exactly two replica zones, and one zone must be the same as the instance zone.

repeated string replica_zones = 48438272;

Parameter
Name Description
value ByteString

The bytes of the replicaZones to add.

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

addResourcePolicies(String value)

public AttachedDiskInitializeParams.Builder addResourcePolicies(String value)

Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.

repeated string resource_policies = 22220385;

Parameter
Name Description
value String

The resourcePolicies to add.

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

addResourcePoliciesBytes(ByteString value)

public AttachedDiskInitializeParams.Builder addResourcePoliciesBytes(ByteString value)

Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.

repeated string resource_policies = 22220385;

Parameter
Name Description
value ByteString

The bytes of the resourcePolicies to add.

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

build()

public AttachedDiskInitializeParams build()
Returns
Type Description
AttachedDiskInitializeParams

buildPartial()

public AttachedDiskInitializeParams buildPartial()
Returns
Type Description
AttachedDiskInitializeParams

clear()

public AttachedDiskInitializeParams.Builder clear()
Returns
Type Description
AttachedDiskInitializeParams.Builder
Overrides

clearArchitecture()

public AttachedDiskInitializeParams.Builder clearArchitecture()

The architecture of the attached disk. Valid values are arm64 or x86_64. Check the Architecture enum for the list of possible values.

optional string architecture = 302803283;

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

clearDescription()

public AttachedDiskInitializeParams.Builder clearDescription()

An optional description. Provide this property when creating the disk.

optional string description = 422937596;

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

clearDiskName()

public AttachedDiskInitializeParams.Builder clearDiskName()

Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.

optional string disk_name = 92807149;

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

clearDiskSizeGb()

public AttachedDiskInitializeParams.Builder clearDiskSizeGb()

Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.

optional int64 disk_size_gb = 316263735;

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

clearDiskType()

public AttachedDiskInitializeParams.Builder clearDiskType()

Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:

https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard

For a full list of acceptable values, seePersistent disk types. If you specify this field when creating a VM, you can provide either the full or partial URL. For example, the following values are valid:

  - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
- projects/project/zones/zone/diskTypes/diskType
- zones/zone/diskTypes/diskType

If you specify this field when creating or updating an instance template or all-instances configuration, specify the type of the disk, not the URL. For example: pd-standard.

optional string disk_type = 93009052;

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

clearEnableConfidentialCompute()

public AttachedDiskInitializeParams.Builder clearEnableConfidentialCompute()

Whether this disk is using confidential compute mode.

optional bool enable_confidential_compute = 102135228;

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AttachedDiskInitializeParams.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AttachedDiskInitializeParams.Builder
Overrides

clearLabels()

public AttachedDiskInitializeParams.Builder clearLabels()
Returns
Type Description
AttachedDiskInitializeParams.Builder

clearLicenses()

public AttachedDiskInitializeParams.Builder clearLicenses()

A list of publicly visible licenses. Reserved for Google's use.

repeated string licenses = 337642578;

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

clearOnUpdateAction()

public AttachedDiskInitializeParams.Builder clearOnUpdateAction()

Specifies which action to take on instance update with this disk. Default is to use the existing disk. Check the OnUpdateAction enum for the list of possible values.

optional string on_update_action = 202451980;

Returns
Type Description
AttachedDiskInitializeParams.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public AttachedDiskInitializeParams.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AttachedDiskInitializeParams.Builder
Overrides

clearProvisionedIops()

public AttachedDiskInitializeParams.Builder clearProvisionedIops