hybrid_use_benefits
Creates, updates, deletes, gets or lists a hybrid_use_benefits
resource.
Overview
Name | hybrid_use_benefits |
Type | Resource |
Id | azure.software_plan.hybrid_use_benefits |
Fields
The following fields are returned by SELECT
queries:
- get
- list
OK - returns the plan that is created
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
etag | integer (int32) | Indicates the revision of the hybrid use benefit |
properties | object | Property bag for a hybrid use benefit response |
sku | object | Hybrid use benefit SKU |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
OK - returns an array of plans at that scope
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
etag | integer (int32) | Indicates the revision of the hybrid use benefit |
properties | object | Property bag for a hybrid use benefit response |
sku | object | Hybrid use benefit SKU |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | scope , planId | Gets a given plan ID | |
list | select | scope | $filter | Get all hybrid use benefits associated with an ARM resource. |
create | insert | scope , planId , data__sku | Create a new hybrid use benefit under a given scope | |
update | update | scope , planId , data__sku | Updates an existing hybrid use benefit | |
delete | delete | scope , planId | Deletes a given plan ID |
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.
Name | Datatype | Description |
---|---|---|
planId | string | This is a unique identifier for a plan. Should be a guid. |
scope | string | The scope at which the operation is performed. This is limited to Microsoft.Compute/virtualMachines and Microsoft.Compute/hostGroups/hosts for now |
$filter | string | Supports applying filter on the type of SKU |
SELECT
examples
- get
- list
Gets a given plan ID
SELECT
id,
name,
etag,
properties,
sku,
type
FROM azure.software_plan.hybrid_use_benefits
WHERE scope = '{{ scope }}' -- required
AND planId = '{{ planId }}' -- required
;
Get all hybrid use benefits associated with an ARM resource.
SELECT
id,
name,
etag,
properties,
sku,
type
FROM azure.software_plan.hybrid_use_benefits
WHERE scope = '{{ scope }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT
examples
- create
- Manifest
Create a new hybrid use benefit under a given scope
INSERT INTO azure.software_plan.hybrid_use_benefits (
data__sku,
data__properties,
scope,
planId
)
SELECT
'{{ sku }}' /* required */,
'{{ properties }}',
'{{ scope }}',
'{{ planId }}'
RETURNING
id,
name,
etag,
properties,
sku,
type
;
# Description fields are for documentation purposes
- name: hybrid_use_benefits
props:
- name: scope
value: string
description: Required parameter for the hybrid_use_benefits resource.
- name: planId
value: string
description: Required parameter for the hybrid_use_benefits resource.
- name: sku
value: object
description: |
Hybrid use benefit SKU
- name: properties
value: object
description: |
Property bag for a hybrid use benefit response
UPDATE
examples
- update
Updates an existing hybrid use benefit
UPDATE azure.software_plan.hybrid_use_benefits
SET
data__sku = '{{ sku }}',
data__properties = '{{ properties }}'
WHERE
scope = '{{ scope }}' --required
AND planId = '{{ planId }}' --required
AND data__sku = '{{ sku }}' --required
RETURNING
id,
name,
etag,
properties,
sku,
type;
DELETE
examples
- delete
Deletes a given plan ID
DELETE FROM azure.software_plan.hybrid_use_benefits
WHERE scope = '{{ scope }}' --required
AND planId = '{{ planId }}' --required
;