/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace MediaStore { namespace Model { /** *

The metric policy that is associated with the container. A metric policy * allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. In the * policy, you must indicate whether you want MediaStore to send container-level * metrics. You can also include rules to define groups of objects that you want * MediaStore to send object-level metrics for.

To view examples of how to * construct a metric policy for your use case, see Example * Metric Policies.

See Also:

AWS * API Reference

*/ class MetricPolicy { public: AWS_MEDIASTORE_API MetricPolicy(); AWS_MEDIASTORE_API MetricPolicy(Aws::Utils::Json::JsonView jsonValue); AWS_MEDIASTORE_API MetricPolicy& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_MEDIASTORE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A setting to enable or disable metrics at the container level.

*/ inline const ContainerLevelMetrics& GetContainerLevelMetrics() const{ return m_containerLevelMetrics; } /** *

A setting to enable or disable metrics at the container level.

*/ inline bool ContainerLevelMetricsHasBeenSet() const { return m_containerLevelMetricsHasBeenSet; } /** *

A setting to enable or disable metrics at the container level.

*/ inline void SetContainerLevelMetrics(const ContainerLevelMetrics& value) { m_containerLevelMetricsHasBeenSet = true; m_containerLevelMetrics = value; } /** *

A setting to enable or disable metrics at the container level.

*/ inline void SetContainerLevelMetrics(ContainerLevelMetrics&& value) { m_containerLevelMetricsHasBeenSet = true; m_containerLevelMetrics = std::move(value); } /** *

A setting to enable or disable metrics at the container level.

*/ inline MetricPolicy& WithContainerLevelMetrics(const ContainerLevelMetrics& value) { SetContainerLevelMetrics(value); return *this;} /** *

A setting to enable or disable metrics at the container level.

*/ inline MetricPolicy& WithContainerLevelMetrics(ContainerLevelMetrics&& value) { SetContainerLevelMetrics(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::Vector& GetMetricPolicyRules() const{ return m_metricPolicyRules; } /** *

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.

*/ inline bool MetricPolicyRulesHasBeenSet() const { return m_metricPolicyRulesHasBeenSet; } /** *

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.

*/ inline void SetMetricPolicyRules(const Aws::Vector& value) { m_metricPolicyRulesHasBeenSet = true; m_metricPolicyRules = value; } /** *

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.

*/ inline void SetMetricPolicyRules(Aws::Vector&& value) { m_metricPolicyRulesHasBeenSet = true; m_metricPolicyRules = std::move(value); } /** *

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.

*/ inline MetricPolicy& WithMetricPolicyRules(const Aws::Vector& value) { SetMetricPolicyRules(value); return *this;} /** *

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.

*/ inline MetricPolicy& WithMetricPolicyRules(Aws::Vector&& value) { SetMetricPolicyRules(std::move(value)); return *this;} /** *

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.

*/ inline MetricPolicy& AddMetricPolicyRules(const MetricPolicyRule& value) { m_metricPolicyRulesHasBeenSet = true; m_metricPolicyRules.push_back(value); return *this; } /** *

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.

*/ inline MetricPolicy& AddMetricPolicyRules(MetricPolicyRule&& value) { m_metricPolicyRulesHasBeenSet = true; m_metricPolicyRules.push_back(std::move(value)); return *this; } private: ContainerLevelMetrics m_containerLevelMetrics; bool m_containerLevelMetricsHasBeenSet = false; Aws::Vector m_metricPolicyRules; bool m_metricPolicyRulesHasBeenSet = false; }; } // namespace Model } // namespace MediaStore } // namespace Aws