Skip to main content

fleets

Creates, updates, deletes, gets or lists a fleets resource.

Overview

Namefleets
TypeResource
Idazure.compute_fleet.fleets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
additionalLocationsProfileobjectRepresents the configuration for additional locations where Fleet resources may be deployed.
capacityTypestringSpecifies capacity type for Fleet Regular and Spot priority profiles. capacityType is an immutable property. Once set during Fleet creation, it cannot be updated. Specifying different capacity type for Fleet Regular and Spot priority profiles is not allowed. Known values are: "VM" and "VCpu". (VM, VCpu)
computeProfileobjectCompute Profile to use for running user's workloads. Required.
identityobjectThe managed service identities assigned to this resource.
locationstringThe geo-location where the resource lives. Required.
modestringMode of the Fleet. Known values are: "Managed" and "Launch". (Managed, Launch)
planobjectDetails of the resource plan.
provisioningStatestringThe status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting", and "Migrating". (Succeeded, Failed, Canceled, Creating, Updating, Deleting, Migrating)
regularPriorityProfileobjectConfiguration Options for Regular instances in Compute Fleet.
spotPriorityProfileobjectConfiguration Options for Spot instances in Compute Fleet.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
timeCreatedstring (date-time)Specifies the time at which the Compute Fleet is created.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
uniqueIdstringSpecifies the ID which uniquely identifies a Compute Fleet.
vmAttributesobjectAttribute based Fleet.
vmNamePrefixstringVirtualMachine prefix to be used for the virtual machines launched by Fleet. Can be used only with Launch mode.
vmSizesProfilearrayList of VM sizes supported for Compute Fleet. Required.
zoneAllocationPolicyobjectZone Allocation Policy for Fleet.
zonesarrayZones in which the Compute Fleet is available.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, fleet_name, subscription_idGet a Fleet.
list_virtual_machine_scale_setsselectresource_group_name, name, subscription_idList VirtualMachineScaleSet resources by Fleet.
list_by_resource_groupselectresource_group_name, subscription_idList Fleet resources by resource group.
list_by_subscriptionselectsubscription_idList Fleet resources by subscription ID.
create_or_updateinsertresource_group_name, fleet_name, subscription_id, locationCreate a Fleet.
updateupdateresource_group_name, fleet_name, subscription_idUpdate a Fleet.
create_or_updatereplaceresource_group_name, fleet_name, subscription_id, locationCreate a Fleet.
deletedeleteresource_group_name, fleet_name, subscription_idDelete a Fleet.
list_virtual_machinesexecresource_group_name, name, subscription_id$filter, $skiptokenList VirtualMachine resources of a Launch mode Fleet.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
fleet_namestringThe name of the Compute Fleet. Required.
namestringThe name of the Fleet. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$filterstringFilter expression to filter the virtual machines. Default value is None.
$skiptokenstringSkip token for pagination. Uses the token from a previous response to fetch the next page of results. Default value is None.

SELECT examples

Get a Fleet.

SELECT
id,
name,
additionalLocationsProfile,
capacityType,
computeProfile,
identity,
location,
mode,
plan,
provisioningState,
regularPriorityProfile,
spotPriorityProfile,
systemData,
tags,
timeCreated,
type,
uniqueId,
vmAttributes,
vmNamePrefix,
vmSizesProfile,
zoneAllocationPolicy,
zones
FROM azure.compute_fleet.fleets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND fleet_name = '{{ fleet_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a Fleet.

INSERT INTO azure.compute_fleet.fleets (
tags,
location,
properties,
zones,
identity,
plan,
resource_group_name,
fleet_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ zones }}',
'{{ identity }}',
'{{ plan }}',
'{{ resource_group_name }}',
'{{ fleet_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
plan,
properties,
systemData,
tags,
type,
zones
;

UPDATE examples

Update a Fleet.

UPDATE azure.compute_fleet.fleets
SET
tags = '{{ tags }}',
identity = '{{ identity }}',
plan = '{{ plan }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND fleet_name = '{{ fleet_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
plan,
properties,
systemData,
tags,
type,
zones;

REPLACE examples

Create a Fleet.

REPLACE azure.compute_fleet.fleets
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
zones = '{{ zones }}',
identity = '{{ identity }}',
plan = '{{ plan }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND fleet_name = '{{ fleet_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
plan,
properties,
systemData,
tags,
type,
zones;

DELETE examples

Delete a Fleet.

DELETE FROM azure.compute_fleet.fleets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND fleet_name = '{{ fleet_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

List VirtualMachine resources of a Launch mode Fleet.

EXEC azure.compute_fleet.fleets.list_virtual_machines 
@resource_group_name='{{ resource_group_name }}' --required,
@name='{{ name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@$filter='{{ $filter }}',
@$skiptoken='{{ $skiptoken }}'
;