Account Args
data class AccountArgs(val accessKeyMetadataWritesEnabled: Output<Boolean>? = null, val analyticalStorage: Output<AccountAnalyticalStorageArgs>? = null, val analyticalStorageEnabled: Output<Boolean>? = null, val backup: Output<AccountBackupArgs>? = null, val capabilities: Output<List<AccountCapabilityArgs>>? = null, val capacity: Output<AccountCapacityArgs>? = null, val consistencyPolicy: Output<AccountConsistencyPolicyArgs>? = null, val corsRule: Output<AccountCorsRuleArgs>? = null, val createMode: Output<String>? = null, val defaultIdentityType: Output<String>? = null, val enableAutomaticFailover: Output<Boolean>? = null, val enableFreeTier: Output<Boolean>? = null, val enableMultipleWriteLocations: Output<Boolean>? = null, val geoLocations: Output<List<AccountGeoLocationArgs>>? = null, val identity: Output<AccountIdentityArgs>? = null, val ipRangeFilter: Output<String>? = null, val isVirtualNetworkFilterEnabled: Output<Boolean>? = null, val keyVaultKeyId: Output<String>? = null, val kind: Output<String>? = null, val localAuthenticationDisabled: Output<Boolean>? = null, val location: Output<String>? = null, val mongoServerVersion: Output<String>? = null, val name: Output<String>? = null, val networkAclBypassForAzureServices: Output<Boolean>? = null, val networkAclBypassIds: Output<List<String>>? = null, val offerType: Output<String>? = null, val publicNetworkAccessEnabled: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val restore: Output<AccountRestoreArgs>? = null, val tags: Output<Map<String, String>>? = null, val virtualNetworkRules: Output<List<AccountVirtualNetworkRuleArgs>>? = null) : ConvertibleToJava<AccountArgs>
Manages a CosmosDB (formally DocumentDB) Account.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.azure.cosmosdb.Account;
import com.pulumi.azure.cosmosdb.AccountArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountCapabilityArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var rg = new ResourceGroup("rg", ResourceGroupArgs.builder()
.location("westus")
.build());
var ri = new RandomInteger("ri", RandomIntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var db = new Account("db", AccountArgs.builder()
.location(azurerm_resource_group.example().location())
.resourceGroupName(azurerm_resource_group.example().name())
.offerType("Standard")
.kind("MongoDB")
.enableAutomaticFailover(true)
.capabilities(
AccountCapabilityArgs.builder()
.name("EnableAggregationPipeline")
.build(),
AccountCapabilityArgs.builder()
.name("mongoEnableDocLevelTTL")
.build(),
AccountCapabilityArgs.builder()
.name("MongoDBv3.4")
.build(),
AccountCapabilityArgs.builder()
.name("EnableMongo")
.build())
.consistencyPolicy(AccountConsistencyPolicyArgs.builder()
.consistencyLevel("BoundedStaleness")
.maxIntervalInSeconds(300)
.maxStalenessPrefix(100000)
.build())
.geoLocations(
AccountGeoLocationArgs.builder()
.location("eastus")
.failoverPriority(1)
.build(),
AccountGeoLocationArgs.builder()
.location("westus")
.failoverPriority(0)
.build())
.build());
}
}
Content copied to clipboard
Import
CosmosDB Accounts can be imported using the resource id
, e.g.
$ pulumi import azure:cosmosdb/account:Account account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1
Content copied to clipboard
Constructors
Link copied to clipboard
fun AccountArgs(accessKeyMetadataWritesEnabled: Output<Boolean>? = null, analyticalStorage: Output<AccountAnalyticalStorageArgs>? = null, analyticalStorageEnabled: Output<Boolean>? = null, backup: Output<AccountBackupArgs>? = null, capabilities: Output<List<AccountCapabilityArgs>>? = null, capacity: Output<AccountCapacityArgs>? = null, consistencyPolicy: Output<AccountConsistencyPolicyArgs>? = null, corsRule: Output<AccountCorsRuleArgs>? = null, createMode: Output<String>? = null, defaultIdentityType: Output<String>? = null, enableAutomaticFailover: Output<Boolean>? = null, enableFreeTier: Output<Boolean>? = null, enableMultipleWriteLocations: Output<Boolean>? = null, geoLocations: Output<List<AccountGeoLocationArgs>>? = null, identity: Output<AccountIdentityArgs>? = null, ipRangeFilter: Output<String>? = null, isVirtualNetworkFilterEnabled: Output<Boolean>? = null, keyVaultKeyId: Output<String>? = null, kind: Output<String>? = null, localAuthenticationDisabled: Output<Boolean>? = null, location: Output<String>? = null, mongoServerVersion: Output<String>? = null, name: Output<String>? = null, networkAclBypassForAzureServices: Output<Boolean>? = null, networkAclBypassIds: Output<List<String>>? = null, offerType: Output<String>? = null, publicNetworkAccessEnabled: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, restore: Output<AccountRestoreArgs>? = null, tags: Output<Map<String, String>>? = null, virtualNetworkRules: Output<List<AccountVirtualNetworkRuleArgs>>? = null)
Functions
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard