Skip to main content

hybrid_use_benefits

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

Overview

Namehybrid_use_benefits
TypeResource
Idazure.software_plan.hybrid_use_benefits

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
created_datetextfield from the properties object
etagintegerIndicates the revision of the hybrid use benefit
last_updated_datetextfield from the properties object
planIdtextfield from the properties object
provisioning_statetextfield from the properties object
scopetextfield from the properties object
skutextThe resource model definition representing SKU
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTplanId, scopeGets a given plan ID
listSELECTscopeGet all hybrid use benefits associated with an ARM resource.
createINSERTplanId, scope, data__skuCreate a new hybrid use benefit under a given scope
deleteDELETEplanId, scopeDeletes a given plan ID
updateUPDATEplanId, scope, data__skuUpdates an existing hybrid use benefit

SELECT examples

Get all hybrid use benefits associated with an ARM resource.

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new hybrid_use_benefits resource.

/*+ create */
INSERT INTO azure.software_plan.hybrid_use_benefits (
planId,
scope,
data__sku,
sku,
properties
)
SELECT
'{{ planId }}',
'{{ scope }}',
'{{ data__sku }}',
'{{ sku }}',
'{{ properties }}'
;

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 }}';