settings
Creates, updates, deletes, gets or lists a settings resource.
Overview
| Name | settings |
| Type | Resource |
| Id | azure.cost_management.settings |
Fields
The following fields are returned by SELECT queries:
- get_by_scope
- list
| 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. |
kind | string | Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. Required. "taginheritance" |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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. |
kind | string | Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. Required. "taginheritance" |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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_by_scope | select | scope, type_name | Get the setting from the given scope by name. | |
list | select | scope | List all cost management settings in the requested scope. | |
create_or_update_by_scope | insert | scope, type_name, kind | Create or update a setting within the given scope. | |
create_or_update_by_scope | replace | scope, type_name, kind | Create or update a setting within the given scope. | |
delete_by_scope | delete | scope, type_name | Delete a setting within the given scope. |
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 |
|---|---|---|
scope | string | undefined. Required. |
type_name | string | Setting type. "taginheritance" Required. |
SELECT examples
- get_by_scope
- list
Get the setting from the given scope by name.
SELECT
id,
name,
kind,
systemData,
type
FROM azure.cost_management.settings
WHERE scope = '{{ scope }}' -- required
AND type_name = '{{ type_name }}' -- required
;
List all cost management settings in the requested scope.
SELECT
id,
name,
kind,
systemData,
type
FROM azure.cost_management.settings
WHERE scope = '{{ scope }}' -- required
;
INSERT examples
- create_or_update_by_scope
- Manifest
Create or update a setting within the given scope.
INSERT INTO azure.cost_management.settings (
kind,
scope,
type_name
)
SELECT
'{{ kind }}' /* required */,
'{{ scope }}',
'{{ type_name }}'
RETURNING
id,
name,
kind,
systemData,
type
;
# Description fields are for documentation purposes
- name: settings
props:
- name: scope
value: "{{ scope }}"
description: Required parameter for the settings resource.
- name: type_name
value: "{{ type_name }}"
description: Required parameter for the settings resource.
- name: kind
value: "{{ kind }}"
description: |
Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. Required. "taginheritance"
REPLACE examples
- create_or_update_by_scope
Create or update a setting within the given scope.
REPLACE azure.cost_management.settings
SET
kind = '{{ kind }}'
WHERE
scope = '{{ scope }}' --required
AND type_name = '{{ type_name }}' --required
AND kind = '{{ kind }}' --required
RETURNING
id,
name,
kind,
systemData,
type;
DELETE examples
- delete_by_scope
Delete a setting within the given scope.
DELETE FROM azure.cost_management.settings
WHERE scope = '{{ scope }}' --required
AND type_name = '{{ type_name }}' --required
;