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

This is the latest version of AWS WAF, named AWS WAFV2, * released in November, 2019. For information, including how to migrate your AWS * WAF resources from the prior release, see the AWS * WAF Developer Guide.

Defines and enables Amazon CloudWatch * metrics and web request sample collection.

See Also:

AWS * API Reference

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

A boolean indicating whether AWS WAF should store a sampling of the web * requests that match the rules. You can view the sampled requests through the AWS * WAF console.

*/ inline bool GetSampledRequestsEnabled() const{ return m_sampledRequestsEnabled; } /** *

A boolean indicating whether AWS WAF should store a sampling of the web * requests that match the rules. You can view the sampled requests through the AWS * WAF console.

*/ inline bool SampledRequestsEnabledHasBeenSet() const { return m_sampledRequestsEnabledHasBeenSet; } /** *

A boolean indicating whether AWS WAF should store a sampling of the web * requests that match the rules. You can view the sampled requests through the AWS * WAF console.

*/ inline void SetSampledRequestsEnabled(bool value) { m_sampledRequestsEnabledHasBeenSet = true; m_sampledRequestsEnabled = value; } /** *

A boolean indicating whether AWS WAF should store a sampling of the web * requests that match the rules. You can view the sampled requests through the AWS * WAF console.

*/ inline VisibilityConfig& WithSampledRequestsEnabled(bool value) { SetSampledRequestsEnabled(value); return *this;} /** *

A boolean indicating whether the associated resource sends metrics to * CloudWatch. For the list of available metrics, see AWS * WAF Metrics.

*/ inline bool GetCloudWatchMetricsEnabled() const{ return m_cloudWatchMetricsEnabled; } /** *

A boolean indicating whether the associated resource sends metrics to * CloudWatch. For the list of available metrics, see AWS * WAF Metrics.

*/ inline bool CloudWatchMetricsEnabledHasBeenSet() const { return m_cloudWatchMetricsEnabledHasBeenSet; } /** *

A boolean indicating whether the associated resource sends metrics to * CloudWatch. For the list of available metrics, see AWS * WAF Metrics.

*/ inline void SetCloudWatchMetricsEnabled(bool value) { m_cloudWatchMetricsEnabledHasBeenSet = true; m_cloudWatchMetricsEnabled = value; } /** *

A boolean indicating whether the associated resource sends metrics to * CloudWatch. For the list of available metrics, see AWS * WAF Metrics.

*/ inline VisibilityConfig& WithCloudWatchMetricsEnabled(bool value) { SetCloudWatchMetricsEnabled(value); return *this;} /** *

A name of the CloudWatch metric. The name can contain only the characters: * A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 * characters long. It can't contain whitespace or metric names reserved for AWS * WAF, for example "All" and "Default_Action."

*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *

A name of the CloudWatch metric. The name can contain only the characters: * A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 * characters long. It can't contain whitespace or metric names reserved for AWS * WAF, for example "All" and "Default_Action."

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

A name of the CloudWatch metric. The name can contain only the characters: * A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 * characters long. It can't contain whitespace or metric names reserved for AWS * WAF, for example "All" and "Default_Action."

*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

A name of the CloudWatch metric. The name can contain only the characters: * A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 * characters long. It can't contain whitespace or metric names reserved for AWS * WAF, for example "All" and "Default_Action."

*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

A name of the CloudWatch metric. The name can contain only the characters: * A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 * characters long. It can't contain whitespace or metric names reserved for AWS * WAF, for example "All" and "Default_Action."

*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *

A name of the CloudWatch metric. The name can contain only the characters: * A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 * characters long. It can't contain whitespace or metric names reserved for AWS * WAF, for example "All" and "Default_Action."

*/ inline VisibilityConfig& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *

A name of the CloudWatch metric. The name can contain only the characters: * A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 * characters long. It can't contain whitespace or metric names reserved for AWS * WAF, for example "All" and "Default_Action."

*/ inline VisibilityConfig& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *

A name of the CloudWatch metric. The name can contain only the characters: * A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 * characters long. It can't contain whitespace or metric names reserved for AWS * WAF, for example "All" and "Default_Action."

*/ inline VisibilityConfig& WithMetricName(const char* value) { SetMetricName(value); return *this;} private: bool m_sampledRequestsEnabled; bool m_sampledRequestsEnabledHasBeenSet; bool m_cloudWatchMetricsEnabled; bool m_cloudWatchMetricsEnabledHasBeenSet; Aws::String m_metricName; bool m_metricNameHasBeenSet; }; } // namespace Model } // namespace WAFV2 } // namespace Aws