共用方式為


CapacityReservation Constructors

Definition

Overloads

CapacityReservation()

Initializes a new instance of the CapacityReservation class.

CapacityReservation(String, Sku, String, String, String, IDictionary<String, String>, String, IList<SubResourceReadOnly>, Nullable<DateTime>, String, CapacityReservationInstanceView, IList<String>)

Initializes a new instance of the CapacityReservation class.

CapacityReservation(String, Sku, String, String, String, IDictionary<String, String>, String, IList<SubResourceReadOnly>, Nullable<DateTime>, String, CapacityReservationInstanceView, Nullable<DateTime>, IList<String>)

Initializes a new instance of the CapacityReservation class.

CapacityReservation(String, Sku, String, String, String, IDictionary<String, String>, String, Nullable<Int32>, IList<SubResourceReadOnly>, Nullable<DateTime>, String, CapacityReservationInstanceView, Nullable<DateTime>, IList<String>)

Initializes a new instance of the CapacityReservation class.

CapacityReservation()

Initializes a new instance of the CapacityReservation class.

public CapacityReservation ();
Public Sub New ()

Applies to

CapacityReservation(String, Sku, String, String, String, IDictionary<String, String>, String, IList<SubResourceReadOnly>, Nullable<DateTime>, String, CapacityReservationInstanceView, IList<String>)

Initializes a new instance of the CapacityReservation class.

public CapacityReservation (string location, Microsoft.Azure.Management.Compute.Models.Sku sku, string id, string name, string type, System.Collections.Generic.IDictionary<string,string> tags, string reservationId, System.Collections.Generic.IList<Microsoft.Azure.Management.Compute.Models.SubResourceReadOnly> virtualMachinesAssociated, DateTime? provisioningTime, string provisioningState, Microsoft.Azure.Management.Compute.Models.CapacityReservationInstanceView instanceView, System.Collections.Generic.IList<string> zones);
new Microsoft.Azure.Management.Compute.Models.CapacityReservation : string * Microsoft.Azure.Management.Compute.Models.Sku * string * string * string * System.Collections.Generic.IDictionary<string, string> * string * System.Collections.Generic.IList<Microsoft.Azure.Management.Compute.Models.SubResourceReadOnly> * Nullable<DateTime> * string * Microsoft.Azure.Management.Compute.Models.CapacityReservationInstanceView * System.Collections.Generic.IList<string> -> Microsoft.Azure.Management.Compute.Models.CapacityReservation
Public Sub New (location As String, sku As Sku, id As String, name As String, type As String, tags As IDictionary(Of String, String), reservationId As String, virtualMachinesAssociated As IList(Of SubResourceReadOnly), provisioningTime As Nullable(Of DateTime), provisioningState As String, instanceView As CapacityReservationInstanceView, zones As IList(Of String))

Parameters

location
String

Resource location

sku
Sku

SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.

id
String

Resource Id

name
String

Resource name

type
String

Resource type

tags
IDictionary<String,String>

Resource tags

reservationId
String

A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.

virtualMachinesAssociated
IList<SubResourceReadOnly>

A list of all virtual machine resource ids that are associated with the capacity reservation.

provisioningTime
Nullable<DateTime>

The date time when the capacity reservation was last updated.

provisioningState
String

The provisioning state, which only appears in the response.

instanceView
CapacityReservationInstanceView

The Capacity reservation instance view.

zones
IList<String>

Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.

Applies to

CapacityReservation(String, Sku, String, String, String, IDictionary<String, String>, String, IList<SubResourceReadOnly>, Nullable<DateTime>, String, CapacityReservationInstanceView, Nullable<DateTime>, IList<String>)

Initializes a new instance of the CapacityReservation class.

public CapacityReservation (string location, Microsoft.Azure.Management.Compute.Models.Sku sku, string id, string name, string type, System.Collections.Generic.IDictionary<string,string> tags, string reservationId, System.Collections.Generic.IList<Microsoft.Azure.Management.Compute.Models.SubResourceReadOnly> virtualMachinesAssociated, DateTime? provisioningTime = default, string provisioningState = default, Microsoft.Azure.Management.Compute.Models.CapacityReservationInstanceView instanceView = default, DateTime? timeCreated = default, System.Collections.Generic.IList<string> zones = default);
new Microsoft.Azure.Management.Compute.Models.CapacityReservation : string * Microsoft.Azure.Management.Compute.Models.Sku * string * string * string * System.Collections.Generic.IDictionary<string, string> * string * System.Collections.Generic.IList<Microsoft.Azure.Management.Compute.Models.SubResourceReadOnly> * Nullable<DateTime> * string * Microsoft.Azure.Management.Compute.Models.CapacityReservationInstanceView * Nullable<DateTime> * System.Collections.Generic.IList<string> -> Microsoft.Azure.Management.Compute.Models.CapacityReservation
Public Sub New (location As String, sku As Sku, id As String, name As String, type As String, tags As IDictionary(Of String, String), reservationId As String, virtualMachinesAssociated As IList(Of SubResourceReadOnly), Optional provisioningTime As Nullable(Of DateTime) = Nothing, Optional provisioningState As String = Nothing, Optional instanceView As CapacityReservationInstanceView = Nothing, Optional timeCreated As Nullable(Of DateTime) = Nothing, Optional zones As IList(Of String) = Nothing)

Parameters

location
String

Resource location

sku
Sku

SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.

id
String

Resource Id

name
String

Resource name

type
String

Resource type

tags
IDictionary<String,String>

Resource tags

reservationId
String

A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.

virtualMachinesAssociated
IList<SubResourceReadOnly>

A list of all virtual machine resource ids that are associated with the capacity reservation.

provisioningTime
Nullable<DateTime>

The date time when the capacity reservation was last updated.

provisioningState
String

The provisioning state, which only appears in the response.

instanceView
CapacityReservationInstanceView

The Capacity reservation instance view.

timeCreated
Nullable<DateTime>

Specifies the time at which the Capacity Reservation resource was created.<br><br>Minimum api-version: 2022-03-01.

zones
IList<String>

Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.

Applies to

CapacityReservation(String, Sku, String, String, String, IDictionary<String, String>, String, Nullable<Int32>, IList<SubResourceReadOnly>, Nullable<DateTime>, String, CapacityReservationInstanceView, Nullable<DateTime>, IList<String>)

Initializes a new instance of the CapacityReservation class.

public CapacityReservation (string location, Microsoft.Azure.Management.Compute.Models.Sku sku, string id = default, string name = default, string type = default, System.Collections.Generic.IDictionary<string,string> tags = default, string reservationId = default, int? platformFaultDomainCount = default, System.Collections.Generic.IList<Microsoft.Azure.Management.Compute.Models.SubResourceReadOnly> virtualMachinesAssociated = default, DateTime? provisioningTime = default, string provisioningState = default, Microsoft.Azure.Management.Compute.Models.CapacityReservationInstanceView instanceView = default, DateTime? timeCreated = default, System.Collections.Generic.IList<string> zones = default);
new Microsoft.Azure.Management.Compute.Models.CapacityReservation : string * Microsoft.Azure.Management.Compute.Models.Sku * string * string * string * System.Collections.Generic.IDictionary<string, string> * string * Nullable<int> * System.Collections.Generic.IList<Microsoft.Azure.Management.Compute.Models.SubResourceReadOnly> * Nullable<DateTime> * string * Microsoft.Azure.Management.Compute.Models.CapacityReservationInstanceView * Nullable<DateTime> * System.Collections.Generic.IList<string> -> Microsoft.Azure.Management.Compute.Models.CapacityReservation
Public Sub New (location As String, sku As Sku, Optional id As String = Nothing, Optional name As String = Nothing, Optional type As String = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional reservationId As String = Nothing, Optional platformFaultDomainCount As Nullable(Of Integer) = Nothing, Optional virtualMachinesAssociated As IList(Of SubResourceReadOnly) = Nothing, Optional provisioningTime As Nullable(Of DateTime) = Nothing, Optional provisioningState As String = Nothing, Optional instanceView As CapacityReservationInstanceView = Nothing, Optional timeCreated As Nullable(Of DateTime) = Nothing, Optional zones As IList(Of String) = Nothing)

Parameters

location
String

Resource location

sku
Sku

SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.

id
String

Resource Id

name
String

Resource name

type
String

Resource type

tags
IDictionary<String,String>

Resource tags

reservationId
String

A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.

platformFaultDomainCount
Nullable<Int32>

Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. Note: The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01.

virtualMachinesAssociated
IList<SubResourceReadOnly>

A list of all virtual machine resource ids that are associated with the capacity reservation.

provisioningTime
Nullable<DateTime>

The date time when the capacity reservation was last updated.

provisioningState
String

The provisioning state, which only appears in the response.

instanceView
CapacityReservationInstanceView

The Capacity reservation instance view.

timeCreated
Nullable<DateTime>

Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01.

zones
IList<String>

Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.

Applies to