aws_sdk_codeartifact/client/
create_domain.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateDomain`](crate::operation::create_domain::builders::CreateDomainFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`domain(impl Into<String>)`](crate::operation::create_domain::builders::CreateDomainFluentBuilder::domain) / [`set_domain(Option<String>)`](crate::operation::create_domain::builders::CreateDomainFluentBuilder::set_domain):<br>required: **true**<br><p>The name of the domain to create. All domain names in an Amazon Web Services Region that are in the same Amazon Web Services account must be unique. The domain name is used as the prefix in DNS hostnames. Do not use sensitive information in a domain name because it is publicly discoverable.</p><br>
7    ///   - [`encryption_key(impl Into<String>)`](crate::operation::create_domain::builders::CreateDomainFluentBuilder::encryption_key) / [`set_encryption_key(Option<String>)`](crate::operation::create_domain::builders::CreateDomainFluentBuilder::set_encryption_key):<br>required: **false**<br><p>The encryption key for the domain. This is used to encrypt content stored in a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a key alias, or a key alias ARN. To specify an <code>encryptionKey</code>, your IAM role must have <code>kms:DescribeKey</code> and <code>kms:CreateGrant</code> permissions on the encryption key that is used. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestSyntax">DescribeKey</a> in the <i>Key Management Service API Reference</i> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">Key Management Service API Permissions Reference</a> in the <i>Key Management Service Developer Guide</i>.</p><important>  <p>CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p> </important><br>
8    ///   - [`tags(Tag)`](crate::operation::create_domain::builders::CreateDomainFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_domain::builders::CreateDomainFluentBuilder::set_tags):<br>required: **false**<br><p>One or more tag key-value pairs for the domain.</p><br>
9    /// - On success, responds with [`CreateDomainOutput`](crate::operation::create_domain::CreateDomainOutput) with field(s):
10    ///   - [`domain(Option<DomainDescription>)`](crate::operation::create_domain::CreateDomainOutput::domain): <p>Contains information about the created domain after processing the request.</p>
11    /// - On failure, responds with [`SdkError<CreateDomainError>`](crate::operation::create_domain::CreateDomainError)
12    pub fn create_domain(&self) -> crate::operation::create_domain::builders::CreateDomainFluentBuilder {
13        crate::operation::create_domain::builders::CreateDomainFluentBuilder::new(self.handle.clone())
14    }
15}