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

com.pulumi.azurenative.documentdb.DatabaseAccountArgs Maven / Gradle / Ivy

There is a newer version: 2.72.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.documentdb;

import com.pulumi.azurenative.documentdb.enums.ConnectorOffer;
import com.pulumi.azurenative.documentdb.enums.CreateMode;
import com.pulumi.azurenative.documentdb.enums.DatabaseAccountKind;
import com.pulumi.azurenative.documentdb.enums.DatabaseAccountOfferType;
import com.pulumi.azurenative.documentdb.enums.MinimalTlsVersion;
import com.pulumi.azurenative.documentdb.enums.NetworkAclBypass;
import com.pulumi.azurenative.documentdb.enums.PublicNetworkAccess;
import com.pulumi.azurenative.documentdb.inputs.AnalyticalStorageConfigurationArgs;
import com.pulumi.azurenative.documentdb.inputs.ApiPropertiesArgs;
import com.pulumi.azurenative.documentdb.inputs.CapabilityArgs;
import com.pulumi.azurenative.documentdb.inputs.CapacityArgs;
import com.pulumi.azurenative.documentdb.inputs.ConsistencyPolicyArgs;
import com.pulumi.azurenative.documentdb.inputs.ContinuousModeBackupPolicyArgs;
import com.pulumi.azurenative.documentdb.inputs.CorsPolicyArgs;
import com.pulumi.azurenative.documentdb.inputs.IpAddressOrRangeArgs;
import com.pulumi.azurenative.documentdb.inputs.LocationArgs;
import com.pulumi.azurenative.documentdb.inputs.ManagedServiceIdentityArgs;
import com.pulumi.azurenative.documentdb.inputs.PeriodicModeBackupPolicyArgs;
import com.pulumi.azurenative.documentdb.inputs.RestoreParametersArgs;
import com.pulumi.azurenative.documentdb.inputs.VirtualNetworkRuleArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class DatabaseAccountArgs extends com.pulumi.resources.ResourceArgs {

    public static final DatabaseAccountArgs Empty = new DatabaseAccountArgs();

    /**
     * Cosmos DB database account name.
     * 
     */
    @Import(name="accountName")
    private @Nullable Output accountName;

    /**
     * @return Cosmos DB database account name.
     * 
     */
    public Optional> accountName() {
        return Optional.ofNullable(this.accountName);
    }

    /**
     * Analytical storage specific properties.
     * 
     */
    @Import(name="analyticalStorageConfiguration")
    private @Nullable Output analyticalStorageConfiguration;

    /**
     * @return Analytical storage specific properties.
     * 
     */
    public Optional> analyticalStorageConfiguration() {
        return Optional.ofNullable(this.analyticalStorageConfiguration);
    }

    /**
     * API specific properties. Currently, supported only for MongoDB API.
     * 
     */
    @Import(name="apiProperties")
    private @Nullable Output apiProperties;

    /**
     * @return API specific properties. Currently, supported only for MongoDB API.
     * 
     */
    public Optional> apiProperties() {
        return Optional.ofNullable(this.apiProperties);
    }

    /**
     * The object representing the policy for taking backups on an account.
     * 
     */
    @Import(name="backupPolicy")
    private @Nullable Output> backupPolicy;

    /**
     * @return The object representing the policy for taking backups on an account.
     * 
     */
    public Optional>> backupPolicy() {
        return Optional.ofNullable(this.backupPolicy);
    }

    /**
     * List of Cosmos DB capabilities for the account
     * 
     */
    @Import(name="capabilities")
    private @Nullable Output> capabilities;

    /**
     * @return List of Cosmos DB capabilities for the account
     * 
     */
    public Optional>> capabilities() {
        return Optional.ofNullable(this.capabilities);
    }

    /**
     * The object that represents all properties related to capacity enforcement on an account.
     * 
     */
    @Import(name="capacity")
    private @Nullable Output capacity;

    /**
     * @return The object that represents all properties related to capacity enforcement on an account.
     * 
     */
    public Optional> capacity() {
        return Optional.ofNullable(this.capacity);
    }

    /**
     * The cassandra connector offer type for the Cosmos DB database C* account.
     * 
     */
    @Import(name="connectorOffer")
    private @Nullable Output> connectorOffer;

    /**
     * @return The cassandra connector offer type for the Cosmos DB database C* account.
     * 
     */
    public Optional>> connectorOffer() {
        return Optional.ofNullable(this.connectorOffer);
    }

    /**
     * The consistency policy for the Cosmos DB account.
     * 
     */
    @Import(name="consistencyPolicy")
    private @Nullable Output consistencyPolicy;

    /**
     * @return The consistency policy for the Cosmos DB account.
     * 
     */
    public Optional> consistencyPolicy() {
        return Optional.ofNullable(this.consistencyPolicy);
    }

    /**
     * The CORS policy for the Cosmos DB database account.
     * 
     */
    @Import(name="cors")
    private @Nullable Output> cors;

    /**
     * @return The CORS policy for the Cosmos DB database account.
     * 
     */
    public Optional>> cors() {
        return Optional.ofNullable(this.cors);
    }

    /**
     * Enum to indicate the mode of account creation.
     * 
     */
    @Import(name="createMode")
    private @Nullable Output> createMode;

    /**
     * @return Enum to indicate the mode of account creation.
     * 
     */
    public Optional>> createMode() {
        return Optional.ofNullable(this.createMode);
    }

    /**
     * The offer type for the database
     * 
     */
    @Import(name="databaseAccountOfferType", required=true)
    private Output databaseAccountOfferType;

    /**
     * @return The offer type for the database
     * 
     */
    public Output databaseAccountOfferType() {
        return this.databaseAccountOfferType;
    }

    /**
     * The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
     * 
     */
    @Import(name="defaultIdentity")
    private @Nullable Output defaultIdentity;

    /**
     * @return The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
     * 
     */
    public Optional> defaultIdentity() {
        return Optional.ofNullable(this.defaultIdentity);
    }

    /**
     * Disable write operations on metadata resources (databases, containers, throughput) via account keys
     * 
     */
    @Import(name="disableKeyBasedMetadataWriteAccess")
    private @Nullable Output disableKeyBasedMetadataWriteAccess;

    /**
     * @return Disable write operations on metadata resources (databases, containers, throughput) via account keys
     * 
     */
    public Optional> disableKeyBasedMetadataWriteAccess() {
        return Optional.ofNullable(this.disableKeyBasedMetadataWriteAccess);
    }

    /**
     * Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
     * 
     */
    @Import(name="disableLocalAuth")
    private @Nullable Output disableLocalAuth;

    /**
     * @return Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
     * 
     */
    public Optional> disableLocalAuth() {
        return Optional.ofNullable(this.disableLocalAuth);
    }

    /**
     * Flag to indicate whether to enable storage analytics.
     * 
     */
    @Import(name="enableAnalyticalStorage")
    private @Nullable Output enableAnalyticalStorage;

    /**
     * @return Flag to indicate whether to enable storage analytics.
     * 
     */
    public Optional> enableAnalyticalStorage() {
        return Optional.ofNullable(this.enableAnalyticalStorage);
    }

    /**
     * Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
     * 
     */
    @Import(name="enableAutomaticFailover")
    private @Nullable Output enableAutomaticFailover;

    /**
     * @return Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
     * 
     */
    public Optional> enableAutomaticFailover() {
        return Optional.ofNullable(this.enableAutomaticFailover);
    }

    /**
     * Enables the cassandra connector on the Cosmos DB C* account
     * 
     */
    @Import(name="enableCassandraConnector")
    private @Nullable Output enableCassandraConnector;

    /**
     * @return Enables the cassandra connector on the Cosmos DB C* account
     * 
     */
    public Optional> enableCassandraConnector() {
        return Optional.ofNullable(this.enableCassandraConnector);
    }

    /**
     * Flag to indicate whether Free Tier is enabled.
     * 
     */
    @Import(name="enableFreeTier")
    private @Nullable Output enableFreeTier;

    /**
     * @return Flag to indicate whether Free Tier is enabled.
     * 
     */
    public Optional> enableFreeTier() {
        return Optional.ofNullable(this.enableFreeTier);
    }

    /**
     * Enables the account to write in multiple locations
     * 
     */
    @Import(name="enableMultipleWriteLocations")
    private @Nullable Output enableMultipleWriteLocations;

    /**
     * @return Enables the account to write in multiple locations
     * 
     */
    public Optional> enableMultipleWriteLocations() {
        return Optional.ofNullable(this.enableMultipleWriteLocations);
    }

    /**
     * Flag to indicate enabling/disabling of Partition Merge feature on the account
     * 
     */
    @Import(name="enablePartitionMerge")
    private @Nullable Output enablePartitionMerge;

    /**
     * @return Flag to indicate enabling/disabling of Partition Merge feature on the account
     * 
     */
    public Optional> enablePartitionMerge() {
        return Optional.ofNullable(this.enablePartitionMerge);
    }

    /**
     * Identity for the resource.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return Identity for the resource.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * List of IpRules.
     * 
     */
    @Import(name="ipRules")
    private @Nullable Output> ipRules;

    /**
     * @return List of IpRules.
     * 
     */
    public Optional>> ipRules() {
        return Optional.ofNullable(this.ipRules);
    }

    /**
     * Flag to indicate whether to enable/disable Virtual Network ACL rules.
     * 
     */
    @Import(name="isVirtualNetworkFilterEnabled")
    private @Nullable Output isVirtualNetworkFilterEnabled;

    /**
     * @return Flag to indicate whether to enable/disable Virtual Network ACL rules.
     * 
     */
    public Optional> isVirtualNetworkFilterEnabled() {
        return Optional.ofNullable(this.isVirtualNetworkFilterEnabled);
    }

    /**
     * The URI of the key vault
     * 
     */
    @Import(name="keyVaultKeyUri")
    private @Nullable Output keyVaultKeyUri;

    /**
     * @return The URI of the key vault
     * 
     */
    public Optional> keyVaultKeyUri() {
        return Optional.ofNullable(this.keyVaultKeyUri);
    }

    /**
     * Indicates the type of database account. This can only be set at database account creation.
     * 
     */
    @Import(name="kind")
    private @Nullable Output> kind;

    /**
     * @return Indicates the type of database account. This can only be set at database account creation.
     * 
     */
    public Optional>> kind() {
        return Optional.ofNullable(this.kind);
    }

    /**
     * The location of the resource group to which the resource belongs.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The location of the resource group to which the resource belongs.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * An array that contains the georeplication locations enabled for the Cosmos DB account.
     * 
     */
    @Import(name="locations", required=true)
    private Output> locations;

    /**
     * @return An array that contains the georeplication locations enabled for the Cosmos DB account.
     * 
     */
    public Output> locations() {
        return this.locations;
    }

    /**
     * Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.
     * 
     */
    @Import(name="minimalTlsVersion")
    private @Nullable Output> minimalTlsVersion;

    /**
     * @return Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.
     * 
     */
    public Optional>> minimalTlsVersion() {
        return Optional.ofNullable(this.minimalTlsVersion);
    }

    /**
     * Indicates what services are allowed to bypass firewall checks.
     * 
     */
    @Import(name="networkAclBypass")
    private @Nullable Output networkAclBypass;

    /**
     * @return Indicates what services are allowed to bypass firewall checks.
     * 
     */
    public Optional> networkAclBypass() {
        return Optional.ofNullable(this.networkAclBypass);
    }

    /**
     * An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
     * 
     */
    @Import(name="networkAclBypassResourceIds")
    private @Nullable Output> networkAclBypassResourceIds;

    /**
     * @return An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
     * 
     */
    public Optional>> networkAclBypassResourceIds() {
        return Optional.ofNullable(this.networkAclBypassResourceIds);
    }

    /**
     * Whether requests from Public Network are allowed
     * 
     */
    @Import(name="publicNetworkAccess")
    private @Nullable Output> publicNetworkAccess;

    /**
     * @return Whether requests from Public Network are allowed
     * 
     */
    public Optional>> publicNetworkAccess() {
        return Optional.ofNullable(this.publicNetworkAccess);
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Parameters to indicate the information about the restore.
     * 
     */
    @Import(name="restoreParameters")
    private @Nullable Output restoreParameters;

    /**
     * @return Parameters to indicate the information about the restore.
     * 
     */
    public Optional> restoreParameters() {
        return Optional.ofNullable(this.restoreParameters);
    }

    /**
     * Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * List of Virtual Network ACL rules configured for the Cosmos DB account.
     * 
     */
    @Import(name="virtualNetworkRules")
    private @Nullable Output> virtualNetworkRules;

    /**
     * @return List of Virtual Network ACL rules configured for the Cosmos DB account.
     * 
     */
    public Optional>> virtualNetworkRules() {
        return Optional.ofNullable(this.virtualNetworkRules);
    }

    private DatabaseAccountArgs() {}

    private DatabaseAccountArgs(DatabaseAccountArgs $) {
        this.accountName = $.accountName;
        this.analyticalStorageConfiguration = $.analyticalStorageConfiguration;
        this.apiProperties = $.apiProperties;
        this.backupPolicy = $.backupPolicy;
        this.capabilities = $.capabilities;
        this.capacity = $.capacity;
        this.connectorOffer = $.connectorOffer;
        this.consistencyPolicy = $.consistencyPolicy;
        this.cors = $.cors;
        this.createMode = $.createMode;
        this.databaseAccountOfferType = $.databaseAccountOfferType;
        this.defaultIdentity = $.defaultIdentity;
        this.disableKeyBasedMetadataWriteAccess = $.disableKeyBasedMetadataWriteAccess;
        this.disableLocalAuth = $.disableLocalAuth;
        this.enableAnalyticalStorage = $.enableAnalyticalStorage;
        this.enableAutomaticFailover = $.enableAutomaticFailover;
        this.enableCassandraConnector = $.enableCassandraConnector;
        this.enableFreeTier = $.enableFreeTier;
        this.enableMultipleWriteLocations = $.enableMultipleWriteLocations;
        this.enablePartitionMerge = $.enablePartitionMerge;
        this.identity = $.identity;
        this.ipRules = $.ipRules;
        this.isVirtualNetworkFilterEnabled = $.isVirtualNetworkFilterEnabled;
        this.keyVaultKeyUri = $.keyVaultKeyUri;
        this.kind = $.kind;
        this.location = $.location;
        this.locations = $.locations;
        this.minimalTlsVersion = $.minimalTlsVersion;
        this.networkAclBypass = $.networkAclBypass;
        this.networkAclBypassResourceIds = $.networkAclBypassResourceIds;
        this.publicNetworkAccess = $.publicNetworkAccess;
        this.resourceGroupName = $.resourceGroupName;
        this.restoreParameters = $.restoreParameters;
        this.tags = $.tags;
        this.virtualNetworkRules = $.virtualNetworkRules;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(DatabaseAccountArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private DatabaseAccountArgs $;

        public Builder() {
            $ = new DatabaseAccountArgs();
        }

        public Builder(DatabaseAccountArgs defaults) {
            $ = new DatabaseAccountArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param accountName Cosmos DB database account name.
         * 
         * @return builder
         * 
         */
        public Builder accountName(@Nullable Output accountName) {
            $.accountName = accountName;
            return this;
        }

        /**
         * @param accountName Cosmos DB database account name.
         * 
         * @return builder
         * 
         */
        public Builder accountName(String accountName) {
            return accountName(Output.of(accountName));
        }

        /**
         * @param analyticalStorageConfiguration Analytical storage specific properties.
         * 
         * @return builder
         * 
         */
        public Builder analyticalStorageConfiguration(@Nullable Output analyticalStorageConfiguration) {
            $.analyticalStorageConfiguration = analyticalStorageConfiguration;
            return this;
        }

        /**
         * @param analyticalStorageConfiguration Analytical storage specific properties.
         * 
         * @return builder
         * 
         */
        public Builder analyticalStorageConfiguration(AnalyticalStorageConfigurationArgs analyticalStorageConfiguration) {
            return analyticalStorageConfiguration(Output.of(analyticalStorageConfiguration));
        }

        /**
         * @param apiProperties API specific properties. Currently, supported only for MongoDB API.
         * 
         * @return builder
         * 
         */
        public Builder apiProperties(@Nullable Output apiProperties) {
            $.apiProperties = apiProperties;
            return this;
        }

        /**
         * @param apiProperties API specific properties. Currently, supported only for MongoDB API.
         * 
         * @return builder
         * 
         */
        public Builder apiProperties(ApiPropertiesArgs apiProperties) {
            return apiProperties(Output.of(apiProperties));
        }

        /**
         * @param backupPolicy The object representing the policy for taking backups on an account.
         * 
         * @return builder
         * 
         */
        public Builder backupPolicy(@Nullable Output> backupPolicy) {
            $.backupPolicy = backupPolicy;
            return this;
        }

        /**
         * @param backupPolicy The object representing the policy for taking backups on an account.
         * 
         * @return builder
         * 
         */
        public Builder backupPolicy(Either backupPolicy) {
            return backupPolicy(Output.of(backupPolicy));
        }

        /**
         * @param backupPolicy The object representing the policy for taking backups on an account.
         * 
         * @return builder
         * 
         */
        public Builder backupPolicy(ContinuousModeBackupPolicyArgs backupPolicy) {
            return backupPolicy(Either.ofLeft(backupPolicy));
        }

        /**
         * @param backupPolicy The object representing the policy for taking backups on an account.
         * 
         * @return builder
         * 
         */
        public Builder backupPolicy(PeriodicModeBackupPolicyArgs backupPolicy) {
            return backupPolicy(Either.ofRight(backupPolicy));
        }

        /**
         * @param capabilities List of Cosmos DB capabilities for the account
         * 
         * @return builder
         * 
         */
        public Builder capabilities(@Nullable Output> capabilities) {
            $.capabilities = capabilities;
            return this;
        }

        /**
         * @param capabilities List of Cosmos DB capabilities for the account
         * 
         * @return builder
         * 
         */
        public Builder capabilities(List capabilities) {
            return capabilities(Output.of(capabilities));
        }

        /**
         * @param capabilities List of Cosmos DB capabilities for the account
         * 
         * @return builder
         * 
         */
        public Builder capabilities(CapabilityArgs... capabilities) {
            return capabilities(List.of(capabilities));
        }

        /**
         * @param capacity The object that represents all properties related to capacity enforcement on an account.
         * 
         * @return builder
         * 
         */
        public Builder capacity(@Nullable Output capacity) {
            $.capacity = capacity;
            return this;
        }

        /**
         * @param capacity The object that represents all properties related to capacity enforcement on an account.
         * 
         * @return builder
         * 
         */
        public Builder capacity(CapacityArgs capacity) {
            return capacity(Output.of(capacity));
        }

        /**
         * @param connectorOffer The cassandra connector offer type for the Cosmos DB database C* account.
         * 
         * @return builder
         * 
         */
        public Builder connectorOffer(@Nullable Output> connectorOffer) {
            $.connectorOffer = connectorOffer;
            return this;
        }

        /**
         * @param connectorOffer The cassandra connector offer type for the Cosmos DB database C* account.
         * 
         * @return builder
         * 
         */
        public Builder connectorOffer(Either connectorOffer) {
            return connectorOffer(Output.of(connectorOffer));
        }

        /**
         * @param connectorOffer The cassandra connector offer type for the Cosmos DB database C* account.
         * 
         * @return builder
         * 
         */
        public Builder connectorOffer(String connectorOffer) {
            return connectorOffer(Either.ofLeft(connectorOffer));
        }

        /**
         * @param connectorOffer The cassandra connector offer type for the Cosmos DB database C* account.
         * 
         * @return builder
         * 
         */
        public Builder connectorOffer(ConnectorOffer connectorOffer) {
            return connectorOffer(Either.ofRight(connectorOffer));
        }

        /**
         * @param consistencyPolicy The consistency policy for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder consistencyPolicy(@Nullable Output consistencyPolicy) {
            $.consistencyPolicy = consistencyPolicy;
            return this;
        }

        /**
         * @param consistencyPolicy The consistency policy for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder consistencyPolicy(ConsistencyPolicyArgs consistencyPolicy) {
            return consistencyPolicy(Output.of(consistencyPolicy));
        }

        /**
         * @param cors The CORS policy for the Cosmos DB database account.
         * 
         * @return builder
         * 
         */
        public Builder cors(@Nullable Output> cors) {
            $.cors = cors;
            return this;
        }

        /**
         * @param cors The CORS policy for the Cosmos DB database account.
         * 
         * @return builder
         * 
         */
        public Builder cors(List cors) {
            return cors(Output.of(cors));
        }

        /**
         * @param cors The CORS policy for the Cosmos DB database account.
         * 
         * @return builder
         * 
         */
        public Builder cors(CorsPolicyArgs... cors) {
            return cors(List.of(cors));
        }

        /**
         * @param createMode Enum to indicate the mode of account creation.
         * 
         * @return builder
         * 
         */
        public Builder createMode(@Nullable Output> createMode) {
            $.createMode = createMode;
            return this;
        }

        /**
         * @param createMode Enum to indicate the mode of account creation.
         * 
         * @return builder
         * 
         */
        public Builder createMode(Either createMode) {
            return createMode(Output.of(createMode));
        }

        /**
         * @param createMode Enum to indicate the mode of account creation.
         * 
         * @return builder
         * 
         */
        public Builder createMode(String createMode) {
            return createMode(Either.ofLeft(createMode));
        }

        /**
         * @param createMode Enum to indicate the mode of account creation.
         * 
         * @return builder
         * 
         */
        public Builder createMode(CreateMode createMode) {
            return createMode(Either.ofRight(createMode));
        }

        /**
         * @param databaseAccountOfferType The offer type for the database
         * 
         * @return builder
         * 
         */
        public Builder databaseAccountOfferType(Output databaseAccountOfferType) {
            $.databaseAccountOfferType = databaseAccountOfferType;
            return this;
        }

        /**
         * @param databaseAccountOfferType The offer type for the database
         * 
         * @return builder
         * 
         */
        public Builder databaseAccountOfferType(DatabaseAccountOfferType databaseAccountOfferType) {
            return databaseAccountOfferType(Output.of(databaseAccountOfferType));
        }

        /**
         * @param defaultIdentity The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
         * 
         * @return builder
         * 
         */
        public Builder defaultIdentity(@Nullable Output defaultIdentity) {
            $.defaultIdentity = defaultIdentity;
            return this;
        }

        /**
         * @param defaultIdentity The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
         * 
         * @return builder
         * 
         */
        public Builder defaultIdentity(String defaultIdentity) {
            return defaultIdentity(Output.of(defaultIdentity));
        }

        /**
         * @param disableKeyBasedMetadataWriteAccess Disable write operations on metadata resources (databases, containers, throughput) via account keys
         * 
         * @return builder
         * 
         */
        public Builder disableKeyBasedMetadataWriteAccess(@Nullable Output disableKeyBasedMetadataWriteAccess) {
            $.disableKeyBasedMetadataWriteAccess = disableKeyBasedMetadataWriteAccess;
            return this;
        }

        /**
         * @param disableKeyBasedMetadataWriteAccess Disable write operations on metadata resources (databases, containers, throughput) via account keys
         * 
         * @return builder
         * 
         */
        public Builder disableKeyBasedMetadataWriteAccess(Boolean disableKeyBasedMetadataWriteAccess) {
            return disableKeyBasedMetadataWriteAccess(Output.of(disableKeyBasedMetadataWriteAccess));
        }

        /**
         * @param disableLocalAuth Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
         * 
         * @return builder
         * 
         */
        public Builder disableLocalAuth(@Nullable Output disableLocalAuth) {
            $.disableLocalAuth = disableLocalAuth;
            return this;
        }

        /**
         * @param disableLocalAuth Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
         * 
         * @return builder
         * 
         */
        public Builder disableLocalAuth(Boolean disableLocalAuth) {
            return disableLocalAuth(Output.of(disableLocalAuth));
        }

        /**
         * @param enableAnalyticalStorage Flag to indicate whether to enable storage analytics.
         * 
         * @return builder
         * 
         */
        public Builder enableAnalyticalStorage(@Nullable Output enableAnalyticalStorage) {
            $.enableAnalyticalStorage = enableAnalyticalStorage;
            return this;
        }

        /**
         * @param enableAnalyticalStorage Flag to indicate whether to enable storage analytics.
         * 
         * @return builder
         * 
         */
        public Builder enableAnalyticalStorage(Boolean enableAnalyticalStorage) {
            return enableAnalyticalStorage(Output.of(enableAnalyticalStorage));
        }

        /**
         * @param enableAutomaticFailover Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
         * 
         * @return builder
         * 
         */
        public Builder enableAutomaticFailover(@Nullable Output enableAutomaticFailover) {
            $.enableAutomaticFailover = enableAutomaticFailover;
            return this;
        }

        /**
         * @param enableAutomaticFailover Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
         * 
         * @return builder
         * 
         */
        public Builder enableAutomaticFailover(Boolean enableAutomaticFailover) {
            return enableAutomaticFailover(Output.of(enableAutomaticFailover));
        }

        /**
         * @param enableCassandraConnector Enables the cassandra connector on the Cosmos DB C* account
         * 
         * @return builder
         * 
         */
        public Builder enableCassandraConnector(@Nullable Output enableCassandraConnector) {
            $.enableCassandraConnector = enableCassandraConnector;
            return this;
        }

        /**
         * @param enableCassandraConnector Enables the cassandra connector on the Cosmos DB C* account
         * 
         * @return builder
         * 
         */
        public Builder enableCassandraConnector(Boolean enableCassandraConnector) {
            return enableCassandraConnector(Output.of(enableCassandraConnector));
        }

        /**
         * @param enableFreeTier Flag to indicate whether Free Tier is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enableFreeTier(@Nullable Output enableFreeTier) {
            $.enableFreeTier = enableFreeTier;
            return this;
        }

        /**
         * @param enableFreeTier Flag to indicate whether Free Tier is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enableFreeTier(Boolean enableFreeTier) {
            return enableFreeTier(Output.of(enableFreeTier));
        }

        /**
         * @param enableMultipleWriteLocations Enables the account to write in multiple locations
         * 
         * @return builder
         * 
         */
        public Builder enableMultipleWriteLocations(@Nullable Output enableMultipleWriteLocations) {
            $.enableMultipleWriteLocations = enableMultipleWriteLocations;
            return this;
        }

        /**
         * @param enableMultipleWriteLocations Enables the account to write in multiple locations
         * 
         * @return builder
         * 
         */
        public Builder enableMultipleWriteLocations(Boolean enableMultipleWriteLocations) {
            return enableMultipleWriteLocations(Output.of(enableMultipleWriteLocations));
        }

        /**
         * @param enablePartitionMerge Flag to indicate enabling/disabling of Partition Merge feature on the account
         * 
         * @return builder
         * 
         */
        public Builder enablePartitionMerge(@Nullable Output enablePartitionMerge) {
            $.enablePartitionMerge = enablePartitionMerge;
            return this;
        }

        /**
         * @param enablePartitionMerge Flag to indicate enabling/disabling of Partition Merge feature on the account
         * 
         * @return builder
         * 
         */
        public Builder enablePartitionMerge(Boolean enablePartitionMerge) {
            return enablePartitionMerge(Output.of(enablePartitionMerge));
        }

        /**
         * @param identity Identity for the resource.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity Identity for the resource.
         * 
         * @return builder
         * 
         */
        public Builder identity(ManagedServiceIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param ipRules List of IpRules.
         * 
         * @return builder
         * 
         */
        public Builder ipRules(@Nullable Output> ipRules) {
            $.ipRules = ipRules;
            return this;
        }

        /**
         * @param ipRules List of IpRules.
         * 
         * @return builder
         * 
         */
        public Builder ipRules(List ipRules) {
            return ipRules(Output.of(ipRules));
        }

        /**
         * @param ipRules List of IpRules.
         * 
         * @return builder
         * 
         */
        public Builder ipRules(IpAddressOrRangeArgs... ipRules) {
            return ipRules(List.of(ipRules));
        }

        /**
         * @param isVirtualNetworkFilterEnabled Flag to indicate whether to enable/disable Virtual Network ACL rules.
         * 
         * @return builder
         * 
         */
        public Builder isVirtualNetworkFilterEnabled(@Nullable Output isVirtualNetworkFilterEnabled) {
            $.isVirtualNetworkFilterEnabled = isVirtualNetworkFilterEnabled;
            return this;
        }

        /**
         * @param isVirtualNetworkFilterEnabled Flag to indicate whether to enable/disable Virtual Network ACL rules.
         * 
         * @return builder
         * 
         */
        public Builder isVirtualNetworkFilterEnabled(Boolean isVirtualNetworkFilterEnabled) {
            return isVirtualNetworkFilterEnabled(Output.of(isVirtualNetworkFilterEnabled));
        }

        /**
         * @param keyVaultKeyUri The URI of the key vault
         * 
         * @return builder
         * 
         */
        public Builder keyVaultKeyUri(@Nullable Output keyVaultKeyUri) {
            $.keyVaultKeyUri = keyVaultKeyUri;
            return this;
        }

        /**
         * @param keyVaultKeyUri The URI of the key vault
         * 
         * @return builder
         * 
         */
        public Builder keyVaultKeyUri(String keyVaultKeyUri) {
            return keyVaultKeyUri(Output.of(keyVaultKeyUri));
        }

        /**
         * @param kind Indicates the type of database account. This can only be set at database account creation.
         * 
         * @return builder
         * 
         */
        public Builder kind(@Nullable Output> kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind Indicates the type of database account. This can only be set at database account creation.
         * 
         * @return builder
         * 
         */
        public Builder kind(Either kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param kind Indicates the type of database account. This can only be set at database account creation.
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Either.ofLeft(kind));
        }

        /**
         * @param kind Indicates the type of database account. This can only be set at database account creation.
         * 
         * @return builder
         * 
         */
        public Builder kind(DatabaseAccountKind kind) {
            return kind(Either.ofRight(kind));
        }

        /**
         * @param location The location of the resource group to which the resource belongs.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The location of the resource group to which the resource belongs.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param locations An array that contains the georeplication locations enabled for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder locations(Output> locations) {
            $.locations = locations;
            return this;
        }

        /**
         * @param locations An array that contains the georeplication locations enabled for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder locations(List locations) {
            return locations(Output.of(locations));
        }

        /**
         * @param locations An array that contains the georeplication locations enabled for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder locations(LocationArgs... locations) {
            return locations(List.of(locations));
        }

        /**
         * @param minimalTlsVersion Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.
         * 
         * @return builder
         * 
         */
        public Builder minimalTlsVersion(@Nullable Output> minimalTlsVersion) {
            $.minimalTlsVersion = minimalTlsVersion;
            return this;
        }

        /**
         * @param minimalTlsVersion Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.
         * 
         * @return builder
         * 
         */
        public Builder minimalTlsVersion(Either minimalTlsVersion) {
            return minimalTlsVersion(Output.of(minimalTlsVersion));
        }

        /**
         * @param minimalTlsVersion Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.
         * 
         * @return builder
         * 
         */
        public Builder minimalTlsVersion(String minimalTlsVersion) {
            return minimalTlsVersion(Either.ofLeft(minimalTlsVersion));
        }

        /**
         * @param minimalTlsVersion Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.
         * 
         * @return builder
         * 
         */
        public Builder minimalTlsVersion(MinimalTlsVersion minimalTlsVersion) {
            return minimalTlsVersion(Either.ofRight(minimalTlsVersion));
        }

        /**
         * @param networkAclBypass Indicates what services are allowed to bypass firewall checks.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypass(@Nullable Output networkAclBypass) {
            $.networkAclBypass = networkAclBypass;
            return this;
        }

        /**
         * @param networkAclBypass Indicates what services are allowed to bypass firewall checks.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypass(NetworkAclBypass networkAclBypass) {
            return networkAclBypass(Output.of(networkAclBypass));
        }

        /**
         * @param networkAclBypassResourceIds An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypassResourceIds(@Nullable Output> networkAclBypassResourceIds) {
            $.networkAclBypassResourceIds = networkAclBypassResourceIds;
            return this;
        }

        /**
         * @param networkAclBypassResourceIds An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypassResourceIds(List networkAclBypassResourceIds) {
            return networkAclBypassResourceIds(Output.of(networkAclBypassResourceIds));
        }

        /**
         * @param networkAclBypassResourceIds An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder networkAclBypassResourceIds(String... networkAclBypassResourceIds) {
            return networkAclBypassResourceIds(List.of(networkAclBypassResourceIds));
        }

        /**
         * @param publicNetworkAccess Whether requests from Public Network are allowed
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(@Nullable Output> publicNetworkAccess) {
            $.publicNetworkAccess = publicNetworkAccess;
            return this;
        }

        /**
         * @param publicNetworkAccess Whether requests from Public Network are allowed
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(Either publicNetworkAccess) {
            return publicNetworkAccess(Output.of(publicNetworkAccess));
        }

        /**
         * @param publicNetworkAccess Whether requests from Public Network are allowed
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(String publicNetworkAccess) {
            return publicNetworkAccess(Either.ofLeft(publicNetworkAccess));
        }

        /**
         * @param publicNetworkAccess Whether requests from Public Network are allowed
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
            return publicNetworkAccess(Either.ofRight(publicNetworkAccess));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param restoreParameters Parameters to indicate the information about the restore.
         * 
         * @return builder
         * 
         */
        public Builder restoreParameters(@Nullable Output restoreParameters) {
            $.restoreParameters = restoreParameters;
            return this;
        }

        /**
         * @param restoreParameters Parameters to indicate the information about the restore.
         * 
         * @return builder
         * 
         */
        public Builder restoreParameters(RestoreParametersArgs restoreParameters) {
            return restoreParameters(Output.of(restoreParameters));
        }

        /**
         * @param tags Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param virtualNetworkRules List of Virtual Network ACL rules configured for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkRules(@Nullable Output> virtualNetworkRules) {
            $.virtualNetworkRules = virtualNetworkRules;
            return this;
        }

        /**
         * @param virtualNetworkRules List of Virtual Network ACL rules configured for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkRules(List virtualNetworkRules) {
            return virtualNetworkRules(Output.of(virtualNetworkRules));
        }

        /**
         * @param virtualNetworkRules List of Virtual Network ACL rules configured for the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkRules(VirtualNetworkRuleArgs... virtualNetworkRules) {
            return virtualNetworkRules(List.of(virtualNetworkRules));
        }

        public DatabaseAccountArgs build() {
            $.createMode = Codegen.stringProp("createMode").left(CreateMode.class).output().arg($.createMode).def("Default").getNullable();
            if ($.databaseAccountOfferType == null) {
                throw new MissingRequiredPropertyException("DatabaseAccountArgs", "databaseAccountOfferType");
            }
            $.kind = Codegen.stringProp("kind").left(DatabaseAccountKind.class).output().arg($.kind).def("GlobalDocumentDB").getNullable();
            if ($.locations == null) {
                throw new MissingRequiredPropertyException("DatabaseAccountArgs", "locations");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("DatabaseAccountArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy