metric_policies
Creates, updates, deletes, gets or lists a metric_policies resource.
Overview
| Name | metric_policies |
| Type | Resource |
| Id | aws.mediastore.metric_policies |
Fields
The following fields are returned by SELECT queries:
- get_metric_policy
| Name | Datatype | Description |
|---|---|---|
container_level_metrics | string | A setting to enable or disable metrics at the container level. (ENABLED, DISABLED) |
metric_policy_rules | array | A parameter that holds an array of rules that enable metrics at the object level. This parameter is optional, but if you choose to include it, you must also include at least one rule. By default, you can include up to five rules. You can also request a quota increase to allow up to 300 rules per policy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_metric_policy | select | region | Returns the metric policy for the specified container. | |
put_metric_policy | replace | region, ContainerName, MetricPolicy | The metric policy that you want to add to the container. A metric policy allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. It takes up to 20 minutes for the new policy to take effect. | |
delete_metric_policy | delete | region | Deletes the metric policy that is associated with the specified container. If there is no metric policy associated with the container, MediaStore doesn't send metrics to CloudWatch. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_metric_policy
Returns the metric policy for the specified container.
SELECT
container_level_metrics,
metric_policy_rules
FROM aws.mediastore.metric_policies
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_metric_policy
The metric policy that you want to add to the container. A metric policy allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. It takes up to 20 minutes for the new policy to take effect.
REPLACE aws.mediastore.metric_policies
SET
ContainerName = '{{ ContainerName }}',
MetricPolicy = '{{ MetricPolicy }}'
WHERE
region = '{{ region }}' --required
AND ContainerName = '{{ ContainerName }}' --required
AND MetricPolicy = '{{ MetricPolicy }}' --required;
DELETE examples
- delete_metric_policy
Deletes the metric policy that is associated with the specified container. If there is no metric policy associated with the container, MediaStore doesn't send metrics to CloudWatch.
DELETE FROM aws.mediastore.metric_policies
WHERE region = '{{ region }}' --required
;