/** * 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 CloudWatchLogs { namespace Model { /** */ class AWS_CLOUDWATCHLOGS_API PutDestinationPolicyRequest : public CloudWatchLogsRequest { public: PutDestinationPolicyRequest(); // 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 "PutDestinationPolicy"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A name for an existing destination.

*/ inline const Aws::String& GetDestinationName() const{ return m_destinationName; } /** *

A name for an existing destination.

*/ inline bool DestinationNameHasBeenSet() const { return m_destinationNameHasBeenSet; } /** *

A name for an existing destination.

*/ inline void SetDestinationName(const Aws::String& value) { m_destinationNameHasBeenSet = true; m_destinationName = value; } /** *

A name for an existing destination.

*/ inline void SetDestinationName(Aws::String&& value) { m_destinationNameHasBeenSet = true; m_destinationName = std::move(value); } /** *

A name for an existing destination.

*/ inline void SetDestinationName(const char* value) { m_destinationNameHasBeenSet = true; m_destinationName.assign(value); } /** *

A name for an existing destination.

*/ inline PutDestinationPolicyRequest& WithDestinationName(const Aws::String& value) { SetDestinationName(value); return *this;} /** *

A name for an existing destination.

*/ inline PutDestinationPolicyRequest& WithDestinationName(Aws::String&& value) { SetDestinationName(std::move(value)); return *this;} /** *

A name for an existing destination.

*/ inline PutDestinationPolicyRequest& WithDestinationName(const char* value) { SetDestinationName(value); return *this;} /** *

An IAM policy document that authorizes cross-account users to deliver their * log events to the associated destination. This can be up to 5120 bytes.

*/ inline const Aws::String& GetAccessPolicy() const{ return m_accessPolicy; } /** *

An IAM policy document that authorizes cross-account users to deliver their * log events to the associated destination. This can be up to 5120 bytes.

*/ inline bool AccessPolicyHasBeenSet() const { return m_accessPolicyHasBeenSet; } /** *

An IAM policy document that authorizes cross-account users to deliver their * log events to the associated destination. This can be up to 5120 bytes.

*/ inline void SetAccessPolicy(const Aws::String& value) { m_accessPolicyHasBeenSet = true; m_accessPolicy = value; } /** *

An IAM policy document that authorizes cross-account users to deliver their * log events to the associated destination. This can be up to 5120 bytes.

*/ inline void SetAccessPolicy(Aws::String&& value) { m_accessPolicyHasBeenSet = true; m_accessPolicy = std::move(value); } /** *

An IAM policy document that authorizes cross-account users to deliver their * log events to the associated destination. This can be up to 5120 bytes.

*/ inline void SetAccessPolicy(const char* value) { m_accessPolicyHasBeenSet = true; m_accessPolicy.assign(value); } /** *

An IAM policy document that authorizes cross-account users to deliver their * log events to the associated destination. This can be up to 5120 bytes.

*/ inline PutDestinationPolicyRequest& WithAccessPolicy(const Aws::String& value) { SetAccessPolicy(value); return *this;} /** *

An IAM policy document that authorizes cross-account users to deliver their * log events to the associated destination. This can be up to 5120 bytes.

*/ inline PutDestinationPolicyRequest& WithAccessPolicy(Aws::String&& value) { SetAccessPolicy(std::move(value)); return *this;} /** *

An IAM policy document that authorizes cross-account users to deliver their * log events to the associated destination. This can be up to 5120 bytes.

*/ inline PutDestinationPolicyRequest& WithAccessPolicy(const char* value) { SetAccessPolicy(value); return *this;} private: Aws::String m_destinationName; bool m_destinationNameHasBeenSet; Aws::String m_accessPolicy; bool m_accessPolicyHasBeenSet; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws