Skip to main content

metrics_containers

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

Overview

Namemetrics_containers
TypeResource
Idazure.monitor_workspaces.metrics_containers

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.
provisioningStatestringThe provisioning state of the metrics container. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
versionstringThe version of Metrics Query Service that this AMW will use for all metric queries.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, azure_monitor_workspace_name, metrics_container_name, subscription_idGets metrics container settings for a monitoring account.
list_by_azure_monitor_workspaceselectresource_group_name, azure_monitor_workspace_name, subscription_idLists metrics containers for a monitoring account.
create_or_updateinsertresource_group_name, azure_monitor_workspace_name, metrics_container_name, subscription_idCreates or updates metrics container settings for a monitoring account.
create_or_updatereplaceresource_group_name, azure_monitor_workspace_name, metrics_container_name, subscription_idCreates or updates metrics container settings for a monitoring account.

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
azure_monitor_workspace_namestringThe name of the Azure Monitor Workspace. The name is case insensitive. Required.
metrics_container_namestringThe name of the MetricsContainer. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets metrics container settings for a monitoring account.

SELECT
id,
name,
provisioningState,
systemData,
type,
version
FROM azure.monitor_workspaces.metrics_containers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND azure_monitor_workspace_name = '{{ azure_monitor_workspace_name }}' -- required
AND metrics_container_name = '{{ metrics_container_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates metrics container settings for a monitoring account.

INSERT INTO azure.monitor_workspaces.metrics_containers (
properties,
resource_group_name,
azure_monitor_workspace_name,
metrics_container_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ azure_monitor_workspace_name }}',
'{{ metrics_container_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Creates or updates metrics container settings for a monitoring account.

REPLACE azure.monitor_workspaces.metrics_containers
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND azure_monitor_workspace_name = '{{ azure_monitor_workspace_name }}' --required
AND metrics_container_name = '{{ metrics_container_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;