Skip to main content

metric_policies

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

Overview

Namemetric_policies
TypeResource
Idaws.mediastore.metric_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
container_level_metricsstringA setting to enable or disable metrics at the container level. (ENABLED, DISABLED)
metric_policy_rulesarrayA 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_metric_policyselectregionReturns the metric policy for the specified container.
put_metric_policyreplaceregion, ContainerName, MetricPolicyThe 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_policydeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

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

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
;