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

Represents a request to add or update a sending authorization policy for an * identity. Sending authorization is an Amazon SES feature that enables you to * authorize other senders to use your identities. For information, see the Amazon * SES Developer Guide.

See Also:

AWS * API Reference

*/ class PutIdentityPolicyRequest : public SESRequest { public: AWS_SES_API PutIdentityPolicyRequest(); // 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 "PutIdentityPolicy"; } AWS_SES_API Aws::String SerializePayload() const override; protected: AWS_SES_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The identity that the policy will apply to. You can specify an identity by * using its name or by using its Amazon Resource Name (ARN). Examples: * user@example.com, example.com, * arn:aws:ses:us-east-1:123456789012:identity/example.com.

To * successfully call this API, you must own the identity.

*/ inline const Aws::String& GetIdentity() const{ return m_identity; } /** *

The identity that the policy will apply to. You can specify an identity by * using its name or by using its Amazon Resource Name (ARN). Examples: * user@example.com, example.com, * arn:aws:ses:us-east-1:123456789012:identity/example.com.

To * successfully call this API, you must own the identity.

*/ inline bool IdentityHasBeenSet() const { return m_identityHasBeenSet; } /** *

The identity that the policy will apply to. You can specify an identity by * using its name or by using its Amazon Resource Name (ARN). Examples: * user@example.com, example.com, * arn:aws:ses:us-east-1:123456789012:identity/example.com.

To * successfully call this API, you must own the identity.

*/ inline void SetIdentity(const Aws::String& value) { m_identityHasBeenSet = true; m_identity = value; } /** *

The identity that the policy will apply to. You can specify an identity by * using its name or by using its Amazon Resource Name (ARN). Examples: * user@example.com, example.com, * arn:aws:ses:us-east-1:123456789012:identity/example.com.

To * successfully call this API, you must own the identity.

*/ inline void SetIdentity(Aws::String&& value) { m_identityHasBeenSet = true; m_identity = std::move(value); } /** *

The identity that the policy will apply to. You can specify an identity by * using its name or by using its Amazon Resource Name (ARN). Examples: * user@example.com, example.com, * arn:aws:ses:us-east-1:123456789012:identity/example.com.

To * successfully call this API, you must own the identity.

*/ inline void SetIdentity(const char* value) { m_identityHasBeenSet = true; m_identity.assign(value); } /** *

The identity that the policy will apply to. You can specify an identity by * using its name or by using its Amazon Resource Name (ARN). Examples: * user@example.com, example.com, * arn:aws:ses:us-east-1:123456789012:identity/example.com.

To * successfully call this API, you must own the identity.

*/ inline PutIdentityPolicyRequest& WithIdentity(const Aws::String& value) { SetIdentity(value); return *this;} /** *

The identity that the policy will apply to. You can specify an identity by * using its name or by using its Amazon Resource Name (ARN). Examples: * user@example.com, example.com, * arn:aws:ses:us-east-1:123456789012:identity/example.com.

To * successfully call this API, you must own the identity.

*/ inline PutIdentityPolicyRequest& WithIdentity(Aws::String&& value) { SetIdentity(std::move(value)); return *this;} /** *

The identity that the policy will apply to. You can specify an identity by * using its name or by using its Amazon Resource Name (ARN). Examples: * user@example.com, example.com, * arn:aws:ses:us-east-1:123456789012:identity/example.com.

To * successfully call this API, you must own the identity.

*/ inline PutIdentityPolicyRequest& WithIdentity(const char* value) { SetIdentity(value); return *this;} /** *

The name of the policy.

The policy name cannot exceed 64 characters * and can only include alphanumeric characters, dashes, and underscores.

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The name of the policy.

The policy name cannot exceed 64 characters * and can only include alphanumeric characters, dashes, and underscores.

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The name of the policy.

The policy name cannot exceed 64 characters * and can only include alphanumeric characters, dashes, and underscores.

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The name of the policy.

The policy name cannot exceed 64 characters * and can only include alphanumeric characters, dashes, and underscores.

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The name of the policy.

The policy name cannot exceed 64 characters * and can only include alphanumeric characters, dashes, and underscores.

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The name of the policy.

The policy name cannot exceed 64 characters * and can only include alphanumeric characters, dashes, and underscores.

*/ inline PutIdentityPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The name of the policy.

The policy name cannot exceed 64 characters * and can only include alphanumeric characters, dashes, and underscores.

*/ inline PutIdentityPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The name of the policy.

The policy name cannot exceed 64 characters * and can only include alphanumeric characters, dashes, and underscores.

*/ inline PutIdentityPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

The text of the policy in JSON format. The policy cannot exceed 4 KB.

*

For information about the syntax of sending authorization policies, see the * Amazon * SES Developer Guide.

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

The text of the policy in JSON format. The policy cannot exceed 4 KB.

*

For information about the syntax of sending authorization policies, see the * Amazon * SES Developer Guide.

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

The text of the policy in JSON format. The policy cannot exceed 4 KB.

*

For information about the syntax of sending authorization policies, see the * Amazon * SES Developer Guide.

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

The text of the policy in JSON format. The policy cannot exceed 4 KB.

*

For information about the syntax of sending authorization policies, see the * Amazon * SES Developer Guide.

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

The text of the policy in JSON format. The policy cannot exceed 4 KB.

*

For information about the syntax of sending authorization policies, see the * Amazon * SES Developer Guide.

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

The text of the policy in JSON format. The policy cannot exceed 4 KB.

*

For information about the syntax of sending authorization policies, see the * Amazon * SES Developer Guide.

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

The text of the policy in JSON format. The policy cannot exceed 4 KB.

*

For information about the syntax of sending authorization policies, see the * Amazon * SES Developer Guide.

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

The text of the policy in JSON format. The policy cannot exceed 4 KB.

*

For information about the syntax of sending authorization policies, see the * Amazon * SES Developer Guide.

*/ inline PutIdentityPolicyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;} private: Aws::String m_identity; bool m_identityHasBeenSet = false; Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::String m_policy; bool m_policyHasBeenSet = false; }; } // namespace Model } // namespace SES } // namespace Aws