/** * 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 OAM { namespace Model { /** */ class PutSinkPolicyRequest : public OAMRequest { public: AWS_OAM_API PutSinkPolicyRequest(); // 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 "PutSinkPolicy"; } AWS_OAM_API Aws::String SerializePayload() const override; /** *

The ARN of the sink to attach this policy to.

*/ inline const Aws::String& GetSinkIdentifier() const{ return m_sinkIdentifier; } /** *

The ARN of the sink to attach this policy to.

*/ inline bool SinkIdentifierHasBeenSet() const { return m_sinkIdentifierHasBeenSet; } /** *

The ARN of the sink to attach this policy to.

*/ inline void SetSinkIdentifier(const Aws::String& value) { m_sinkIdentifierHasBeenSet = true; m_sinkIdentifier = value; } /** *

The ARN of the sink to attach this policy to.

*/ inline void SetSinkIdentifier(Aws::String&& value) { m_sinkIdentifierHasBeenSet = true; m_sinkIdentifier = std::move(value); } /** *

The ARN of the sink to attach this policy to.

*/ inline void SetSinkIdentifier(const char* value) { m_sinkIdentifierHasBeenSet = true; m_sinkIdentifier.assign(value); } /** *

The ARN of the sink to attach this policy to.

*/ inline PutSinkPolicyRequest& WithSinkIdentifier(const Aws::String& value) { SetSinkIdentifier(value); return *this;} /** *

The ARN of the sink to attach this policy to.

*/ inline PutSinkPolicyRequest& WithSinkIdentifier(Aws::String&& value) { SetSinkIdentifier(std::move(value)); return *this;} /** *

The ARN of the sink to attach this policy to.

*/ inline PutSinkPolicyRequest& WithSinkIdentifier(const char* value) { SetSinkIdentifier(value); return *this;} /** *

The JSON policy to use. If you are updating an existing policy, the entire * existing policy is replaced by what you specify here.

The policy must be * in JSON string format with quotation marks escaped and no newlines.

For * examples of different types of policies, see the Examples section on this * page.

*/ inline const Aws::String& GetPolicy() const{ return m_policy; } /** *

The JSON policy to use. If you are updating an existing policy, the entire * existing policy is replaced by what you specify here.

The policy must be * in JSON string format with quotation marks escaped and no newlines.

For * examples of different types of policies, see the Examples section on this * page.

*/ inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; } /** *

The JSON policy to use. If you are updating an existing policy, the entire * existing policy is replaced by what you specify here.

The policy must be * in JSON string format with quotation marks escaped and no newlines.

For * examples of different types of policies, see the Examples section on this * page.

*/ inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; } /** *

The JSON policy to use. If you are updating an existing policy, the entire * existing policy is replaced by what you specify here.

The policy must be * in JSON string format with quotation marks escaped and no newlines.

For * examples of different types of policies, see the Examples section on this * page.

*/ inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); } /** *

The JSON policy to use. If you are updating an existing policy, the entire * existing policy is replaced by what you specify here.

The policy must be * in JSON string format with quotation marks escaped and no newlines.

For * examples of different types of policies, see the Examples section on this * page.

*/ inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); } /** *

The JSON policy to use. If you are updating an existing policy, the entire * existing policy is replaced by what you specify here.

The policy must be * in JSON string format with quotation marks escaped and no newlines.

For * examples of different types of policies, see the Examples section on this * page.

*/ inline PutSinkPolicyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;} /** *

The JSON policy to use. If you are updating an existing policy, the entire * existing policy is replaced by what you specify here.

The policy must be * in JSON string format with quotation marks escaped and no newlines.

For * examples of different types of policies, see the Examples section on this * page.

*/ inline PutSinkPolicyRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;} /** *

The JSON policy to use. If you are updating an existing policy, the entire * existing policy is replaced by what you specify here.

The policy must be * in JSON string format with quotation marks escaped and no newlines.

For * examples of different types of policies, see the Examples section on this * page.

*/ inline PutSinkPolicyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;} private: Aws::String m_sinkIdentifier; bool m_sinkIdentifierHasBeenSet = false; Aws::String m_policy; bool m_policyHasBeenSet = false; }; } // namespace Model } // namespace OAM } // namespace Aws