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/codeartifact/CodeArtifact_EXPORTS.h> 8 #include <aws/codeartifact/CodeArtifactRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/codeartifact/model/Tag.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Http 17 { 18 class URI; 19 } //namespace Http 20 namespace CodeArtifact 21 { 22 namespace Model 23 { 24 25 /** 26 */ 27 class AWS_CODEARTIFACT_API CreateDomainRequest : public CodeArtifactRequest 28 { 29 public: 30 CreateDomainRequest(); 31 32 // Service request name is the Operation name which will send this request out, 33 // each operation should has unique request name, so that we can get operation's name from this request. 34 // Note: this is not true for response, multiple operations may have the same response name, 35 // so we can not get operation's name from response. GetServiceRequestName()36 inline virtual const char* GetServiceRequestName() const override { return "CreateDomain"; } 37 38 Aws::String SerializePayload() const override; 39 40 void AddQueryStringParameters(Aws::Http::URI& uri) const override; 41 42 43 /** 44 * <p> The name of the domain to create. All domain names in an AWS Region that are 45 * in the same AWS account must be unique. The domain name is used as the prefix in 46 * DNS hostnames. Do not use sensitive information in a domain name because it is 47 * publicly discoverable. </p> 48 */ GetDomain()49 inline const Aws::String& GetDomain() const{ return m_domain; } 50 51 /** 52 * <p> The name of the domain to create. All domain names in an AWS Region that are 53 * in the same AWS account must be unique. The domain name is used as the prefix in 54 * DNS hostnames. Do not use sensitive information in a domain name because it is 55 * publicly discoverable. </p> 56 */ DomainHasBeenSet()57 inline bool DomainHasBeenSet() const { return m_domainHasBeenSet; } 58 59 /** 60 * <p> The name of the domain to create. All domain names in an AWS Region that are 61 * in the same AWS account must be unique. The domain name is used as the prefix in 62 * DNS hostnames. Do not use sensitive information in a domain name because it is 63 * publicly discoverable. </p> 64 */ SetDomain(const Aws::String & value)65 inline void SetDomain(const Aws::String& value) { m_domainHasBeenSet = true; m_domain = value; } 66 67 /** 68 * <p> The name of the domain to create. All domain names in an AWS Region that are 69 * in the same AWS account must be unique. The domain name is used as the prefix in 70 * DNS hostnames. Do not use sensitive information in a domain name because it is 71 * publicly discoverable. </p> 72 */ SetDomain(Aws::String && value)73 inline void SetDomain(Aws::String&& value) { m_domainHasBeenSet = true; m_domain = std::move(value); } 74 75 /** 76 * <p> The name of the domain to create. All domain names in an AWS Region that are 77 * in the same AWS account must be unique. The domain name is used as the prefix in 78 * DNS hostnames. Do not use sensitive information in a domain name because it is 79 * publicly discoverable. </p> 80 */ SetDomain(const char * value)81 inline void SetDomain(const char* value) { m_domainHasBeenSet = true; m_domain.assign(value); } 82 83 /** 84 * <p> The name of the domain to create. All domain names in an AWS Region that are 85 * in the same AWS account must be unique. The domain name is used as the prefix in 86 * DNS hostnames. Do not use sensitive information in a domain name because it is 87 * publicly discoverable. </p> 88 */ WithDomain(const Aws::String & value)89 inline CreateDomainRequest& WithDomain(const Aws::String& value) { SetDomain(value); return *this;} 90 91 /** 92 * <p> The name of the domain to create. All domain names in an AWS Region that are 93 * in the same AWS account must be unique. The domain name is used as the prefix in 94 * DNS hostnames. Do not use sensitive information in a domain name because it is 95 * publicly discoverable. </p> 96 */ WithDomain(Aws::String && value)97 inline CreateDomainRequest& WithDomain(Aws::String&& value) { SetDomain(std::move(value)); return *this;} 98 99 /** 100 * <p> The name of the domain to create. All domain names in an AWS Region that are 101 * in the same AWS account must be unique. The domain name is used as the prefix in 102 * DNS hostnames. Do not use sensitive information in a domain name because it is 103 * publicly discoverable. </p> 104 */ WithDomain(const char * value)105 inline CreateDomainRequest& WithDomain(const char* value) { SetDomain(value); return *this;} 106 107 108 /** 109 * <p> The encryption key for the domain. This is used to encrypt content stored in 110 * a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a 111 * key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your 112 * IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> 113 * permissions on the encryption key that is used. For more information, see <a 114 * href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax">DescribeKey</a> 115 * in the <i>AWS Key Management Service API Reference</i> and <a 116 * href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">AWS 117 * KMS API Permissions Reference</a> in the <i>AWS Key Management Service Developer 118 * Guide</i>. </p> <p> CodeArtifact supports only symmetric CMKs. Do 119 * not associate an asymmetric CMK with your domain. For more information, see <a 120 * href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using 121 * symmetric and asymmetric keys</a> in the <i>AWS Key Management Service Developer 122 * Guide</i>. </p> 123 */ GetEncryptionKey()124 inline const Aws::String& GetEncryptionKey() const{ return m_encryptionKey; } 125 126 /** 127 * <p> The encryption key for the domain. This is used to encrypt content stored in 128 * a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a 129 * key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your 130 * IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> 131 * permissions on the encryption key that is used. For more information, see <a 132 * href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax">DescribeKey</a> 133 * in the <i>AWS Key Management Service API Reference</i> and <a 134 * href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">AWS 135 * KMS API Permissions Reference</a> in the <i>AWS Key Management Service Developer 136 * Guide</i>. </p> <p> CodeArtifact supports only symmetric CMKs. Do 137 * not associate an asymmetric CMK with your domain. For more information, see <a 138 * href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using 139 * symmetric and asymmetric keys</a> in the <i>AWS Key Management Service Developer 140 * Guide</i>. </p> 141 */ EncryptionKeyHasBeenSet()142 inline bool EncryptionKeyHasBeenSet() const { return m_encryptionKeyHasBeenSet; } 143 144 /** 145 * <p> The encryption key for the domain. This is used to encrypt content stored in 146 * a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a 147 * key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your 148 * IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> 149 * permissions on the encryption key that is used. For more information, see <a 150 * href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax">DescribeKey</a> 151 * in the <i>AWS Key Management Service API Reference</i> and <a 152 * href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">AWS 153 * KMS API Permissions Reference</a> in the <i>AWS Key Management Service Developer 154 * Guide</i>. </p> <p> CodeArtifact supports only symmetric CMKs. Do 155 * not associate an asymmetric CMK with your domain. For more information, see <a 156 * href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using 157 * symmetric and asymmetric keys</a> in the <i>AWS Key Management Service Developer 158 * Guide</i>. </p> 159 */ SetEncryptionKey(const Aws::String & value)160 inline void SetEncryptionKey(const Aws::String& value) { m_encryptionKeyHasBeenSet = true; m_encryptionKey = value; } 161 162 /** 163 * <p> The encryption key for the domain. This is used to encrypt content stored in 164 * a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a 165 * key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your 166 * IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> 167 * permissions on the encryption key that is used. For more information, see <a 168 * href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax">DescribeKey</a> 169 * in the <i>AWS Key Management Service API Reference</i> and <a 170 * href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">AWS 171 * KMS API Permissions Reference</a> in the <i>AWS Key Management Service Developer 172 * Guide</i>. </p> <p> CodeArtifact supports only symmetric CMKs. Do 173 * not associate an asymmetric CMK with your domain. For more information, see <a 174 * href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using 175 * symmetric and asymmetric keys</a> in the <i>AWS Key Management Service Developer 176 * Guide</i>. </p> 177 */ SetEncryptionKey(Aws::String && value)178 inline void SetEncryptionKey(Aws::String&& value) { m_encryptionKeyHasBeenSet = true; m_encryptionKey = std::move(value); } 179 180 /** 181 * <p> The encryption key for the domain. This is used to encrypt content stored in 182 * a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a 183 * key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your 184 * IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> 185 * permissions on the encryption key that is used. For more information, see <a 186 * href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax">DescribeKey</a> 187 * in the <i>AWS Key Management Service API Reference</i> and <a 188 * href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">AWS 189 * KMS API Permissions Reference</a> in the <i>AWS Key Management Service Developer 190 * Guide</i>. </p> <p> CodeArtifact supports only symmetric CMKs. Do 191 * not associate an asymmetric CMK with your domain. For more information, see <a 192 * href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using 193 * symmetric and asymmetric keys</a> in the <i>AWS Key Management Service Developer 194 * Guide</i>. </p> 195 */ SetEncryptionKey(const char * value)196 inline void SetEncryptionKey(const char* value) { m_encryptionKeyHasBeenSet = true; m_encryptionKey.assign(value); } 197 198 /** 199 * <p> The encryption key for the domain. This is used to encrypt content stored in 200 * a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a 201 * key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your 202 * IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> 203 * permissions on the encryption key that is used. For more information, see <a 204 * href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax">DescribeKey</a> 205 * in the <i>AWS Key Management Service API Reference</i> and <a 206 * href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">AWS 207 * KMS API Permissions Reference</a> in the <i>AWS Key Management Service Developer 208 * Guide</i>. </p> <p> CodeArtifact supports only symmetric CMKs. Do 209 * not associate an asymmetric CMK with your domain. For more information, see <a 210 * href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using 211 * symmetric and asymmetric keys</a> in the <i>AWS Key Management Service Developer 212 * Guide</i>. </p> 213 */ WithEncryptionKey(const Aws::String & value)214 inline CreateDomainRequest& WithEncryptionKey(const Aws::String& value) { SetEncryptionKey(value); return *this;} 215 216 /** 217 * <p> The encryption key for the domain. This is used to encrypt content stored in 218 * a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a 219 * key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your 220 * IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> 221 * permissions on the encryption key that is used. For more information, see <a 222 * href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax">DescribeKey</a> 223 * in the <i>AWS Key Management Service API Reference</i> and <a 224 * href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">AWS 225 * KMS API Permissions Reference</a> in the <i>AWS Key Management Service Developer 226 * Guide</i>. </p> <p> CodeArtifact supports only symmetric CMKs. Do 227 * not associate an asymmetric CMK with your domain. For more information, see <a 228 * href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using 229 * symmetric and asymmetric keys</a> in the <i>AWS Key Management Service Developer 230 * Guide</i>. </p> 231 */ WithEncryptionKey(Aws::String && value)232 inline CreateDomainRequest& WithEncryptionKey(Aws::String&& value) { SetEncryptionKey(std::move(value)); return *this;} 233 234 /** 235 * <p> The encryption key for the domain. This is used to encrypt content stored in 236 * a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a 237 * key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your 238 * IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> 239 * permissions on the encryption key that is used. For more information, see <a 240 * href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax">DescribeKey</a> 241 * in the <i>AWS Key Management Service API Reference</i> and <a 242 * href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">AWS 243 * KMS API Permissions Reference</a> in the <i>AWS Key Management Service Developer 244 * Guide</i>. </p> <p> CodeArtifact supports only symmetric CMKs. Do 245 * not associate an asymmetric CMK with your domain. For more information, see <a 246 * href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using 247 * symmetric and asymmetric keys</a> in the <i>AWS Key Management Service Developer 248 * Guide</i>. </p> 249 */ WithEncryptionKey(const char * value)250 inline CreateDomainRequest& WithEncryptionKey(const char* value) { SetEncryptionKey(value); return *this;} 251 252 253 /** 254 * <p>One or more tag key-value pairs for the domain.</p> 255 */ GetTags()256 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; } 257 258 /** 259 * <p>One or more tag key-value pairs for the domain.</p> 260 */ TagsHasBeenSet()261 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 262 263 /** 264 * <p>One or more tag key-value pairs for the domain.</p> 265 */ SetTags(const Aws::Vector<Tag> & value)266 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; } 267 268 /** 269 * <p>One or more tag key-value pairs for the domain.</p> 270 */ SetTags(Aws::Vector<Tag> && value)271 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 272 273 /** 274 * <p>One or more tag key-value pairs for the domain.</p> 275 */ WithTags(const Aws::Vector<Tag> & value)276 inline CreateDomainRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;} 277 278 /** 279 * <p>One or more tag key-value pairs for the domain.</p> 280 */ WithTags(Aws::Vector<Tag> && value)281 inline CreateDomainRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;} 282 283 /** 284 * <p>One or more tag key-value pairs for the domain.</p> 285 */ AddTags(const Tag & value)286 inline CreateDomainRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } 287 288 /** 289 * <p>One or more tag key-value pairs for the domain.</p> 290 */ AddTags(Tag && value)291 inline CreateDomainRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } 292 293 private: 294 295 Aws::String m_domain; 296 bool m_domainHasBeenSet; 297 298 Aws::String m_encryptionKey; 299 bool m_encryptionKeyHasBeenSet; 300 301 Aws::Vector<Tag> m_tags; 302 bool m_tagsHasBeenSet; 303 }; 304 305 } // namespace Model 306 } // namespace CodeArtifact 307 } // namespace Aws 308