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

com.pulumi.azure.cosmosdb.MongoCollectionArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.cosmosdb;

import com.pulumi.azure.cosmosdb.inputs.MongoCollectionAutoscaleSettingsArgs;
import com.pulumi.azure.cosmosdb.inputs.MongoCollectionIndexArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final MongoCollectionArgs Empty = new MongoCollectionArgs();

    /**
     * The name of the Cosmos DB Account in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="accountName", required=true)
    private Output accountName;

    /**
     * @return The name of the Cosmos DB Account in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
     * 
     */
    public Output accountName() {
        return this.accountName;
    }

    /**
     * The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to `-1`, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number `n` – items will expire `n` seconds after their last modified time.
     * 
     */
    @Import(name="analyticalStorageTtl")
    private @Nullable Output analyticalStorageTtl;

    /**
     * @return The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to `-1`, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number `n` – items will expire `n` seconds after their last modified time.
     * 
     */
    public Optional> analyticalStorageTtl() {
        return Optional.ofNullable(this.analyticalStorageTtl);
    }

    @Import(name="autoscaleSettings")
    private @Nullable Output autoscaleSettings;

    public Optional> autoscaleSettings() {
        return Optional.ofNullable(this.autoscaleSettings);
    }

    /**
     * The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="databaseName", required=true)
    private Output databaseName;

    /**
     * @return The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
     * 
     */
    public Output databaseName() {
        return this.databaseName;
    }

    /**
     * The default Time To Live in seconds. If the value is `-1`, items are not automatically expired.
     * 
     */
    @Import(name="defaultTtlSeconds")
    private @Nullable Output defaultTtlSeconds;

    /**
     * @return The default Time To Live in seconds. If the value is `-1`, items are not automatically expired.
     * 
     */
    public Optional> defaultTtlSeconds() {
        return Optional.ofNullable(this.defaultTtlSeconds);
    }

    /**
     * One or more `index` blocks as defined below.
     * 
     */
    @Import(name="indices")
    private @Nullable Output> indices;

    /**
     * @return One or more `index` blocks as defined below.
     * 
     */
    public Optional>> indices() {
        return Optional.ofNullable(this.indices);
    }

    /**
     * Specifies the name of the Cosmos DB Mongo Collection. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Specifies the name of the Cosmos DB Mongo Collection. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="shardKey")
    private @Nullable Output shardKey;

    /**
     * @return The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created.
     * 
     */
    public Optional> shardKey() {
        return Optional.ofNullable(this.shardKey);
    }

    @Import(name="throughput")
    private @Nullable Output throughput;

    public Optional> throughput() {
        return Optional.ofNullable(this.throughput);
    }

    private MongoCollectionArgs() {}

    private MongoCollectionArgs(MongoCollectionArgs $) {
        this.accountName = $.accountName;
        this.analyticalStorageTtl = $.analyticalStorageTtl;
        this.autoscaleSettings = $.autoscaleSettings;
        this.databaseName = $.databaseName;
        this.defaultTtlSeconds = $.defaultTtlSeconds;
        this.indices = $.indices;
        this.name = $.name;
        this.resourceGroupName = $.resourceGroupName;
        this.shardKey = $.shardKey;
        this.throughput = $.throughput;
    }

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

    public static final class Builder {
        private MongoCollectionArgs $;

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

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

        /**
         * @param accountName The name of the Cosmos DB Account in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder accountName(Output accountName) {
            $.accountName = accountName;
            return this;
        }

        /**
         * @param accountName The name of the Cosmos DB Account in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder accountName(String accountName) {
            return accountName(Output.of(accountName));
        }

        /**
         * @param analyticalStorageTtl The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to `-1`, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number `n` – items will expire `n` seconds after their last modified time.
         * 
         * @return builder
         * 
         */
        public Builder analyticalStorageTtl(@Nullable Output analyticalStorageTtl) {
            $.analyticalStorageTtl = analyticalStorageTtl;
            return this;
        }

        /**
         * @param analyticalStorageTtl The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to `-1`, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number `n` – items will expire `n` seconds after their last modified time.
         * 
         * @return builder
         * 
         */
        public Builder analyticalStorageTtl(Integer analyticalStorageTtl) {
            return analyticalStorageTtl(Output.of(analyticalStorageTtl));
        }

        public Builder autoscaleSettings(@Nullable Output autoscaleSettings) {
            $.autoscaleSettings = autoscaleSettings;
            return this;
        }

        public Builder autoscaleSettings(MongoCollectionAutoscaleSettingsArgs autoscaleSettings) {
            return autoscaleSettings(Output.of(autoscaleSettings));
        }

        /**
         * @param databaseName The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(Output databaseName) {
            $.databaseName = databaseName;
            return this;
        }

        /**
         * @param databaseName The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(String databaseName) {
            return databaseName(Output.of(databaseName));
        }

        /**
         * @param defaultTtlSeconds The default Time To Live in seconds. If the value is `-1`, items are not automatically expired.
         * 
         * @return builder
         * 
         */
        public Builder defaultTtlSeconds(@Nullable Output defaultTtlSeconds) {
            $.defaultTtlSeconds = defaultTtlSeconds;
            return this;
        }

        /**
         * @param defaultTtlSeconds The default Time To Live in seconds. If the value is `-1`, items are not automatically expired.
         * 
         * @return builder
         * 
         */
        public Builder defaultTtlSeconds(Integer defaultTtlSeconds) {
            return defaultTtlSeconds(Output.of(defaultTtlSeconds));
        }

        /**
         * @param indices One or more `index` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder indices(@Nullable Output> indices) {
            $.indices = indices;
            return this;
        }

        /**
         * @param indices One or more `index` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder indices(List indices) {
            return indices(Output.of(indices));
        }

        /**
         * @param indices One or more `index` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder indices(MongoCollectionIndexArgs... indices) {
            return indices(List.of(indices));
        }

        /**
         * @param name Specifies the name of the Cosmos DB Mongo Collection. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the Cosmos DB Mongo Collection. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param resourceGroupName The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param shardKey The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder shardKey(@Nullable Output shardKey) {
            $.shardKey = shardKey;
            return this;
        }

        /**
         * @param shardKey The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder shardKey(String shardKey) {
            return shardKey(Output.of(shardKey));
        }

        public Builder throughput(@Nullable Output throughput) {
            $.throughput = throughput;
            return this;
        }

        public Builder throughput(Integer throughput) {
            return throughput(Output.of(throughput));
        }

        public MongoCollectionArgs build() {
            if ($.accountName == null) {
                throw new MissingRequiredPropertyException("MongoCollectionArgs", "accountName");
            }
            if ($.databaseName == null) {
                throw new MissingRequiredPropertyException("MongoCollectionArgs", "databaseName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("MongoCollectionArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy