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
- vw_hybrid_use_benefits
- hybrid_use_benefits
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | text | The name of the resource |
created_date | text | field from the properties object |
etag | integer | Indicates the revision of the hybrid use benefit |
last_updated_date | text | field from the properties object |
planId | text | field from the properties object |
provisioning_state | text | field from the properties object |
scope | text | field from the properties object |
sku | text | The resource model definition representing SKU |
type | text | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
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 | Indicates the revision of the hybrid use benefit |
properties | object | Hybrid use benefit properties |
sku | object | The resource model definition representing SKU |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | planId, scope | Gets a given plan ID |
list | SELECT | scope | Get all hybrid use benefits associated with an ARM resource. |
create | INSERT | planId, scope, data__sku | Create a new hybrid use benefit under a given scope |
delete | DELETE | planId, scope | Deletes a given plan ID |
update | UPDATE | planId, scope, data__sku | Updates an existing hybrid use benefit |
SELECT
examples
Get all hybrid use benefits associated with an ARM resource.
- vw_hybrid_use_benefits
- hybrid_use_benefits
SELECT
id,
name,
created_date,
etag,
last_updated_date,
planId,
provisioning_state,
scope,
sku,
type
FROM azure.software_plan.vw_hybrid_use_benefits
WHERE scope = '{{ scope }}';
SELECT
id,
name,
etag,
properties,
sku,
type
FROM azure.software_plan.hybrid_use_benefits
WHERE scope = '{{ scope }}';
INSERT
example
Use the following StackQL query and manifest file to create a new hybrid_use_benefits
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.software_plan.hybrid_use_benefits (
planId,
scope,
data__sku,
sku,
properties
)
SELECT
'{{ planId }}',
'{{ scope }}',
'{{ data__sku }}',
'{{ sku }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: size
value: string
- name: family
value: string
- name: capacity
value: integer
- name: etag
value: integer
- name: properties
value:
- name: provisioningState
value: []
- name: createdDate
value: string
- name: lastUpdatedDate
value: string
UPDATE
example
Updates a hybrid_use_benefits
resource.
/*+ update */
UPDATE azure.software_plan.hybrid_use_benefits
SET
sku = '{{ sku }}',
properties = '{{ properties }}'
WHERE
planId = '{{ planId }}'
AND scope = '{{ scope }}'
AND data__sku = '{{ data__sku }}';
DELETE
example
Deletes the specified hybrid_use_benefits
resource.
/*+ delete */
DELETE FROM azure.software_plan.hybrid_use_benefits
WHERE planId = '{{ planId }}'
AND scope = '{{ scope }}';