Skip to main content

energy_services

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

Overview

Nameenergy_services
TypeResource
Idazure_extras.open_energy_platform.energy_services

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
auth_app_idtextfield from the properties object
data_partition_namestextfield from the properties object
dns_nametextfield from the properties object
locationtextGeo-location where the resource lives.
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resourceNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, resourceName, subscriptionIdReturns oep resource for a given name.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdReturns list of oep resources..
list_by_subscriptionSELECTsubscriptionIdLists a collection of oep resources under the given Azure Subscription ID.
createINSERTresourceGroupName, resourceName, subscriptionId, data__locationMethod that gets called if subscribed for ResourceCreationBegin trigger.
deleteDELETEresourceGroupName, resourceName, subscriptionIdDeletes oep resource
updateUPDATEresourceGroupName, resourceName, subscriptionId
add_partitionEXECresourceGroupName, resourceName, subscriptionIdMethod that gets called if new partition is to be added in a resource.
remove_partitionEXECresourceGroupName, resourceName, subscriptionIdMethod that gets called if new partition is to be removed from a resource.

SELECT examples

Lists a collection of oep resources under the given Azure Subscription ID.

SELECT
id,
name,
auth_app_id,
data_partition_names,
dns_name,
location,
provisioning_state,
resourceGroupName,
resourceName,
subscriptionId,
system_data,
tags,
type
FROM azure_extras.open_energy_platform.vw_energy_services
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure_extras.open_energy_platform.energy_services (
resourceGroupName,
resourceName,
subscriptionId,
data__location,
properties,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a energy_services resource.

/*+ update */
UPDATE azure_extras.open_energy_platform.energy_services
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified energy_services resource.

/*+ delete */
DELETE FROM azure_extras.open_energy_platform.energy_services
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';