Freigeben über


ArmComputeModelFactory.CapacityReservationGroupData Method

Definition

Initializes a new instance of CapacityReservationGroupData.

public static Azure.ResourceManager.Compute.CapacityReservationGroupData CapacityReservationGroupData(Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, System.Collections.Generic.IDictionary<string,string> tags = default, Azure.Core.AzureLocation location = default, System.Collections.Generic.IEnumerable<string> zones = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.Models.SubResource> capacityReservations = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.Models.SubResource> virtualMachinesAssociated = default, Azure.ResourceManager.Compute.Models.CapacityReservationGroupInstanceView instanceView = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.Models.WritableSubResource> sharingSubscriptionIds = default, Azure.ResourceManager.Compute.Models.CapacityReservationType? reservationType = default);
static member CapacityReservationGroupData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * System.Collections.Generic.IDictionary<string, string> * Azure.Core.AzureLocation * seq<string> * seq<Azure.ResourceManager.Resources.Models.SubResource> * seq<Azure.ResourceManager.Resources.Models.SubResource> * Azure.ResourceManager.Compute.Models.CapacityReservationGroupInstanceView * seq<Azure.ResourceManager.Resources.Models.WritableSubResource> * Nullable<Azure.ResourceManager.Compute.Models.CapacityReservationType> -> Azure.ResourceManager.Compute.CapacityReservationGroupData
Public Shared Function CapacityReservationGroupData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As ResourceType = Nothing, Optional systemData As SystemData = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional location As AzureLocation = Nothing, Optional zones As IEnumerable(Of String) = Nothing, Optional capacityReservations As IEnumerable(Of SubResource) = Nothing, Optional virtualMachinesAssociated As IEnumerable(Of SubResource) = Nothing, Optional instanceView As CapacityReservationGroupInstanceView = Nothing, Optional sharingSubscriptionIds As IEnumerable(Of WritableSubResource) = Nothing, Optional reservationType As Nullable(Of CapacityReservationType) = Nothing) As CapacityReservationGroupData

Parameters

id
ResourceIdentifier

The id.

name
String

The name.

resourceType
ResourceType

The resourceType.

systemData
SystemData

The systemData.

tags
IDictionary<String,String>

The tags.

location
AzureLocation

The location.

zones
IEnumerable<String>

The availability zones.

capacityReservations
IEnumerable<SubResource>

A list of all capacity reservation resource ids that belong to capacity reservation group.

virtualMachinesAssociated
IEnumerable<SubResource>

A list of references to all virtual machines associated to the capacity reservation group.

instanceView
CapacityReservationGroupInstanceView

The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.

sharingSubscriptionIds
IEnumerable<WritableSubResource>

Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. The capacity reservation group resource can generally be shared across subscriptions belonging to a single Azure AAD tenant or across AAD tenants if there is a trust relationship established between the tenants. Block capacity reservation does not support sharing across subscriptions. Note: Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details.

reservationType
Nullable<CapacityReservationType>

Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity reservations and 'Targeted' for reservations that enable a VM to consume a specific capacity reservation when a capacity reservation group is provided. The reservation type is immutable and cannot be changed after it is assigned.

Returns

A new CapacityReservationGroupData instance for mocking.

Applies to