metrics_containers
Creates, updates, deletes, gets or lists a metrics_containers resource.
Overview
| Name | metrics_containers |
| Type | Resource |
| Id | azure.monitor_workspaces.metrics_containers |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_azure_monitor_workspace
| 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. |
provisioningState | string | The provisioning state of the metrics container. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
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". |
version | string | The version of Metrics Query Service that this AMW will use for all metric queries. |
| 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. |
provisioningState | string | The provisioning state of the metrics container. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
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". |
version | string | The version of Metrics Query Service that this AMW will use for all metric queries. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, azure_monitor_workspace_name, metrics_container_name, subscription_id | Gets metrics container settings for a monitoring account. | |
list_by_azure_monitor_workspace | select | resource_group_name, azure_monitor_workspace_name, subscription_id | Lists metrics containers for a monitoring account. | |
create_or_update | insert | resource_group_name, azure_monitor_workspace_name, metrics_container_name, subscription_id | Creates or updates metrics container settings for a monitoring account. | |
create_or_update | replace | resource_group_name, azure_monitor_workspace_name, metrics_container_name, subscription_id | Creates 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.
| Name | Datatype | Description |
|---|---|---|
azure_monitor_workspace_name | string | The name of the Azure Monitor Workspace. The name is case insensitive. Required. |
metrics_container_name | string | The name of the MetricsContainer. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_azure_monitor_workspace
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
;
Lists metrics containers 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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: metrics_containers
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the metrics_containers resource.
- name: azure_monitor_workspace_name
value: "{{ azure_monitor_workspace_name }}"
description: Required parameter for the metrics_containers resource.
- name: metrics_container_name
value: "{{ metrics_container_name }}"
description: Required parameter for the metrics_containers resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the metrics_containers resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
provisioningState: "{{ provisioningState }}"
version: "{{ version }}"
REPLACE examples
- create_or_update
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;