Skip to main content

settings

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

Overview

Namesettings
TypeResource
Idazure.cost_management.settings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
kindstringMetadata 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"
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_scopeselectscope, type_nameGet the setting from the given scope by name.
listselectscopeList all cost management settings in the requested scope.
create_or_update_by_scopeinsertscope, type_name, kindCreate or update a setting within the given scope.
create_or_update_by_scopereplacescope, type_name, kindCreate or update a setting within the given scope.
delete_by_scopedeletescope, type_nameDelete 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.

NameDatatypeDescription
scopestringundefined. Required.
type_namestringSetting type. "taginheritance" Required.

SELECT examples

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
;

INSERT examples

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
;

REPLACE examples

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 a setting within the given scope.

DELETE FROM azure.cost_management.settings
WHERE scope = '{{ scope }}' --required
AND type_name = '{{ type_name }}' --required
;