/** * 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 SecurityHub { namespace Model { /** *

Contains information about the default cache configuration for the CloudFront * distribution.

See Also:

AWS * API Reference

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

The protocol that viewers can use to access the files in an origin. You can * specify the following options:

  • allow-all - * Viewers can use HTTP or HTTPS.

  • redirect-to-https * - CloudFront responds to HTTP requests with an HTTP status code of 301 (Moved * Permanently) and the HTTPS URL. The viewer then uses the new URL to * resubmit.

  • https-only - CloudFront responds to * HTTP request with an HTTP status code of 403 (Forbidden).

*/ inline const Aws::String& GetViewerProtocolPolicy() const{ return m_viewerProtocolPolicy; } /** *

The protocol that viewers can use to access the files in an origin. You can * specify the following options:

  • allow-all - * Viewers can use HTTP or HTTPS.

  • redirect-to-https * - CloudFront responds to HTTP requests with an HTTP status code of 301 (Moved * Permanently) and the HTTPS URL. The viewer then uses the new URL to * resubmit.

  • https-only - CloudFront responds to * HTTP request with an HTTP status code of 403 (Forbidden).

*/ inline bool ViewerProtocolPolicyHasBeenSet() const { return m_viewerProtocolPolicyHasBeenSet; } /** *

The protocol that viewers can use to access the files in an origin. You can * specify the following options:

  • allow-all - * Viewers can use HTTP or HTTPS.

  • redirect-to-https * - CloudFront responds to HTTP requests with an HTTP status code of 301 (Moved * Permanently) and the HTTPS URL. The viewer then uses the new URL to * resubmit.

  • https-only - CloudFront responds to * HTTP request with an HTTP status code of 403 (Forbidden).

*/ inline void SetViewerProtocolPolicy(const Aws::String& value) { m_viewerProtocolPolicyHasBeenSet = true; m_viewerProtocolPolicy = value; } /** *

The protocol that viewers can use to access the files in an origin. You can * specify the following options:

  • allow-all - * Viewers can use HTTP or HTTPS.

  • redirect-to-https * - CloudFront responds to HTTP requests with an HTTP status code of 301 (Moved * Permanently) and the HTTPS URL. The viewer then uses the new URL to * resubmit.

  • https-only - CloudFront responds to * HTTP request with an HTTP status code of 403 (Forbidden).

*/ inline void SetViewerProtocolPolicy(Aws::String&& value) { m_viewerProtocolPolicyHasBeenSet = true; m_viewerProtocolPolicy = std::move(value); } /** *

The protocol that viewers can use to access the files in an origin. You can * specify the following options:

  • allow-all - * Viewers can use HTTP or HTTPS.

  • redirect-to-https * - CloudFront responds to HTTP requests with an HTTP status code of 301 (Moved * Permanently) and the HTTPS URL. The viewer then uses the new URL to * resubmit.

  • https-only - CloudFront responds to * HTTP request with an HTTP status code of 403 (Forbidden).

*/ inline void SetViewerProtocolPolicy(const char* value) { m_viewerProtocolPolicyHasBeenSet = true; m_viewerProtocolPolicy.assign(value); } /** *

The protocol that viewers can use to access the files in an origin. You can * specify the following options:

  • allow-all - * Viewers can use HTTP or HTTPS.

  • redirect-to-https * - CloudFront responds to HTTP requests with an HTTP status code of 301 (Moved * Permanently) and the HTTPS URL. The viewer then uses the new URL to * resubmit.

  • https-only - CloudFront responds to * HTTP request with an HTTP status code of 403 (Forbidden).

*/ inline AwsCloudFrontDistributionDefaultCacheBehavior& WithViewerProtocolPolicy(const Aws::String& value) { SetViewerProtocolPolicy(value); return *this;} /** *

The protocol that viewers can use to access the files in an origin. You can * specify the following options:

  • allow-all - * Viewers can use HTTP or HTTPS.

  • redirect-to-https * - CloudFront responds to HTTP requests with an HTTP status code of 301 (Moved * Permanently) and the HTTPS URL. The viewer then uses the new URL to * resubmit.

  • https-only - CloudFront responds to * HTTP request with an HTTP status code of 403 (Forbidden).

*/ inline AwsCloudFrontDistributionDefaultCacheBehavior& WithViewerProtocolPolicy(Aws::String&& value) { SetViewerProtocolPolicy(std::move(value)); return *this;} /** *

The protocol that viewers can use to access the files in an origin. You can * specify the following options:

  • allow-all - * Viewers can use HTTP or HTTPS.

  • redirect-to-https * - CloudFront responds to HTTP requests with an HTTP status code of 301 (Moved * Permanently) and the HTTPS URL. The viewer then uses the new URL to * resubmit.

  • https-only - CloudFront responds to * HTTP request with an HTTP status code of 403 (Forbidden).

*/ inline AwsCloudFrontDistributionDefaultCacheBehavior& WithViewerProtocolPolicy(const char* value) { SetViewerProtocolPolicy(value); return *this;} private: Aws::String m_viewerProtocolPolicy; bool m_viewerProtocolPolicyHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws