/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.codeartifact.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDomainRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* 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. *
*/ private String domain; /** *
* 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
* encryptionKey
, your IAM role must have kms:DescribeKey
and kms:CreateGrant
* permissions on the encryption key that is used. For more information, see DescribeKey in the Key Management Service API Reference and Key Management
* Service API Permissions Reference in the Key Management Service Developer Guide.
*
* CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more * information, see Using * symmetric and asymmetric keys in the Key Management Service Developer Guide. *
** One or more tag key-value pairs for the domain. *
*/ private java.util.List* 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. *
* * @param domain * 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. */ public void setDomain(String domain) { this.domain = domain; } /** ** 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. *
* * @return 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. */ public String getDomain() { return this.domain; } /** ** 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. *
* * @param domain * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainRequest withDomain(String domain) { setDomain(domain); return this; } /** *
* 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
* encryptionKey
, your IAM role must have kms:DescribeKey
and kms:CreateGrant
* permissions on the encryption key that is used. For more information, see DescribeKey in the Key Management Service API Reference and Key Management
* Service API Permissions Reference in the Key Management Service Developer Guide.
*
* CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more * information, see Using * symmetric and asymmetric keys in the Key Management Service Developer Guide. *
*encryptionKey
, your IAM role must have kms:DescribeKey
and
* kms:CreateGrant
permissions on the encryption key that is used. For more information, see DescribeKey in the Key Management Service API Reference and Key
* Management Service API Permissions Reference in the Key Management Service Developer Guide.
* * CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more * information, see Using symmetric and * asymmetric keys in the Key Management Service Developer Guide. *
*/ public void setEncryptionKey(String encryptionKey) { this.encryptionKey = encryptionKey; } /** *
* 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
* encryptionKey
, your IAM role must have kms:DescribeKey
and kms:CreateGrant
* permissions on the encryption key that is used. For more information, see DescribeKey in the Key Management Service API Reference and Key Management
* Service API Permissions Reference in the Key Management Service Developer Guide.
*
* CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more * information, see Using * symmetric and asymmetric keys in the Key Management Service Developer Guide. *
*encryptionKey
, your IAM role must have kms:DescribeKey
and
* kms:CreateGrant
permissions on the encryption key that is used. For more information, see DescribeKey in the Key Management Service API Reference and Key
* Management Service API Permissions Reference in the Key Management Service Developer Guide.
* * CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more * information, see Using symmetric * and asymmetric keys in the Key Management Service Developer Guide. *
*/ public String getEncryptionKey() { return this.encryptionKey; } /** *
* 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
* encryptionKey
, your IAM role must have kms:DescribeKey
and kms:CreateGrant
* permissions on the encryption key that is used. For more information, see DescribeKey in the Key Management Service API Reference and Key Management
* Service API Permissions Reference in the Key Management Service Developer Guide.
*
* CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more * information, see Using * symmetric and asymmetric keys in the Key Management Service Developer Guide. *
*encryptionKey
, your IAM role must have kms:DescribeKey
and
* kms:CreateGrant
permissions on the encryption key that is used. For more information, see DescribeKey in the Key Management Service API Reference and Key
* Management Service API Permissions Reference in the Key Management Service Developer Guide.
* * CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more * information, see Using symmetric and * asymmetric keys in the Key Management Service Developer Guide. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainRequest withEncryptionKey(String encryptionKey) { setEncryptionKey(encryptionKey); return this; } /** ** One or more tag key-value pairs for the domain. *
* * @return One or more tag key-value pairs for the domain. */ public java.util.List* One or more tag key-value pairs for the domain. *
* * @param tags * One or more tag key-value pairs for the domain. */ public void setTags(java.util.Collection* One or more tag key-value pairs for the domain. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * One or more tag key-value pairs for the domain. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* One or more tag key-value pairs for the domain. *
* * @param tags * One or more tag key-value pairs for the domain. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainRequest withTags(java.util.Collection