energy_services
Creates, updates, deletes, gets or lists an energy_services resource.
Overview
| Name | energy_services |
| Type | Resource |
| Id | azure_extras.oep.energy_services |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| 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. |
authAppId | string | :vartype auth_app_id: str |
dataPartitionNames | array | :vartype data_partition_names: list[~azure.mgmt.oep.models.DataPartitionNames] |
dnsName | string | :vartype dns_name: str |
location | string | Geo-location where the resource lives. Required. |
provisioningState | string | Known values are: "Unknown", "Succeeded", "Failed", "Canceled", "Creating", "Deleting", and "Updating". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | 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. |
authAppId | string | :vartype auth_app_id: str |
dataPartitionNames | array | :vartype data_partition_names: list[~azure.mgmt.oep.models.DataPartitionNames] |
dnsName | string | :vartype dns_name: str |
location | string | Geo-location where the resource lives. Required. |
provisioningState | string | Known values are: "Unknown", "Succeeded", "Failed", "Canceled", "Creating", "Deleting", and "Updating". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | 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. |
authAppId | string | :vartype auth_app_id: str |
dataPartitionNames | array | :vartype data_partition_names: list[~azure.mgmt.oep.models.DataPartitionNames] |
dnsName | string | :vartype dns_name: str |
location | string | Geo-location where the resource lives. Required. |
provisioningState | string | Known values are: "Unknown", "Succeeded", "Failed", "Canceled", "Creating", "Deleting", and "Updating". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
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 | resource_group_name, resource_name, subscription_id | Returns oep resource for a given name. | |
list_by_resource_group | select | resource_group_name, subscription_id | Returns list of oep resources.. | |
list_by_subscription | select | subscription_id | Lists a collection of oep resources under the given Azure Subscription ID. | |
create | insert | resource_group_name, resource_name, subscription_id, location | Method that gets called if subscribed for ResourceCreationBegin trigger. | |
update | update | resource_group_name, resource_name, subscription_id | update. | |
delete | delete | resource_group_name, resource_name, subscription_id | Deletes oep resource. | |
list_partitions | exec | resource_group_name, resource_name, subscription_id | Method that gets called when list of partitions is requested. | |
add_partition | exec | resource_group_name, resource_name, subscription_id | Method that gets called if new partition is to be added in a resource. | |
remove_partition | exec | resource_group_name, resource_name, subscription_id | Method that gets called if new partition is to be removed from a resource. |
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 |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
resource_name | string | The resource name. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
Returns oep resource for a given name.
SELECT
id,
name,
authAppId,
dataPartitionNames,
dnsName,
location,
provisioningState,
systemData,
tags,
type
FROM azure_extras.oep.energy_services
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Returns list of oep resources..
SELECT
id,
name,
authAppId,
dataPartitionNames,
dnsName,
location,
provisioningState,
systemData,
tags,
type
FROM azure_extras.oep.energy_services
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists a collection of oep resources under the given Azure Subscription ID.
SELECT
id,
name,
authAppId,
dataPartitionNames,
dnsName,
location,
provisioningState,
systemData,
tags,
type
FROM azure_extras.oep.energy_services
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Method that gets called if subscribed for ResourceCreationBegin trigger.
INSERT INTO azure_extras.oep.energy_services (
properties,
tags,
location,
resource_group_name,
resource_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}' /* required */,
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: energy_services
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the energy_services resource.
- name: resource_name
value: "{{ resource_name }}"
description: Required parameter for the energy_services resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the energy_services resource.
- name: properties
description: |
:vartype properties: ~azure.mgmt.oep.models.EnergyServiceProperties
value:
dnsName: "{{ dnsName }}"
provisioningState: "{{ provisioningState }}"
authAppId: "{{ authAppId }}"
dataPartitionNames:
- name: "{{ name }}"
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
Geo-location where the resource lives. Required.
UPDATE examples
- update
update.
UPDATE azure_extras.oep.energy_services
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes oep resource.
DELETE FROM azure_extras.oep.energy_services
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- list_partitions
- add_partition
- remove_partition
Method that gets called when list of partitions is requested.
EXEC azure_extras.oep.energy_services.list_partitions
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Method that gets called if new partition is to be added in a resource.
EXEC azure_extras.oep.energy_services.add_partition
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"name": "{{ name }}"
}'
;
Method that gets called if new partition is to be removed from a resource.
EXEC azure_extras.oep.energy_services.remove_partition
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"name": "{{ name }}"
}'
;