get_metric_policy
(**kwargs)¶Returns the metric policy for the specified container.
See also: AWS API Documentation
Request Syntax
response = client.get_metric_policy(
ContainerName='string'
)
[REQUIRED]
The name of the container that is associated with the metric policy.
{
'MetricPolicy': {
'ContainerLevelMetrics': 'ENABLED'|'DISABLED',
'MetricPolicyRules': [
{
'ObjectGroup': 'string',
'ObjectGroupName': 'string'
},
]
}
}
Response Structure
The metric policy that is associated with the specific container.
A setting to enable or disable metrics at the container level.
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.
A setting that enables metrics at the object level. Each rule contains an object group and an object group name. If the policy includes the MetricPolicyRules parameter, you must include at least one rule. Each metric policy can include up to five rules by default. You can also request a quota increase to allow up to 300 rules per policy.
A path or file name that defines which objects to include in the group. Wildcards (*) are acceptable.
A name that allows you to refer to the object group.
Exceptions
MediaStore.Client.exceptions.ContainerNotFoundException
MediaStore.Client.exceptions.PolicyNotFoundException
MediaStore.Client.exceptions.ContainerInUseException
MediaStore.Client.exceptions.InternalServerError