/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace CloudFront { namespace Model { /** *

This action deletes a web distribution. To delete a web distribution using * the CloudFront API, perform the following steps.

To delete a web * distribution using the CloudFront API:

  1. Disable the web * distribution

  2. Submit a GET Distribution Config * request to get the current configuration and the Etag header for * the distribution.

  3. Update the XML document that was returned in * the response to your GET Distribution Config request to change the * value of Enabled to false.

  4. Submit a * PUT Distribution Config request to update the configuration for * your distribution. In the request body, include the XML document that you * updated in Step 3. Set the value of the HTTP If-Match header to the * value of the ETag header that CloudFront returned when you * submitted the GET Distribution Config request in Step 2.

  5. *
  6. Review the response to the PUT Distribution Config request * to confirm that the distribution was successfully disabled.

  7. *

    Submit a GET Distribution request to confirm that your changes * have propagated. When propagation is complete, the value of Status * is Deployed.

  8. Submit a DELETE * Distribution request. Set the value of the HTTP If-Match * header to the value of the ETag header that CloudFront returned * when you submitted the GET Distribution Config request in Step * 6.

  9. Review the response to your DELETE * Distribution request to confirm that the distribution was successfully * deleted.

For information about deleting a distribution using * the CloudFront console, see Deleting * a Distribution in the Amazon CloudFront Developer * Guide.

See Also:

AWS * API Reference

*/ class DeleteDistribution2020_05_31Request : public CloudFrontRequest { public: AWS_CLOUDFRONT_API DeleteDistribution2020_05_31Request(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "DeleteDistribution"; } AWS_CLOUDFRONT_API Aws::String SerializePayload() const override; AWS_CLOUDFRONT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The distribution ID.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The distribution ID.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The distribution ID.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The distribution ID.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The distribution ID.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The distribution ID.

*/ inline DeleteDistribution2020_05_31Request& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The distribution ID.

*/ inline DeleteDistribution2020_05_31Request& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The distribution ID.

*/ inline DeleteDistribution2020_05_31Request& WithId(const char* value) { SetId(value); return *this;} /** *

The value of the ETag header that you received when you disabled * the distribution. For example: E2QWRUHAPOMQZL.

*/ inline const Aws::String& GetIfMatch() const{ return m_ifMatch; } /** *

The value of the ETag header that you received when you disabled * the distribution. For example: E2QWRUHAPOMQZL.

*/ inline bool IfMatchHasBeenSet() const { return m_ifMatchHasBeenSet; } /** *

The value of the ETag header that you received when you disabled * the distribution. For example: E2QWRUHAPOMQZL.

*/ inline void SetIfMatch(const Aws::String& value) { m_ifMatchHasBeenSet = true; m_ifMatch = value; } /** *

The value of the ETag header that you received when you disabled * the distribution. For example: E2QWRUHAPOMQZL.

*/ inline void SetIfMatch(Aws::String&& value) { m_ifMatchHasBeenSet = true; m_ifMatch = std::move(value); } /** *

The value of the ETag header that you received when you disabled * the distribution. For example: E2QWRUHAPOMQZL.

*/ inline void SetIfMatch(const char* value) { m_ifMatchHasBeenSet = true; m_ifMatch.assign(value); } /** *

The value of the ETag header that you received when you disabled * the distribution. For example: E2QWRUHAPOMQZL.

*/ inline DeleteDistribution2020_05_31Request& WithIfMatch(const Aws::String& value) { SetIfMatch(value); return *this;} /** *

The value of the ETag header that you received when you disabled * the distribution. For example: E2QWRUHAPOMQZL.

*/ inline DeleteDistribution2020_05_31Request& WithIfMatch(Aws::String&& value) { SetIfMatch(std::move(value)); return *this;} /** *

The value of the ETag header that you received when you disabled * the distribution. For example: E2QWRUHAPOMQZL.

*/ inline DeleteDistribution2020_05_31Request& WithIfMatch(const char* value) { SetIfMatch(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_ifMatch; bool m_ifMatchHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws