All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.opensearch.model.CreateDomainRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.opensearch.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateDomainRequest private constructor(builder: Builder) {
    /**
     * Identity and Access Management (IAM) policy document specifying the access policies for the new domain.
     */
    public val accessPolicies: kotlin.String? = builder.accessPolicies
    /**
     * Key-value pairs to specify advanced configuration options. The following key-value pairs are supported:
     * + `"rest.action.multi.allow_explicit_index": "true" | "false"` - Note the use of a string rather than a boolean. Specifies whether explicit references to indexes are allowed inside the body of HTTP requests. If you want to configure access policies for domain sub-resources, such as specific indexes and domain APIs, you must disable this property. Default is true.
     * + `"indices.fielddata.cache.size": "80" ` - Note the use of a string rather than a boolean. Specifies the percentage of heap space allocated to field data. Default is unbounded.
     * + `"indices.query.bool.max_clause_count": "1024"` - Note the use of a string rather than a boolean. Specifies the maximum number of clauses allowed in a Lucene boolean query. Default is 1,024. Queries with more than the permitted number of clauses result in a `TooManyClauses` error.
     * + `"override_main_response_version": "true" | "false"` - Note the use of a string rather than a boolean. Specifies whether the domain reports its version as 7.10 to allow Elasticsearch OSS clients and plugins to continue working with it. Default is false when creating a domain and true when upgrading a domain.
     *
     * For more information, see [Advanced cluster parameters](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options).
     */
    public val advancedOptions: Map? = builder.advancedOptions
    /**
     * Options for fine-grained access control.
     */
    public val advancedSecurityOptions: aws.sdk.kotlin.services.opensearch.model.AdvancedSecurityOptionsInput? = builder.advancedSecurityOptions
    /**
     * Options for all machine learning features for the specified domain.
     */
    public val aimlOptions: aws.sdk.kotlin.services.opensearch.model.AimlOptionsInput? = builder.aimlOptions
    /**
     * Options for Auto-Tune.
     */
    public val autoTuneOptions: aws.sdk.kotlin.services.opensearch.model.AutoTuneOptionsInput? = builder.autoTuneOptions
    /**
     * Container for the cluster configuration of a domain.
     */
    public val clusterConfig: aws.sdk.kotlin.services.opensearch.model.ClusterConfig? = builder.clusterConfig
    /**
     * Key-value pairs to configure Amazon Cognito authentication. For more information, see [Configuring Amazon Cognito authentication for OpenSearch Dashboards](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html).
     */
    public val cognitoOptions: aws.sdk.kotlin.services.opensearch.model.CognitoOptions? = builder.cognitoOptions
    /**
     * Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.
     */
    public val domainEndpointOptions: aws.sdk.kotlin.services.opensearch.model.DomainEndpointOptions? = builder.domainEndpointOptions
    /**
     * Name of the OpenSearch Service domain to create. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.
     */
    public val domainName: kotlin.String? = builder.domainName
    /**
     * Container for the parameters required to enable EBS-based storage for an OpenSearch Service domain.
     */
    public val ebsOptions: aws.sdk.kotlin.services.opensearch.model.EbsOptions? = builder.ebsOptions
    /**
     * Key-value pairs to enable encryption at rest.
     */
    public val encryptionAtRestOptions: aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions? = builder.encryptionAtRestOptions
    /**
     * String of format Elasticsearch_X.Y or OpenSearch_X.Y to specify the engine version for the OpenSearch Service domain. For example, `OpenSearch_1.0` or `Elasticsearch_7.9`. For more information, see [Creating and managing Amazon OpenSearch Service domains](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains).
     */
    public val engineVersion: kotlin.String? = builder.engineVersion
    /**
     * Specify either dual stack or IPv4 as your IP address type. Dual stack allows you to share domain resources across IPv4 and IPv6 address types, and is the recommended option. If you set your IP address type to dual stack, you can't change your address type later.
     */
    public val ipAddressType: aws.sdk.kotlin.services.opensearch.model.IpAddressType? = builder.ipAddressType
    /**
     * Key-value pairs to configure log publishing.
     */
    public val logPublishingOptions: Map? = builder.logPublishingOptions
    /**
     * Enables node-to-node encryption.
     */
    public val nodeToNodeEncryptionOptions: aws.sdk.kotlin.services.opensearch.model.NodeToNodeEncryptionOptions? = builder.nodeToNodeEncryptionOptions
    /**
     * Specifies a daily 10-hour time block during which OpenSearch Service can perform configuration changes on the domain, including service software updates and Auto-Tune enhancements that require a blue/green deployment. If no options are specified, the default start time of 10:00 P.M. local time (for the Region that the domain is created in) is used.
     */
    public val offPeakWindowOptions: aws.sdk.kotlin.services.opensearch.model.OffPeakWindowOptions? = builder.offPeakWindowOptions
    /**
     * DEPRECATED. Container for the parameters required to configure automated snapshots of domain indexes.
     */
    public val snapshotOptions: aws.sdk.kotlin.services.opensearch.model.SnapshotOptions? = builder.snapshotOptions
    /**
     * Software update options for the domain.
     */
    public val softwareUpdateOptions: aws.sdk.kotlin.services.opensearch.model.SoftwareUpdateOptions? = builder.softwareUpdateOptions
    /**
     * List of tags to add to the domain upon creation.
     */
    public val tagList: List? = builder.tagList
    /**
     * Container for the values required to configure VPC access domains. If you don't specify these values, OpenSearch Service creates the domain with a public endpoint. For more information, see [Launching your Amazon OpenSearch Service domains using a VPC](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html).
     */
    public val vpcOptions: aws.sdk.kotlin.services.opensearch.model.VpcOptions? = builder.vpcOptions

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.opensearch.model.CreateDomainRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateDomainRequest(")
        append("accessPolicies=$accessPolicies,")
        append("advancedOptions=$advancedOptions,")
        append("advancedSecurityOptions=$advancedSecurityOptions,")
        append("aimlOptions=$aimlOptions,")
        append("autoTuneOptions=$autoTuneOptions,")
        append("clusterConfig=$clusterConfig,")
        append("cognitoOptions=$cognitoOptions,")
        append("domainEndpointOptions=$domainEndpointOptions,")
        append("domainName=$domainName,")
        append("ebsOptions=$ebsOptions,")
        append("encryptionAtRestOptions=$encryptionAtRestOptions,")
        append("engineVersion=$engineVersion,")
        append("ipAddressType=$ipAddressType,")
        append("logPublishingOptions=$logPublishingOptions,")
        append("nodeToNodeEncryptionOptions=$nodeToNodeEncryptionOptions,")
        append("offPeakWindowOptions=$offPeakWindowOptions,")
        append("snapshotOptions=$snapshotOptions,")
        append("softwareUpdateOptions=$softwareUpdateOptions,")
        append("tagList=$tagList,")
        append("vpcOptions=$vpcOptions")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accessPolicies?.hashCode() ?: 0
        result = 31 * result + (advancedOptions?.hashCode() ?: 0)
        result = 31 * result + (advancedSecurityOptions?.hashCode() ?: 0)
        result = 31 * result + (aimlOptions?.hashCode() ?: 0)
        result = 31 * result + (autoTuneOptions?.hashCode() ?: 0)
        result = 31 * result + (clusterConfig?.hashCode() ?: 0)
        result = 31 * result + (cognitoOptions?.hashCode() ?: 0)
        result = 31 * result + (domainEndpointOptions?.hashCode() ?: 0)
        result = 31 * result + (domainName?.hashCode() ?: 0)
        result = 31 * result + (ebsOptions?.hashCode() ?: 0)
        result = 31 * result + (encryptionAtRestOptions?.hashCode() ?: 0)
        result = 31 * result + (engineVersion?.hashCode() ?: 0)
        result = 31 * result + (ipAddressType?.hashCode() ?: 0)
        result = 31 * result + (logPublishingOptions?.hashCode() ?: 0)
        result = 31 * result + (nodeToNodeEncryptionOptions?.hashCode() ?: 0)
        result = 31 * result + (offPeakWindowOptions?.hashCode() ?: 0)
        result = 31 * result + (snapshotOptions?.hashCode() ?: 0)
        result = 31 * result + (softwareUpdateOptions?.hashCode() ?: 0)
        result = 31 * result + (tagList?.hashCode() ?: 0)
        result = 31 * result + (vpcOptions?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as CreateDomainRequest

        if (accessPolicies != other.accessPolicies) return false
        if (advancedOptions != other.advancedOptions) return false
        if (advancedSecurityOptions != other.advancedSecurityOptions) return false
        if (aimlOptions != other.aimlOptions) return false
        if (autoTuneOptions != other.autoTuneOptions) return false
        if (clusterConfig != other.clusterConfig) return false
        if (cognitoOptions != other.cognitoOptions) return false
        if (domainEndpointOptions != other.domainEndpointOptions) return false
        if (domainName != other.domainName) return false
        if (ebsOptions != other.ebsOptions) return false
        if (encryptionAtRestOptions != other.encryptionAtRestOptions) return false
        if (engineVersion != other.engineVersion) return false
        if (ipAddressType != other.ipAddressType) return false
        if (logPublishingOptions != other.logPublishingOptions) return false
        if (nodeToNodeEncryptionOptions != other.nodeToNodeEncryptionOptions) return false
        if (offPeakWindowOptions != other.offPeakWindowOptions) return false
        if (snapshotOptions != other.snapshotOptions) return false
        if (softwareUpdateOptions != other.softwareUpdateOptions) return false
        if (tagList != other.tagList) return false
        if (vpcOptions != other.vpcOptions) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.opensearch.model.CreateDomainRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Identity and Access Management (IAM) policy document specifying the access policies for the new domain.
         */
        public var accessPolicies: kotlin.String? = null
        /**
         * Key-value pairs to specify advanced configuration options. The following key-value pairs are supported:
         * + `"rest.action.multi.allow_explicit_index": "true" | "false"` - Note the use of a string rather than a boolean. Specifies whether explicit references to indexes are allowed inside the body of HTTP requests. If you want to configure access policies for domain sub-resources, such as specific indexes and domain APIs, you must disable this property. Default is true.
         * + `"indices.fielddata.cache.size": "80" ` - Note the use of a string rather than a boolean. Specifies the percentage of heap space allocated to field data. Default is unbounded.
         * + `"indices.query.bool.max_clause_count": "1024"` - Note the use of a string rather than a boolean. Specifies the maximum number of clauses allowed in a Lucene boolean query. Default is 1,024. Queries with more than the permitted number of clauses result in a `TooManyClauses` error.
         * + `"override_main_response_version": "true" | "false"` - Note the use of a string rather than a boolean. Specifies whether the domain reports its version as 7.10 to allow Elasticsearch OSS clients and plugins to continue working with it. Default is false when creating a domain and true when upgrading a domain.
         *
         * For more information, see [Advanced cluster parameters](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options).
         */
        public var advancedOptions: Map? = null
        /**
         * Options for fine-grained access control.
         */
        public var advancedSecurityOptions: aws.sdk.kotlin.services.opensearch.model.AdvancedSecurityOptionsInput? = null
        /**
         * Options for all machine learning features for the specified domain.
         */
        public var aimlOptions: aws.sdk.kotlin.services.opensearch.model.AimlOptionsInput? = null
        /**
         * Options for Auto-Tune.
         */
        public var autoTuneOptions: aws.sdk.kotlin.services.opensearch.model.AutoTuneOptionsInput? = null
        /**
         * Container for the cluster configuration of a domain.
         */
        public var clusterConfig: aws.sdk.kotlin.services.opensearch.model.ClusterConfig? = null
        /**
         * Key-value pairs to configure Amazon Cognito authentication. For more information, see [Configuring Amazon Cognito authentication for OpenSearch Dashboards](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html).
         */
        public var cognitoOptions: aws.sdk.kotlin.services.opensearch.model.CognitoOptions? = null
        /**
         * Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.
         */
        public var domainEndpointOptions: aws.sdk.kotlin.services.opensearch.model.DomainEndpointOptions? = null
        /**
         * Name of the OpenSearch Service domain to create. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.
         */
        public var domainName: kotlin.String? = null
        /**
         * Container for the parameters required to enable EBS-based storage for an OpenSearch Service domain.
         */
        public var ebsOptions: aws.sdk.kotlin.services.opensearch.model.EbsOptions? = null
        /**
         * Key-value pairs to enable encryption at rest.
         */
        public var encryptionAtRestOptions: aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions? = null
        /**
         * String of format Elasticsearch_X.Y or OpenSearch_X.Y to specify the engine version for the OpenSearch Service domain. For example, `OpenSearch_1.0` or `Elasticsearch_7.9`. For more information, see [Creating and managing Amazon OpenSearch Service domains](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains).
         */
        public var engineVersion: kotlin.String? = null
        /**
         * Specify either dual stack or IPv4 as your IP address type. Dual stack allows you to share domain resources across IPv4 and IPv6 address types, and is the recommended option. If you set your IP address type to dual stack, you can't change your address type later.
         */
        public var ipAddressType: aws.sdk.kotlin.services.opensearch.model.IpAddressType? = null
        /**
         * Key-value pairs to configure log publishing.
         */
        public var logPublishingOptions: Map? = null
        /**
         * Enables node-to-node encryption.
         */
        public var nodeToNodeEncryptionOptions: aws.sdk.kotlin.services.opensearch.model.NodeToNodeEncryptionOptions? = null
        /**
         * Specifies a daily 10-hour time block during which OpenSearch Service can perform configuration changes on the domain, including service software updates and Auto-Tune enhancements that require a blue/green deployment. If no options are specified, the default start time of 10:00 P.M. local time (for the Region that the domain is created in) is used.
         */
        public var offPeakWindowOptions: aws.sdk.kotlin.services.opensearch.model.OffPeakWindowOptions? = null
        /**
         * DEPRECATED. Container for the parameters required to configure automated snapshots of domain indexes.
         */
        public var snapshotOptions: aws.sdk.kotlin.services.opensearch.model.SnapshotOptions? = null
        /**
         * Software update options for the domain.
         */
        public var softwareUpdateOptions: aws.sdk.kotlin.services.opensearch.model.SoftwareUpdateOptions? = null
        /**
         * List of tags to add to the domain upon creation.
         */
        public var tagList: List? = null
        /**
         * Container for the values required to configure VPC access domains. If you don't specify these values, OpenSearch Service creates the domain with a public endpoint. For more information, see [Launching your Amazon OpenSearch Service domains using a VPC](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html).
         */
        public var vpcOptions: aws.sdk.kotlin.services.opensearch.model.VpcOptions? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.opensearch.model.CreateDomainRequest) : this() {
            this.accessPolicies = x.accessPolicies
            this.advancedOptions = x.advancedOptions
            this.advancedSecurityOptions = x.advancedSecurityOptions
            this.aimlOptions = x.aimlOptions
            this.autoTuneOptions = x.autoTuneOptions
            this.clusterConfig = x.clusterConfig
            this.cognitoOptions = x.cognitoOptions
            this.domainEndpointOptions = x.domainEndpointOptions
            this.domainName = x.domainName
            this.ebsOptions = x.ebsOptions
            this.encryptionAtRestOptions = x.encryptionAtRestOptions
            this.engineVersion = x.engineVersion
            this.ipAddressType = x.ipAddressType
            this.logPublishingOptions = x.logPublishingOptions
            this.nodeToNodeEncryptionOptions = x.nodeToNodeEncryptionOptions
            this.offPeakWindowOptions = x.offPeakWindowOptions
            this.snapshotOptions = x.snapshotOptions
            this.softwareUpdateOptions = x.softwareUpdateOptions
            this.tagList = x.tagList
            this.vpcOptions = x.vpcOptions
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.opensearch.model.CreateDomainRequest = CreateDomainRequest(this)

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.AdvancedSecurityOptionsInput] inside the given [block]
         */
        public fun advancedSecurityOptions(block: aws.sdk.kotlin.services.opensearch.model.AdvancedSecurityOptionsInput.Builder.() -> kotlin.Unit) {
            this.advancedSecurityOptions = aws.sdk.kotlin.services.opensearch.model.AdvancedSecurityOptionsInput.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.AimlOptionsInput] inside the given [block]
         */
        public fun aimlOptions(block: aws.sdk.kotlin.services.opensearch.model.AimlOptionsInput.Builder.() -> kotlin.Unit) {
            this.aimlOptions = aws.sdk.kotlin.services.opensearch.model.AimlOptionsInput.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.AutoTuneOptionsInput] inside the given [block]
         */
        public fun autoTuneOptions(block: aws.sdk.kotlin.services.opensearch.model.AutoTuneOptionsInput.Builder.() -> kotlin.Unit) {
            this.autoTuneOptions = aws.sdk.kotlin.services.opensearch.model.AutoTuneOptionsInput.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.ClusterConfig] inside the given [block]
         */
        public fun clusterConfig(block: aws.sdk.kotlin.services.opensearch.model.ClusterConfig.Builder.() -> kotlin.Unit) {
            this.clusterConfig = aws.sdk.kotlin.services.opensearch.model.ClusterConfig.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.CognitoOptions] inside the given [block]
         */
        public fun cognitoOptions(block: aws.sdk.kotlin.services.opensearch.model.CognitoOptions.Builder.() -> kotlin.Unit) {
            this.cognitoOptions = aws.sdk.kotlin.services.opensearch.model.CognitoOptions.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.DomainEndpointOptions] inside the given [block]
         */
        public fun domainEndpointOptions(block: aws.sdk.kotlin.services.opensearch.model.DomainEndpointOptions.Builder.() -> kotlin.Unit) {
            this.domainEndpointOptions = aws.sdk.kotlin.services.opensearch.model.DomainEndpointOptions.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.EbsOptions] inside the given [block]
         */
        public fun ebsOptions(block: aws.sdk.kotlin.services.opensearch.model.EbsOptions.Builder.() -> kotlin.Unit) {
            this.ebsOptions = aws.sdk.kotlin.services.opensearch.model.EbsOptions.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions] inside the given [block]
         */
        public fun encryptionAtRestOptions(block: aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions.Builder.() -> kotlin.Unit) {
            this.encryptionAtRestOptions = aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.NodeToNodeEncryptionOptions] inside the given [block]
         */
        public fun nodeToNodeEncryptionOptions(block: aws.sdk.kotlin.services.opensearch.model.NodeToNodeEncryptionOptions.Builder.() -> kotlin.Unit) {
            this.nodeToNodeEncryptionOptions = aws.sdk.kotlin.services.opensearch.model.NodeToNodeEncryptionOptions.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.OffPeakWindowOptions] inside the given [block]
         */
        public fun offPeakWindowOptions(block: aws.sdk.kotlin.services.opensearch.model.OffPeakWindowOptions.Builder.() -> kotlin.Unit) {
            this.offPeakWindowOptions = aws.sdk.kotlin.services.opensearch.model.OffPeakWindowOptions.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.SnapshotOptions] inside the given [block]
         */
        public fun snapshotOptions(block: aws.sdk.kotlin.services.opensearch.model.SnapshotOptions.Builder.() -> kotlin.Unit) {
            this.snapshotOptions = aws.sdk.kotlin.services.opensearch.model.SnapshotOptions.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.SoftwareUpdateOptions] inside the given [block]
         */
        public fun softwareUpdateOptions(block: aws.sdk.kotlin.services.opensearch.model.SoftwareUpdateOptions.Builder.() -> kotlin.Unit) {
            this.softwareUpdateOptions = aws.sdk.kotlin.services.opensearch.model.SoftwareUpdateOptions.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.VpcOptions] inside the given [block]
         */
        public fun vpcOptions(block: aws.sdk.kotlin.services.opensearch.model.VpcOptions.Builder.() -> kotlin.Unit) {
            this.vpcOptions = aws.sdk.kotlin.services.opensearch.model.VpcOptions.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy