1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/email/SES_EXPORTS.h> 8 #include <aws/email/SESRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace SES 16 { 17 namespace Model 18 { 19 20 /** 21 * <p>Represents a request to return the requested sending authorization policies 22 * for an identity. Sending authorization is an Amazon SES feature that enables you 23 * to authorize other senders to use your identities. For information, see the <a 24 * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon 25 * SES Developer Guide</a>.</p><p><h3>See Also:</h3> <a 26 * href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityPoliciesRequest">AWS 27 * API Reference</a></p> 28 */ 29 class AWS_SES_API GetIdentityPoliciesRequest : public SESRequest 30 { 31 public: 32 GetIdentityPoliciesRequest(); 33 34 // Service request name is the Operation name which will send this request out, 35 // each operation should has unique request name, so that we can get operation's name from this request. 36 // Note: this is not true for response, multiple operations may have the same response name, 37 // so we can not get operation's name from response. GetServiceRequestName()38 inline virtual const char* GetServiceRequestName() const override { return "GetIdentityPolicies"; } 39 40 Aws::String SerializePayload() const override; 41 42 protected: 43 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 44 45 public: 46 47 /** 48 * <p>The identity for which the policies will be retrieved. You can specify an 49 * identity by using its name or by using its Amazon Resource Name (ARN). Examples: 50 * <code>user@example.com</code>, <code>example.com</code>, 51 * <code>arn:aws:ses:us-east-1:123456789012:identity/example.com</code>.</p> <p>To 52 * successfully call this API, you must own the identity.</p> 53 */ GetIdentity()54 inline const Aws::String& GetIdentity() const{ return m_identity; } 55 56 /** 57 * <p>The identity for which the policies will be retrieved. You can specify an 58 * identity by using its name or by using its Amazon Resource Name (ARN). Examples: 59 * <code>user@example.com</code>, <code>example.com</code>, 60 * <code>arn:aws:ses:us-east-1:123456789012:identity/example.com</code>.</p> <p>To 61 * successfully call this API, you must own the identity.</p> 62 */ IdentityHasBeenSet()63 inline bool IdentityHasBeenSet() const { return m_identityHasBeenSet; } 64 65 /** 66 * <p>The identity for which the policies will be retrieved. You can specify an 67 * identity by using its name or by using its Amazon Resource Name (ARN). Examples: 68 * <code>user@example.com</code>, <code>example.com</code>, 69 * <code>arn:aws:ses:us-east-1:123456789012:identity/example.com</code>.</p> <p>To 70 * successfully call this API, you must own the identity.</p> 71 */ SetIdentity(const Aws::String & value)72 inline void SetIdentity(const Aws::String& value) { m_identityHasBeenSet = true; m_identity = value; } 73 74 /** 75 * <p>The identity for which the policies will be retrieved. You can specify an 76 * identity by using its name or by using its Amazon Resource Name (ARN). Examples: 77 * <code>user@example.com</code>, <code>example.com</code>, 78 * <code>arn:aws:ses:us-east-1:123456789012:identity/example.com</code>.</p> <p>To 79 * successfully call this API, you must own the identity.</p> 80 */ SetIdentity(Aws::String && value)81 inline void SetIdentity(Aws::String&& value) { m_identityHasBeenSet = true; m_identity = std::move(value); } 82 83 /** 84 * <p>The identity for which the policies will be retrieved. You can specify an 85 * identity by using its name or by using its Amazon Resource Name (ARN). Examples: 86 * <code>user@example.com</code>, <code>example.com</code>, 87 * <code>arn:aws:ses:us-east-1:123456789012:identity/example.com</code>.</p> <p>To 88 * successfully call this API, you must own the identity.</p> 89 */ SetIdentity(const char * value)90 inline void SetIdentity(const char* value) { m_identityHasBeenSet = true; m_identity.assign(value); } 91 92 /** 93 * <p>The identity for which the policies will be retrieved. You can specify an 94 * identity by using its name or by using its Amazon Resource Name (ARN). Examples: 95 * <code>user@example.com</code>, <code>example.com</code>, 96 * <code>arn:aws:ses:us-east-1:123456789012:identity/example.com</code>.</p> <p>To 97 * successfully call this API, you must own the identity.</p> 98 */ WithIdentity(const Aws::String & value)99 inline GetIdentityPoliciesRequest& WithIdentity(const Aws::String& value) { SetIdentity(value); return *this;} 100 101 /** 102 * <p>The identity for which the policies will be retrieved. You can specify an 103 * identity by using its name or by using its Amazon Resource Name (ARN). Examples: 104 * <code>user@example.com</code>, <code>example.com</code>, 105 * <code>arn:aws:ses:us-east-1:123456789012:identity/example.com</code>.</p> <p>To 106 * successfully call this API, you must own the identity.</p> 107 */ WithIdentity(Aws::String && value)108 inline GetIdentityPoliciesRequest& WithIdentity(Aws::String&& value) { SetIdentity(std::move(value)); return *this;} 109 110 /** 111 * <p>The identity for which the policies will be retrieved. You can specify an 112 * identity by using its name or by using its Amazon Resource Name (ARN). Examples: 113 * <code>user@example.com</code>, <code>example.com</code>, 114 * <code>arn:aws:ses:us-east-1:123456789012:identity/example.com</code>.</p> <p>To 115 * successfully call this API, you must own the identity.</p> 116 */ WithIdentity(const char * value)117 inline GetIdentityPoliciesRequest& WithIdentity(const char* value) { SetIdentity(value); return *this;} 118 119 120 /** 121 * <p>A list of the names of policies to be retrieved. You can retrieve a maximum 122 * of 20 policies at a time. If you do not know the names of the policies that are 123 * attached to the identity, you can use <code>ListIdentityPolicies</code>.</p> 124 */ GetPolicyNames()125 inline const Aws::Vector<Aws::String>& GetPolicyNames() const{ return m_policyNames; } 126 127 /** 128 * <p>A list of the names of policies to be retrieved. You can retrieve a maximum 129 * of 20 policies at a time. If you do not know the names of the policies that are 130 * attached to the identity, you can use <code>ListIdentityPolicies</code>.</p> 131 */ PolicyNamesHasBeenSet()132 inline bool PolicyNamesHasBeenSet() const { return m_policyNamesHasBeenSet; } 133 134 /** 135 * <p>A list of the names of policies to be retrieved. You can retrieve a maximum 136 * of 20 policies at a time. If you do not know the names of the policies that are 137 * attached to the identity, you can use <code>ListIdentityPolicies</code>.</p> 138 */ SetPolicyNames(const Aws::Vector<Aws::String> & value)139 inline void SetPolicyNames(const Aws::Vector<Aws::String>& value) { m_policyNamesHasBeenSet = true; m_policyNames = value; } 140 141 /** 142 * <p>A list of the names of policies to be retrieved. You can retrieve a maximum 143 * of 20 policies at a time. If you do not know the names of the policies that are 144 * attached to the identity, you can use <code>ListIdentityPolicies</code>.</p> 145 */ SetPolicyNames(Aws::Vector<Aws::String> && value)146 inline void SetPolicyNames(Aws::Vector<Aws::String>&& value) { m_policyNamesHasBeenSet = true; m_policyNames = std::move(value); } 147 148 /** 149 * <p>A list of the names of policies to be retrieved. You can retrieve a maximum 150 * of 20 policies at a time. If you do not know the names of the policies that are 151 * attached to the identity, you can use <code>ListIdentityPolicies</code>.</p> 152 */ WithPolicyNames(const Aws::Vector<Aws::String> & value)153 inline GetIdentityPoliciesRequest& WithPolicyNames(const Aws::Vector<Aws::String>& value) { SetPolicyNames(value); return *this;} 154 155 /** 156 * <p>A list of the names of policies to be retrieved. You can retrieve a maximum 157 * of 20 policies at a time. If you do not know the names of the policies that are 158 * attached to the identity, you can use <code>ListIdentityPolicies</code>.</p> 159 */ WithPolicyNames(Aws::Vector<Aws::String> && value)160 inline GetIdentityPoliciesRequest& WithPolicyNames(Aws::Vector<Aws::String>&& value) { SetPolicyNames(std::move(value)); return *this;} 161 162 /** 163 * <p>A list of the names of policies to be retrieved. You can retrieve a maximum 164 * of 20 policies at a time. If you do not know the names of the policies that are 165 * attached to the identity, you can use <code>ListIdentityPolicies</code>.</p> 166 */ AddPolicyNames(const Aws::String & value)167 inline GetIdentityPoliciesRequest& AddPolicyNames(const Aws::String& value) { m_policyNamesHasBeenSet = true; m_policyNames.push_back(value); return *this; } 168 169 /** 170 * <p>A list of the names of policies to be retrieved. You can retrieve a maximum 171 * of 20 policies at a time. If you do not know the names of the policies that are 172 * attached to the identity, you can use <code>ListIdentityPolicies</code>.</p> 173 */ AddPolicyNames(Aws::String && value)174 inline GetIdentityPoliciesRequest& AddPolicyNames(Aws::String&& value) { m_policyNamesHasBeenSet = true; m_policyNames.push_back(std::move(value)); return *this; } 175 176 /** 177 * <p>A list of the names of policies to be retrieved. You can retrieve a maximum 178 * of 20 policies at a time. If you do not know the names of the policies that are 179 * attached to the identity, you can use <code>ListIdentityPolicies</code>.</p> 180 */ AddPolicyNames(const char * value)181 inline GetIdentityPoliciesRequest& AddPolicyNames(const char* value) { m_policyNamesHasBeenSet = true; m_policyNames.push_back(value); return *this; } 182 183 private: 184 185 Aws::String m_identity; 186 bool m_identityHasBeenSet; 187 188 Aws::Vector<Aws::String> m_policyNames; 189 bool m_policyNamesHasBeenSet; 190 }; 191 192 } // namespace Model 193 } // namespace SES 194 } // namespace Aws 195