1.0.0-alpha36 (latest) 1.0.0-alpha35

    public sealed class AllocationPolicy.Types.InstanceSelection : IMessage<AllocationPolicy.Types.InstanceSelection>, IEquatable<AllocationPolicy.Types.InstanceSelection>, IDeepCloneable<AllocationPolicy.Types.InstanceSelection>, IBufferMessage, IMessage

Reference documentation and code samples for the Batch v1alpha API class AllocationPolicy.Types.InstanceSelection.

Defines an instance selection for a given instance flexibility policy.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> AllocationPolicy.Types.InstanceSelection

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AllocationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.md.txt)[InstanceSelection](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstanceSelection.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AllocationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.md.txt)[InstanceSelection](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstanceSelection.md.txt), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AllocationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.md.txt)[InstanceSelection](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.InstanceSelection.md.txt), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Batch.V1Alpha](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.md.txt)

## Assembly

Google.Cloud.Batch.V1Alpha.dll

## Constructors

### InstanceSelection()

    public InstanceSelection()

### InstanceSelection(InstanceSelection)

    public InstanceSelection(AllocationPolicy.Types.InstanceSelection other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `AllocationPolicyTypesInstanceSelection` |

## Properties

### BootDisk

    public AllocationPolicy.Types.Disk BootDisk { get; set; }

Optional. Boot disk to be created and attached to instances created from
this selection. It overrides the boot disk specified in the instance
properties.
(e.g., overriding `boot` disk type to Hyperdisk for 4th-gen machine
types)

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `AllocationPolicyTypesDisk` |   |

### Disks

    public RepeatedField<AllocationPolicy.Types.AttachedDisk> Disks { get; }

Optional. List of disks to be attached to instances created from this
selection. They override the disks specified in the instance properties.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldAllocationPolicyTypesAttachedDisk` |   |

### HasRank

    public bool HasRank { get; }

Gets whether the "rank" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### MachineTypes

    public RepeatedField<string> MachineTypes { get; }

Required. The Compute Engine machine type IDs.
Only the machine type ID is supported, such as `n1-standard-16`.
Full or partial URLs are not accepted.
The total maximum number of machine types across all instance selections
is 200. Exceeding this limit results in a validation error with code
`INVALID_ARGUMENT`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldstring` |   |

### Rank

    public int Rank { get; set; }

Optional. Indicates the preference of this instance selection. Lower
number means higher preference. First try is to create a VM based on the
machine-type with lowest rank and fallback to next rank based on
availability. Machine types and instance selections with the same rank
have the same preference.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `int` |   |