energy_services
Creates, updates, deletes, gets or lists a energy_services
resource.
Overview
Name | energy_services |
Type | Resource |
Id | azure_extras.open_energy_platform.energy_services |
Fields
- vw_energy_services
- energy_services
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 |
auth_app_id | text | field from the properties object |
data_partition_names | text | field from the properties object |
dns_name | text | field from the properties object |
location | text | Geo-location where the resource lives. |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resourceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
tags | text | Resource tags. |
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 |
location | string | Geo-location where the resource lives. |
properties | object | |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
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 | resourceGroupName, resourceName, subscriptionId | Returns oep resource for a given name. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Returns list of oep resources.. |
list_by_subscription | SELECT | subscriptionId | Lists a collection of oep resources under the given Azure Subscription ID. |
create | INSERT | resourceGroupName, resourceName, subscriptionId, data__location | Method that gets called if subscribed for ResourceCreationBegin trigger. |
delete | DELETE | resourceGroupName, resourceName, subscriptionId | Deletes oep resource |
update | UPDATE | resourceGroupName, resourceName, subscriptionId | |
add_partition | EXEC | resourceGroupName, resourceName, subscriptionId | Method that gets called if new partition is to be added in a resource. |
remove_partition | EXEC | resourceGroupName, resourceName, subscriptionId | Method 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.
- vw_energy_services
- energy_services
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 }}';
SELECT
id,
name,
location,
properties,
systemData,
tags,
type
FROM azure_extras.open_energy_platform.energy_services
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new energy_services
resource.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: dnsName
value: string
- name: provisioningState
value: string
- name: authAppId
value: string
- name: dataPartitionNames
value:
- - name: name
value: string
- name: tags
value: object
- name: location
value: string
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 }}';