We recommend using Azure Native.
azure.cosmosdb.Account
Explore with Pulumi AI
Manages a CosmosDB (formally DocumentDB) Account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as random from "@pulumi/random";
const rg = new azure.core.ResourceGroup("rg", {
    name: "sample-rg",
    location: "westus",
});
const ri = new random.RandomInteger("ri", {
    min: 10000,
    max: 99999,
});
const db = new azure.cosmosdb.Account("db", {
    name: pulumi.interpolate`tfex-cosmos-db-${ri.result}`,
    location: example.location,
    resourceGroupName: example.name,
    offerType: "Standard",
    kind: "MongoDB",
    automaticFailoverEnabled: true,
    capabilities: [
        {
            name: "EnableAggregationPipeline",
        },
        {
            name: "mongoEnableDocLevelTTL",
        },
        {
            name: "MongoDBv3.4",
        },
        {
            name: "EnableMongo",
        },
    ],
    consistencyPolicy: {
        consistencyLevel: "BoundedStaleness",
        maxIntervalInSeconds: 300,
        maxStalenessPrefix: 100000,
    },
    geoLocations: [
        {
            location: "eastus",
            failoverPriority: 1,
        },
        {
            location: "westus",
            failoverPriority: 0,
        },
    ],
});
import pulumi
import pulumi_azure as azure
import pulumi_random as random
rg = azure.core.ResourceGroup("rg",
    name="sample-rg",
    location="westus")
ri = random.RandomInteger("ri",
    min=10000,
    max=99999)
db = azure.cosmosdb.Account("db",
    name=ri.result.apply(lambda result: f"tfex-cosmos-db-{result}"),
    location=example["location"],
    resource_group_name=example["name"],
    offer_type="Standard",
    kind="MongoDB",
    automatic_failover_enabled=True,
    capabilities=[
        {
            "name": "EnableAggregationPipeline",
        },
        {
            "name": "mongoEnableDocLevelTTL",
        },
        {
            "name": "MongoDBv3.4",
        },
        {
            "name": "EnableMongo",
        },
    ],
    consistency_policy={
        "consistency_level": "BoundedStaleness",
        "max_interval_in_seconds": 300,
        "max_staleness_prefix": 100000,
    },
    geo_locations=[
        {
            "location": "eastus",
            "failover_priority": 1,
        },
        {
            "location": "westus",
            "failover_priority": 0,
        },
    ])
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cosmosdb"
	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
			Name:     pulumi.String("sample-rg"),
			Location: pulumi.String("westus"),
		})
		if err != nil {
			return err
		}
		ri, err := random.NewRandomInteger(ctx, "ri", &random.RandomIntegerArgs{
			Min: pulumi.Int(10000),
			Max: pulumi.Int(99999),
		})
		if err != nil {
			return err
		}
		_, err = cosmosdb.NewAccount(ctx, "db", &cosmosdb.AccountArgs{
			Name: ri.Result.ApplyT(func(result int) (string, error) {
				return fmt.Sprintf("tfex-cosmos-db-%v", result), nil
			}).(pulumi.StringOutput),
			Location:                 pulumi.Any(example.Location),
			ResourceGroupName:        pulumi.Any(example.Name),
			OfferType:                pulumi.String("Standard"),
			Kind:                     pulumi.String("MongoDB"),
			AutomaticFailoverEnabled: pulumi.Bool(true),
			Capabilities: cosmosdb.AccountCapabilityArray{
				&cosmosdb.AccountCapabilityArgs{
					Name: pulumi.String("EnableAggregationPipeline"),
				},
				&cosmosdb.AccountCapabilityArgs{
					Name: pulumi.String("mongoEnableDocLevelTTL"),
				},
				&cosmosdb.AccountCapabilityArgs{
					Name: pulumi.String("MongoDBv3.4"),
				},
				&cosmosdb.AccountCapabilityArgs{
					Name: pulumi.String("EnableMongo"),
				},
			},
			ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{
				ConsistencyLevel:     pulumi.String("BoundedStaleness"),
				MaxIntervalInSeconds: pulumi.Int(300),
				MaxStalenessPrefix:   pulumi.Int(100000),
			},
			GeoLocations: cosmosdb.AccountGeoLocationArray{
				&cosmosdb.AccountGeoLocationArgs{
					Location:         pulumi.String("eastus"),
					FailoverPriority: pulumi.Int(1),
				},
				&cosmosdb.AccountGeoLocationArgs{
					Location:         pulumi.String("westus"),
					FailoverPriority: pulumi.Int(0),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() => 
{
    var rg = new Azure.Core.ResourceGroup("rg", new()
    {
        Name = "sample-rg",
        Location = "westus",
    });
    var ri = new Random.RandomInteger("ri", new()
    {
        Min = 10000,
        Max = 99999,
    });
    var db = new Azure.CosmosDB.Account("db", new()
    {
        Name = ri.Result.Apply(result => $"tfex-cosmos-db-{result}"),
        Location = example.Location,
        ResourceGroupName = example.Name,
        OfferType = "Standard",
        Kind = "MongoDB",
        AutomaticFailoverEnabled = true,
        Capabilities = new[]
        {
            new Azure.CosmosDB.Inputs.AccountCapabilityArgs
            {
                Name = "EnableAggregationPipeline",
            },
            new Azure.CosmosDB.Inputs.AccountCapabilityArgs
            {
                Name = "mongoEnableDocLevelTTL",
            },
            new Azure.CosmosDB.Inputs.AccountCapabilityArgs
            {
                Name = "MongoDBv3.4",
            },
            new Azure.CosmosDB.Inputs.AccountCapabilityArgs
            {
                Name = "EnableMongo",
            },
        },
        ConsistencyPolicy = new Azure.CosmosDB.Inputs.AccountConsistencyPolicyArgs
        {
            ConsistencyLevel = "BoundedStaleness",
            MaxIntervalInSeconds = 300,
            MaxStalenessPrefix = 100000,
        },
        GeoLocations = new[]
        {
            new Azure.CosmosDB.Inputs.AccountGeoLocationArgs
            {
                Location = "eastus",
                FailoverPriority = 1,
            },
            new Azure.CosmosDB.Inputs.AccountGeoLocationArgs
            {
                Location = "westus",
                FailoverPriority = 0,
            },
        },
    });
});
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()
            .name("sample-rg")
            .location("westus")
            .build());
        var ri = new RandomInteger("ri", RandomIntegerArgs.builder()
            .min(10000)
            .max(99999)
            .build());
        var db = new Account("db", AccountArgs.builder()
            .name(ri.result().applyValue(result -> String.format("tfex-cosmos-db-%s", result)))
            .location(example.location())
            .resourceGroupName(example.name())
            .offerType("Standard")
            .kind("MongoDB")
            .automaticFailoverEnabled(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());
    }
}
resources:
  rg:
    type: azure:core:ResourceGroup
    properties:
      name: sample-rg
      location: westus
  ri:
    type: random:RandomInteger
    properties:
      min: 10000
      max: 99999
  db:
    type: azure:cosmosdb:Account
    properties:
      name: tfex-cosmos-db-${ri.result}
      location: ${example.location}
      resourceGroupName: ${example.name}
      offerType: Standard
      kind: MongoDB
      automaticFailoverEnabled: true
      capabilities:
        - name: EnableAggregationPipeline
        - name: mongoEnableDocLevelTTL
        - name: MongoDBv3.4
        - name: EnableMongo
      consistencyPolicy:
        consistencyLevel: BoundedStaleness
        maxIntervalInSeconds: 300
        maxStalenessPrefix: 100000
      geoLocations:
        - location: eastus
          failoverPriority: 1
        - location: westus
          failoverPriority: 0
User Assigned Identity Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as std from "@pulumi/std";
const example = new azure.authorization.UserAssignedIdentity("example", {
    resourceGroupName: exampleAzurermResourceGroup.name,
    location: exampleAzurermResourceGroup.location,
    name: "example-resource",
});
const exampleAccount = new azure.cosmosdb.Account("example", {
    name: "example-resource",
    location: exampleAzurermResourceGroup.location,
    resourceGroupName: exampleAzurermResourceGroup.name,
    defaultIdentityType: std.joinOutput({
        separator: "=",
        input: [
            "UserAssignedIdentity",
            example.id,
        ],
    }).apply(invoke => invoke.result),
    offerType: "Standard",
    kind: "MongoDB",
    capabilities: [{
        name: "EnableMongo",
    }],
    consistencyPolicy: {
        consistencyLevel: "Strong",
    },
    geoLocations: [{
        location: "westus",
        failoverPriority: 0,
    }],
    identity: {
        type: "UserAssigned",
        identityIds: [example.id],
    },
});
import pulumi
import pulumi_azure as azure
import pulumi_std as std
example = azure.authorization.UserAssignedIdentity("example",
    resource_group_name=example_azurerm_resource_group["name"],
    location=example_azurerm_resource_group["location"],
    name="example-resource")
example_account = azure.cosmosdb.Account("example",
    name="example-resource",
    location=example_azurerm_resource_group["location"],
    resource_group_name=example_azurerm_resource_group["name"],
    default_identity_type=std.join_output(separator="=",
        input=[
            "UserAssignedIdentity",
            example.id,
        ]).apply(lambda invoke: invoke.result),
    offer_type="Standard",
    kind="MongoDB",
    capabilities=[{
        "name": "EnableMongo",
    }],
    consistency_policy={
        "consistency_level": "Strong",
    },
    geo_locations=[{
        "location": "westus",
        "failover_priority": 0,
    }],
    identity={
        "type": "UserAssigned",
        "identity_ids": [example.id],
    })
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cosmosdb"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
			ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name),
			Location:          pulumi.Any(exampleAzurermResourceGroup.Location),
			Name:              pulumi.String("example-resource"),
		})
		if err != nil {
			return err
		}
		_, err = cosmosdb.NewAccount(ctx, "example", &cosmosdb.AccountArgs{
			Name:              pulumi.String("example-resource"),
			Location:          pulumi.Any(exampleAzurermResourceGroup.Location),
			ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name),
			DefaultIdentityType: pulumi.String(std.JoinOutput(ctx, std.JoinOutputArgs{
				Separator: pulumi.String("="),
				Input: pulumi.StringArray{
					pulumi.String("UserAssignedIdentity"),
					example.ID(),
				},
			}, nil).ApplyT(func(invoke std.JoinResult) (*string, error) {
				return invoke.Result, nil
			}).(pulumi.StringPtrOutput)),
			OfferType: pulumi.String("Standard"),
			Kind:      pulumi.String("MongoDB"),
			Capabilities: cosmosdb.AccountCapabilityArray{
				&cosmosdb.AccountCapabilityArgs{
					Name: pulumi.String("EnableMongo"),
				},
			},
			ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{
				ConsistencyLevel: pulumi.String("Strong"),
			},
			GeoLocations: cosmosdb.AccountGeoLocationArray{
				&cosmosdb.AccountGeoLocationArgs{
					Location:         pulumi.String("westus"),
					FailoverPriority: pulumi.Int(0),
				},
			},
			Identity: &cosmosdb.AccountIdentityArgs{
				Type: pulumi.String("UserAssigned"),
				IdentityIds: pulumi.StringArray{
					example.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() => 
{
    var example = new Azure.Authorization.UserAssignedIdentity("example", new()
    {
        ResourceGroupName = exampleAzurermResourceGroup.Name,
        Location = exampleAzurermResourceGroup.Location,
        Name = "example-resource",
    });
    var exampleAccount = new Azure.CosmosDB.Account("example", new()
    {
        Name = "example-resource",
        Location = exampleAzurermResourceGroup.Location,
        ResourceGroupName = exampleAzurermResourceGroup.Name,
        DefaultIdentityType = Std.Join.Invoke(new()
        {
            Separator = "=",
            Input = new[]
            {
                "UserAssignedIdentity",
                example.Id,
            },
        }).Apply(invoke => invoke.Result),
        OfferType = "Standard",
        Kind = "MongoDB",
        Capabilities = new[]
        {
            new Azure.CosmosDB.Inputs.AccountCapabilityArgs
            {
                Name = "EnableMongo",
            },
        },
        ConsistencyPolicy = new Azure.CosmosDB.Inputs.AccountConsistencyPolicyArgs
        {
            ConsistencyLevel = "Strong",
        },
        GeoLocations = new[]
        {
            new Azure.CosmosDB.Inputs.AccountGeoLocationArgs
            {
                Location = "westus",
                FailoverPriority = 0,
            },
        },
        Identity = new Azure.CosmosDB.Inputs.AccountIdentityArgs
        {
            Type = "UserAssigned",
            IdentityIds = new[]
            {
                example.Id,
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.authorization.UserAssignedIdentity;
import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
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 com.pulumi.azure.cosmosdb.inputs.AccountIdentityArgs;
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 example = new UserAssignedIdentity("example", UserAssignedIdentityArgs.builder()
            .resourceGroupName(exampleAzurermResourceGroup.name())
            .location(exampleAzurermResourceGroup.location())
            .name("example-resource")
            .build());
        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("example-resource")
            .location(exampleAzurermResourceGroup.location())
            .resourceGroupName(exampleAzurermResourceGroup.name())
            .defaultIdentityType(StdFunctions.join().applyValue(invoke -> invoke.result()))
            .offerType("Standard")
            .kind("MongoDB")
            .capabilities(AccountCapabilityArgs.builder()
                .name("EnableMongo")
                .build())
            .consistencyPolicy(AccountConsistencyPolicyArgs.builder()
                .consistencyLevel("Strong")
                .build())
            .geoLocations(AccountGeoLocationArgs.builder()
                .location("westus")
                .failoverPriority(0)
                .build())
            .identity(AccountIdentityArgs.builder()
                .type("UserAssigned")
                .identityIds(example.id())
                .build())
            .build());
    }
}
resources:
  example:
    type: azure:authorization:UserAssignedIdentity
    properties:
      resourceGroupName: ${exampleAzurermResourceGroup.name}
      location: ${exampleAzurermResourceGroup.location}
      name: example-resource
  exampleAccount:
    type: azure:cosmosdb:Account
    name: example
    properties:
      name: example-resource
      location: ${exampleAzurermResourceGroup.location}
      resourceGroupName: ${exampleAzurermResourceGroup.name}
      defaultIdentityType:
        fn::invoke:
          function: std:join
          arguments:
            separator: =
            input:
              - UserAssignedIdentity
              - ${example.id}
          return: result
      offerType: Standard
      kind: MongoDB
      capabilities:
        - name: EnableMongo
      consistencyPolicy:
        consistencyLevel: Strong
      geoLocations:
        - location: westus
          failoverPriority: 0
      identity:
        type: UserAssigned
        identityIds:
          - ${example.id}
Create Account Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);@overload
def Account(resource_name: str,
            args: AccountArgs,
            opts: Optional[ResourceOptions] = None)
@overload
def Account(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            consistency_policy: Optional[AccountConsistencyPolicyArgs] = None,
            resource_group_name: Optional[str] = None,
            offer_type: Optional[str] = None,
            geo_locations: Optional[Sequence[AccountGeoLocationArgs]] = None,
            is_virtual_network_filter_enabled: Optional[bool] = None,
            local_authentication_disabled: Optional[bool] = None,
            capabilities: Optional[Sequence[AccountCapabilityArgs]] = None,
            capacity: Optional[AccountCapacityArgs] = None,
            backup: Optional[AccountBackupArgs] = None,
            cors_rule: Optional[AccountCorsRuleArgs] = None,
            create_mode: Optional[str] = None,
            default_identity_type: Optional[str] = None,
            free_tier_enabled: Optional[bool] = None,
            automatic_failover_enabled: Optional[bool] = None,
            identity: Optional[AccountIdentityArgs] = None,
            ip_range_filters: Optional[Sequence[str]] = None,
            access_key_metadata_writes_enabled: Optional[bool] = None,
            key_vault_key_id: Optional[str] = None,
            kind: Optional[str] = None,
            burst_capacity_enabled: Optional[bool] = None,
            location: Optional[str] = None,
            managed_hsm_key_id: Optional[str] = None,
            minimal_tls_version: Optional[str] = None,
            mongo_server_version: Optional[str] = None,
            multiple_write_locations_enabled: Optional[bool] = None,
            name: Optional[str] = None,
            network_acl_bypass_for_azure_services: Optional[bool] = None,
            network_acl_bypass_ids: Optional[Sequence[str]] = None,
            analytical_storage_enabled: Optional[bool] = None,
            partition_merge_enabled: Optional[bool] = None,
            public_network_access_enabled: Optional[bool] = None,
            analytical_storage: Optional[AccountAnalyticalStorageArgs] = None,
            restore: Optional[AccountRestoreArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            virtual_network_rules: Optional[Sequence[AccountVirtualNetworkRuleArgs]] = None)func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
public Account(String name, AccountArgs args)
public Account(String name, AccountArgs args, CustomResourceOptions options)
type: azure:cosmosdb:Account
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleaccountResourceResourceFromCosmosdbaccount = new Azure.CosmosDB.Account("exampleaccountResourceResourceFromCosmosdbaccount", new()
{
    ConsistencyPolicy = new Azure.CosmosDB.Inputs.AccountConsistencyPolicyArgs
    {
        ConsistencyLevel = "string",
        MaxIntervalInSeconds = 0,
        MaxStalenessPrefix = 0,
    },
    ResourceGroupName = "string",
    OfferType = "string",
    GeoLocations = new[]
    {
        new Azure.CosmosDB.Inputs.AccountGeoLocationArgs
        {
            FailoverPriority = 0,
            Location = "string",
            Id = "string",
            ZoneRedundant = false,
        },
    },
    IsVirtualNetworkFilterEnabled = false,
    LocalAuthenticationDisabled = false,
    Capabilities = new[]
    {
        new Azure.CosmosDB.Inputs.AccountCapabilityArgs
        {
            Name = "string",
        },
    },
    Capacity = new Azure.CosmosDB.Inputs.AccountCapacityArgs
    {
        TotalThroughputLimit = 0,
    },
    Backup = new Azure.CosmosDB.Inputs.AccountBackupArgs
    {
        Type = "string",
        IntervalInMinutes = 0,
        RetentionInHours = 0,
        StorageRedundancy = "string",
        Tier = "string",
    },
    CorsRule = new Azure.CosmosDB.Inputs.AccountCorsRuleArgs
    {
        AllowedHeaders = new[]
        {
            "string",
        },
        AllowedMethods = new[]
        {
            "string",
        },
        AllowedOrigins = new[]
        {
            "string",
        },
        ExposedHeaders = new[]
        {
            "string",
        },
        MaxAgeInSeconds = 0,
    },
    CreateMode = "string",
    DefaultIdentityType = "string",
    FreeTierEnabled = false,
    AutomaticFailoverEnabled = false,
    Identity = new Azure.CosmosDB.Inputs.AccountIdentityArgs
    {
        Type = "string",
        IdentityIds = new[]
        {
            "string",
        },
        PrincipalId = "string",
        TenantId = "string",
    },
    IpRangeFilters = new[]
    {
        "string",
    },
    AccessKeyMetadataWritesEnabled = false,
    KeyVaultKeyId = "string",
    Kind = "string",
    BurstCapacityEnabled = false,
    Location = "string",
    ManagedHsmKeyId = "string",
    MinimalTlsVersion = "string",
    MongoServerVersion = "string",
    MultipleWriteLocationsEnabled = false,
    Name = "string",
    NetworkAclBypassForAzureServices = false,
    NetworkAclBypassIds = new[]
    {
        "string",
    },
    AnalyticalStorageEnabled = false,
    PartitionMergeEnabled = false,
    PublicNetworkAccessEnabled = false,
    AnalyticalStorage = new Azure.CosmosDB.Inputs.AccountAnalyticalStorageArgs
    {
        SchemaType = "string",
    },
    Restore = new Azure.CosmosDB.Inputs.AccountRestoreArgs
    {
        RestoreTimestampInUtc = "string",
        SourceCosmosdbAccountId = "string",
        Databases = new[]
        {
            new Azure.CosmosDB.Inputs.AccountRestoreDatabaseArgs
            {
                Name = "string",
                CollectionNames = new[]
                {
                    "string",
                },
            },
        },
        GremlinDatabases = new[]
        {
            new Azure.CosmosDB.Inputs.AccountRestoreGremlinDatabaseArgs
            {
                Name = "string",
                GraphNames = new[]
                {
                    "string",
                },
            },
        },
        TablesToRestores = new[]
        {
            "string",
        },
    },
    Tags = 
    {
        { "string", "string" },
    },
    VirtualNetworkRules = new[]
    {
        new Azure.CosmosDB.Inputs.AccountVirtualNetworkRuleArgs
        {
            Id = "string",
            IgnoreMissingVnetServiceEndpoint = false,
        },
    },
});
example, err := cosmosdb.NewAccount(ctx, "exampleaccountResourceResourceFromCosmosdbaccount", &cosmosdb.AccountArgs{
	ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{
		ConsistencyLevel:     pulumi.String("string"),
		MaxIntervalInSeconds: pulumi.Int(0),
		MaxStalenessPrefix:   pulumi.Int(0),
	},
	ResourceGroupName: pulumi.String("string"),
	OfferType:         pulumi.String("string"),
	GeoLocations: cosmosdb.AccountGeoLocationArray{
		&cosmosdb.AccountGeoLocationArgs{
			FailoverPriority: pulumi.Int(0),
			Location:         pulumi.String("string"),
			Id:               pulumi.String("string"),
			ZoneRedundant:    pulumi.Bool(false),
		},
	},
	IsVirtualNetworkFilterEnabled: pulumi.Bool(false),
	LocalAuthenticationDisabled:   pulumi.Bool(false),
	Capabilities: cosmosdb.AccountCapabilityArray{
		&cosmosdb.AccountCapabilityArgs{
			Name: pulumi.String("string"),
		},
	},
	Capacity: &cosmosdb.AccountCapacityArgs{
		TotalThroughputLimit: pulumi.Int(0),
	},
	Backup: &cosmosdb.AccountBackupArgs{
		Type:              pulumi.String("string"),
		IntervalInMinutes: pulumi.Int(0),
		RetentionInHours:  pulumi.Int(0),
		StorageRedundancy: pulumi.String("string"),
		Tier:              pulumi.String("string"),
	},
	CorsRule: &cosmosdb.AccountCorsRuleArgs{
		AllowedHeaders: pulumi.StringArray{
			pulumi.String("string"),
		},
		AllowedMethods: pulumi.StringArray{
			pulumi.String("string"),
		},
		AllowedOrigins: pulumi.StringArray{
			pulumi.String("string"),
		},
		ExposedHeaders: pulumi.StringArray{
			pulumi.String("string"),
		},
		MaxAgeInSeconds: pulumi.Int(0),
	},
	CreateMode:               pulumi.String("string"),
	DefaultIdentityType:      pulumi.String("string"),
	FreeTierEnabled:          pulumi.Bool(false),
	AutomaticFailoverEnabled: pulumi.Bool(false),
	Identity: &cosmosdb.AccountIdentityArgs{
		Type: pulumi.String("string"),
		IdentityIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		PrincipalId: pulumi.String("string"),
		TenantId:    pulumi.String("string"),
	},
	IpRangeFilters: pulumi.StringArray{
		pulumi.String("string"),
	},
	AccessKeyMetadataWritesEnabled:   pulumi.Bool(false),
	KeyVaultKeyId:                    pulumi.String("string"),
	Kind:                             pulumi.String("string"),
	BurstCapacityEnabled:             pulumi.Bool(false),
	Location:                         pulumi.String("string"),
	ManagedHsmKeyId:                  pulumi.String("string"),
	MinimalTlsVersion:                pulumi.String("string"),
	MongoServerVersion:               pulumi.String("string"),
	MultipleWriteLocationsEnabled:    pulumi.Bool(false),
	Name:                             pulumi.String("string"),
	NetworkAclBypassForAzureServices: pulumi.Bool(false),
	NetworkAclBypassIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	AnalyticalStorageEnabled:   pulumi.Bool(false),
	PartitionMergeEnabled:      pulumi.Bool(false),
	PublicNetworkAccessEnabled: pulumi.Bool(false),
	AnalyticalStorage: &cosmosdb.AccountAnalyticalStorageArgs{
		SchemaType: pulumi.String("string"),
	},
	Restore: &cosmosdb.AccountRestoreArgs{
		RestoreTimestampInUtc:   pulumi.String("string"),
		SourceCosmosdbAccountId: pulumi.String("string"),
		Databases: cosmosdb.AccountRestoreDatabaseArray{
			&cosmosdb.AccountRestoreDatabaseArgs{
				Name: pulumi.String("string"),
				CollectionNames: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
		},
		GremlinDatabases: cosmosdb.AccountRestoreGremlinDatabaseArray{
			&cosmosdb.AccountRestoreGremlinDatabaseArgs{
				Name: pulumi.String("string"),
				GraphNames: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
		},
		TablesToRestores: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	VirtualNetworkRules: cosmosdb.AccountVirtualNetworkRuleArray{
		&cosmosdb.AccountVirtualNetworkRuleArgs{
			Id:                               pulumi.String("string"),
			IgnoreMissingVnetServiceEndpoint: pulumi.Bool(false),
		},
	},
})
var exampleaccountResourceResourceFromCosmosdbaccount = new Account("exampleaccountResourceResourceFromCosmosdbaccount", AccountArgs.builder()
    .consistencyPolicy(AccountConsistencyPolicyArgs.builder()
        .consistencyLevel("string")
        .maxIntervalInSeconds(0)
        .maxStalenessPrefix(0)
        .build())
    .resourceGroupName("string")
    .offerType("string")
    .geoLocations(AccountGeoLocationArgs.builder()
        .failoverPriority(0)
        .location("string")
        .id("string")
        .zoneRedundant(false)
        .build())
    .isVirtualNetworkFilterEnabled(false)
    .localAuthenticationDisabled(false)
    .capabilities(AccountCapabilityArgs.builder()
        .name("string")
        .build())
    .capacity(AccountCapacityArgs.builder()
        .totalThroughputLimit(0)
        .build())
    .backup(AccountBackupArgs.builder()
        .type("string")
        .intervalInMinutes(0)
        .retentionInHours(0)
        .storageRedundancy("string")
        .tier("string")
        .build())
    .corsRule(AccountCorsRuleArgs.builder()
        .allowedHeaders("string")
        .allowedMethods("string")
        .allowedOrigins("string")
        .exposedHeaders("string")
        .maxAgeInSeconds(0)
        .build())
    .createMode("string")
    .defaultIdentityType("string")
    .freeTierEnabled(false)
    .automaticFailoverEnabled(false)
    .identity(AccountIdentityArgs.builder()
        .type("string")
        .identityIds("string")
        .principalId("string")
        .tenantId("string")
        .build())
    .ipRangeFilters("string")
    .accessKeyMetadataWritesEnabled(false)
    .keyVaultKeyId("string")
    .kind("string")
    .burstCapacityEnabled(false)
    .location("string")
    .managedHsmKeyId("string")
    .minimalTlsVersion("string")
    .mongoServerVersion("string")
    .multipleWriteLocationsEnabled(false)
    .name("string")
    .networkAclBypassForAzureServices(false)
    .networkAclBypassIds("string")
    .analyticalStorageEnabled(false)
    .partitionMergeEnabled(false)
    .publicNetworkAccessEnabled(false)
    .analyticalStorage(AccountAnalyticalStorageArgs.builder()
        .schemaType("string")
        .build())
    .restore(AccountRestoreArgs.builder()
        .restoreTimestampInUtc("string")
        .sourceCosmosdbAccountId("string")
        .databases(AccountRestoreDatabaseArgs.builder()
            .name("string")
            .collectionNames("string")
            .build())
        .gremlinDatabases(AccountRestoreGremlinDatabaseArgs.builder()
            .name("string")
            .graphNames("string")
            .build())
        .tablesToRestores("string")
        .build())
    .tags(Map.of("string", "string"))
    .virtualNetworkRules(AccountVirtualNetworkRuleArgs.builder()
        .id("string")
        .ignoreMissingVnetServiceEndpoint(false)
        .build())
    .build());
exampleaccount_resource_resource_from_cosmosdbaccount = azure.cosmosdb.Account("exampleaccountResourceResourceFromCosmosdbaccount",
    consistency_policy={
        "consistency_level": "string",
        "max_interval_in_seconds": 0,
        "max_staleness_prefix": 0,
    },
    resource_group_name="string",
    offer_type="string",
    geo_locations=[{
        "failover_priority": 0,
        "location": "string",
        "id": "string",
        "zone_redundant": False,
    }],
    is_virtual_network_filter_enabled=False,
    local_authentication_disabled=False,
    capabilities=[{
        "name": "string",
    }],
    capacity={
        "total_throughput_limit": 0,
    },
    backup={
        "type": "string",
        "interval_in_minutes": 0,
        "retention_in_hours": 0,
        "storage_redundancy": "string",
        "tier": "string",
    },
    cors_rule={
        "allowed_headers": ["string"],
        "allowed_methods": ["string"],
        "allowed_origins": ["string"],
        "exposed_headers": ["string"],
        "max_age_in_seconds": 0,
    },
    create_mode="string",
    default_identity_type="string",
    free_tier_enabled=False,
    automatic_failover_enabled=False,
    identity={
        "type": "string",
        "identity_ids": ["string"],
        "principal_id": "string",
        "tenant_id": "string",
    },
    ip_range_filters=["string"],
    access_key_metadata_writes_enabled=False,
    key_vault_key_id="string",
    kind="string",
    burst_capacity_enabled=False,
    location="string",
    managed_hsm_key_id="string",
    minimal_tls_version="string",
    mongo_server_version="string",
    multiple_write_locations_enabled=False,
    name="string",
    network_acl_bypass_for_azure_services=False,
    network_acl_bypass_ids=["string"],
    analytical_storage_enabled=False,
    partition_merge_enabled=False,
    public_network_access_enabled=False,
    analytical_storage={
        "schema_type": "string",
    },
    restore={
        "restore_timestamp_in_utc": "string",
        "source_cosmosdb_account_id": "string",
        "databases": [{
            "name": "string",
            "collection_names": ["string"],
        }],
        "gremlin_databases": [{
            "name": "string",
            "graph_names": ["string"],
        }],
        "tables_to_restores": ["string"],
    },
    tags={
        "string": "string",
    },
    virtual_network_rules=[{
        "id": "string",
        "ignore_missing_vnet_service_endpoint": False,
    }])
const exampleaccountResourceResourceFromCosmosdbaccount = new azure.cosmosdb.Account("exampleaccountResourceResourceFromCosmosdbaccount", {
    consistencyPolicy: {
        consistencyLevel: "string",
        maxIntervalInSeconds: 0,
        maxStalenessPrefix: 0,
    },
    resourceGroupName: "string",
    offerType: "string",
    geoLocations: [{
        failoverPriority: 0,
        location: "string",
        id: "string",
        zoneRedundant: false,
    }],
    isVirtualNetworkFilterEnabled: false,
    localAuthenticationDisabled: false,
    capabilities: [{
        name: "string",
    }],
    capacity: {
        totalThroughputLimit: 0,
    },
    backup: {
        type: "string",
        intervalInMinutes: 0,
        retentionInHours: 0,
        storageRedundancy: "string",
        tier: "string",
    },
    corsRule: {
        allowedHeaders: ["string"],
        allowedMethods: ["string"],
        allowedOrigins: ["string"],
        exposedHeaders: ["string"],
        maxAgeInSeconds: 0,
    },
    createMode: "string",
    defaultIdentityType: "string",
    freeTierEnabled: false,
    automaticFailoverEnabled: false,
    identity: {
        type: "string",
        identityIds: ["string"],
        principalId: "string",
        tenantId: "string",
    },
    ipRangeFilters: ["string"],
    accessKeyMetadataWritesEnabled: false,
    keyVaultKeyId: "string",
    kind: "string",
    burstCapacityEnabled: false,
    location: "string",
    managedHsmKeyId: "string",
    minimalTlsVersion: "string",
    mongoServerVersion: "string",
    multipleWriteLocationsEnabled: false,
    name: "string",
    networkAclBypassForAzureServices: false,
    networkAclBypassIds: ["string"],
    analyticalStorageEnabled: false,
    partitionMergeEnabled: false,
    publicNetworkAccessEnabled: false,
    analyticalStorage: {
        schemaType: "string",
    },
    restore: {
        restoreTimestampInUtc: "string",
        sourceCosmosdbAccountId: "string",
        databases: [{
            name: "string",
            collectionNames: ["string"],
        }],
        gremlinDatabases: [{
            name: "string",
            graphNames: ["string"],
        }],
        tablesToRestores: ["string"],
    },
    tags: {
        string: "string",
    },
    virtualNetworkRules: [{
        id: "string",
        ignoreMissingVnetServiceEndpoint: false,
    }],
});
type: azure:cosmosdb:Account
properties:
    accessKeyMetadataWritesEnabled: false
    analyticalStorage:
        schemaType: string
    analyticalStorageEnabled: false
    automaticFailoverEnabled: false
    backup:
        intervalInMinutes: 0
        retentionInHours: 0
        storageRedundancy: string
        tier: string
        type: string
    burstCapacityEnabled: false
    capabilities:
        - name: string
    capacity:
        totalThroughputLimit: 0
    consistencyPolicy:
        consistencyLevel: string
        maxIntervalInSeconds: 0
        maxStalenessPrefix: 0
    corsRule:
        allowedHeaders:
            - string
        allowedMethods:
            - string
        allowedOrigins:
            - string
        exposedHeaders:
            - string
        maxAgeInSeconds: 0
    createMode: string
    defaultIdentityType: string
    freeTierEnabled: false
    geoLocations:
        - failoverPriority: 0
          id: string
          location: string
          zoneRedundant: false
    identity:
        identityIds:
            - string
        principalId: string
        tenantId: string
        type: string
    ipRangeFilters:
        - string
    isVirtualNetworkFilterEnabled: false
    keyVaultKeyId: string
    kind: string
    localAuthenticationDisabled: false
    location: string
    managedHsmKeyId: string
    minimalTlsVersion: string
    mongoServerVersion: string
    multipleWriteLocationsEnabled: false
    name: string
    networkAclBypassForAzureServices: false
    networkAclBypassIds:
        - string
    offerType: string
    partitionMergeEnabled: false
    publicNetworkAccessEnabled: false
    resourceGroupName: string
    restore:
        databases:
            - collectionNames:
                - string
              name: string
        gremlinDatabases:
            - graphNames:
                - string
              name: string
        restoreTimestampInUtc: string
        sourceCosmosdbAccountId: string
        tablesToRestores:
            - string
    tags:
        string: string
    virtualNetworkRules:
        - id: string
          ignoreMissingVnetServiceEndpoint: false
Account Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Account resource accepts the following input properties:
- ConsistencyPolicy AccountConsistency Policy 
- GeoLocations List<AccountGeo Location> 
- OfferType string
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- ResourceGroup stringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- AccessKey boolMetadata Writes Enabled 
- AnalyticalStorage AccountAnalytical Storage 
- An analytical_storageblock as defined below.
- AnalyticalStorage boolEnabled 
- AutomaticFailover boolEnabled 
- Backup
AccountBackup 
- BurstCapacity boolEnabled 
- Capabilities
List<AccountCapability> 
- Capacity
AccountCapacity 
- A capacityblock as defined below.
- CorsRule AccountCors Rule 
- CreateMode string
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- DefaultIdentity stringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- FreeTier boolEnabled 
- Identity
AccountIdentity 
- IpRange List<string>Filters 
- IsVirtual boolNetwork Filter Enabled 
- KeyVault stringKey Id 
- Kind string
- LocalAuthentication boolDisabled 
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- ManagedHsm stringKey Id 
- MinimalTls stringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- MongoServer stringVersion 
- MultipleWrite boolLocations Enabled 
- Name string
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- NetworkAcl boolBypass For Azure Services 
- NetworkAcl List<string>Bypass Ids 
- PartitionMerge boolEnabled 
- PublicNetwork boolAccess Enabled 
- Restore
AccountRestore 
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- VirtualNetwork List<AccountRules Virtual Network Rule> 
- ConsistencyPolicy AccountConsistency Policy Args 
- GeoLocations []AccountGeo Location Args 
- OfferType string
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- ResourceGroup stringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- AccessKey boolMetadata Writes Enabled 
- AnalyticalStorage AccountAnalytical Storage Args 
- An analytical_storageblock as defined below.
- AnalyticalStorage boolEnabled 
- AutomaticFailover boolEnabled 
- Backup
AccountBackup Args 
- BurstCapacity boolEnabled 
- Capabilities
[]AccountCapability Args 
- Capacity
AccountCapacity Args 
- A capacityblock as defined below.
- CorsRule AccountCors Rule Args 
- CreateMode string
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- DefaultIdentity stringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- FreeTier boolEnabled 
- Identity
AccountIdentity Args 
- IpRange []stringFilters 
- IsVirtual boolNetwork Filter Enabled 
- KeyVault stringKey Id 
- Kind string
- LocalAuthentication boolDisabled 
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- ManagedHsm stringKey Id 
- MinimalTls stringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- MongoServer stringVersion 
- MultipleWrite boolLocations Enabled 
- Name string
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- NetworkAcl boolBypass For Azure Services 
- NetworkAcl []stringBypass Ids 
- PartitionMerge boolEnabled 
- PublicNetwork boolAccess Enabled 
- Restore
AccountRestore Args 
- map[string]string
- A mapping of tags to assign to the resource.
- VirtualNetwork []AccountRules Virtual Network Rule Args 
- consistencyPolicy AccountConsistency Policy 
- geoLocations List<AccountGeo Location> 
- offerType String
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- resourceGroup StringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- accessKey BooleanMetadata Writes Enabled 
- analyticalStorage AccountAnalytical Storage 
- An analytical_storageblock as defined below.
- analyticalStorage BooleanEnabled 
- automaticFailover BooleanEnabled 
- backup
AccountBackup 
- burstCapacity BooleanEnabled 
- capabilities
List<AccountCapability> 
- capacity
AccountCapacity 
- A capacityblock as defined below.
- corsRule AccountCors Rule 
- createMode String
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- defaultIdentity StringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- freeTier BooleanEnabled 
- identity
AccountIdentity 
- ipRange List<String>Filters 
- isVirtual BooleanNetwork Filter Enabled 
- keyVault StringKey Id 
- kind String
- localAuthentication BooleanDisabled 
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- managedHsm StringKey Id 
- minimalTls StringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- mongoServer StringVersion 
- multipleWrite BooleanLocations Enabled 
- name String
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- networkAcl BooleanBypass For Azure Services 
- networkAcl List<String>Bypass Ids 
- partitionMerge BooleanEnabled 
- publicNetwork BooleanAccess Enabled 
- restore
AccountRestore 
- Map<String,String>
- A mapping of tags to assign to the resource.
- virtualNetwork List<AccountRules Virtual Network Rule> 
- consistencyPolicy AccountConsistency Policy 
- geoLocations AccountGeo Location[] 
- offerType string
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- resourceGroup stringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- accessKey booleanMetadata Writes Enabled 
- analyticalStorage AccountAnalytical Storage 
- An analytical_storageblock as defined below.
- analyticalStorage booleanEnabled 
- automaticFailover booleanEnabled 
- backup
AccountBackup 
- burstCapacity booleanEnabled 
- capabilities
AccountCapability[] 
- capacity
AccountCapacity 
- A capacityblock as defined below.
- corsRule AccountCors Rule 
- createMode string
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- defaultIdentity stringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- freeTier booleanEnabled 
- identity
AccountIdentity 
- ipRange string[]Filters 
- isVirtual booleanNetwork Filter Enabled 
- keyVault stringKey Id 
- kind string
- localAuthentication booleanDisabled 
- location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- managedHsm stringKey Id 
- minimalTls stringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- mongoServer stringVersion 
- multipleWrite booleanLocations Enabled 
- name string
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- networkAcl booleanBypass For Azure Services 
- networkAcl string[]Bypass Ids 
- partitionMerge booleanEnabled 
- publicNetwork booleanAccess Enabled 
- restore
AccountRestore 
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- virtualNetwork AccountRules Virtual Network Rule[] 
- consistency_policy AccountConsistency Policy Args 
- geo_locations Sequence[AccountGeo Location Args] 
- offer_type str
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- resource_group_ strname 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- access_key_ boolmetadata_ writes_ enabled 
- analytical_storage AccountAnalytical Storage Args 
- An analytical_storageblock as defined below.
- analytical_storage_ boolenabled 
- automatic_failover_ boolenabled 
- backup
AccountBackup Args 
- burst_capacity_ boolenabled 
- capabilities
Sequence[AccountCapability Args] 
- capacity
AccountCapacity Args 
- A capacityblock as defined below.
- cors_rule AccountCors Rule Args 
- create_mode str
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- default_identity_ strtype 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- free_tier_ boolenabled 
- identity
AccountIdentity Args 
- ip_range_ Sequence[str]filters 
- is_virtual_ boolnetwork_ filter_ enabled 
- key_vault_ strkey_ id 
- kind str
- local_authentication_ booldisabled 
- location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- managed_hsm_ strkey_ id 
- minimal_tls_ strversion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- mongo_server_ strversion 
- multiple_write_ boollocations_ enabled 
- name str
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network_acl_ boolbypass_ for_ azure_ services 
- network_acl_ Sequence[str]bypass_ ids 
- partition_merge_ boolenabled 
- public_network_ boolaccess_ enabled 
- restore
AccountRestore Args 
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- virtual_network_ Sequence[Accountrules Virtual Network Rule Args] 
- consistencyPolicy Property Map
- geoLocations List<Property Map>
- offerType String
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- resourceGroup StringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- accessKey BooleanMetadata Writes Enabled 
- analyticalStorage Property Map
- An analytical_storageblock as defined below.
- analyticalStorage BooleanEnabled 
- automaticFailover BooleanEnabled 
- backup Property Map
- burstCapacity BooleanEnabled 
- capabilities List<Property Map>
- capacity Property Map
- A capacityblock as defined below.
- corsRule Property Map
- createMode String
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- defaultIdentity StringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- freeTier BooleanEnabled 
- identity Property Map
- ipRange List<String>Filters 
- isVirtual BooleanNetwork Filter Enabled 
- keyVault StringKey Id 
- kind String
- localAuthentication BooleanDisabled 
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- managedHsm StringKey Id 
- minimalTls StringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- mongoServer StringVersion 
- multipleWrite BooleanLocations Enabled 
- name String
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- networkAcl BooleanBypass For Azure Services 
- networkAcl List<String>Bypass Ids 
- partitionMerge BooleanEnabled 
- publicNetwork BooleanAccess Enabled 
- restore Property Map
- Map<String>
- A mapping of tags to assign to the resource.
- virtualNetwork List<Property Map>Rules 
Outputs
All input properties are implicitly available as output properties. Additionally, the Account resource produces the following output properties:
- Endpoint string
- The endpoint used to connect to the CosmosDB account.
- Id string
- The provider-assigned unique ID for this managed resource.
- PrimaryKey string
- The Primary key for the CosmosDB Account.
- PrimaryMongodb stringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- PrimaryReadonly stringKey 
- The Primary read-only Key for the CosmosDB Account.
- PrimaryReadonly stringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- PrimaryReadonly stringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- PrimarySql stringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- ReadEndpoints List<string>
- A list of read endpoints available for this CosmosDB account.
- SecondaryKey string
- The Secondary key for the CosmosDB Account.
- SecondaryMongodb stringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- SecondaryReadonly stringKey 
- The Secondary read-only key for the CosmosDB Account.
- SecondaryReadonly stringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- SecondaryReadonly stringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- SecondarySql stringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- WriteEndpoints List<string>
- A list of write endpoints available for this CosmosDB account.
- Endpoint string
- The endpoint used to connect to the CosmosDB account.
- Id string
- The provider-assigned unique ID for this managed resource.
- PrimaryKey string
- The Primary key for the CosmosDB Account.
- PrimaryMongodb stringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- PrimaryReadonly stringKey 
- The Primary read-only Key for the CosmosDB Account.
- PrimaryReadonly stringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- PrimaryReadonly stringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- PrimarySql stringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- ReadEndpoints []string
- A list of read endpoints available for this CosmosDB account.
- SecondaryKey string
- The Secondary key for the CosmosDB Account.
- SecondaryMongodb stringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- SecondaryReadonly stringKey 
- The Secondary read-only key for the CosmosDB Account.
- SecondaryReadonly stringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- SecondaryReadonly stringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- SecondarySql stringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- WriteEndpoints []string
- A list of write endpoints available for this CosmosDB account.
- endpoint String
- The endpoint used to connect to the CosmosDB account.
- id String
- The provider-assigned unique ID for this managed resource.
- primaryKey String
- The Primary key for the CosmosDB Account.
- primaryMongodb StringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- primaryReadonly StringKey 
- The Primary read-only Key for the CosmosDB Account.
- primaryReadonly StringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- primaryReadonly StringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- primarySql StringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- readEndpoints List<String>
- A list of read endpoints available for this CosmosDB account.
- secondaryKey String
- The Secondary key for the CosmosDB Account.
- secondaryMongodb StringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- secondaryReadonly StringKey 
- The Secondary read-only key for the CosmosDB Account.
- secondaryReadonly StringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- secondaryReadonly StringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- secondarySql StringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- writeEndpoints List<String>
- A list of write endpoints available for this CosmosDB account.
- endpoint string
- The endpoint used to connect to the CosmosDB account.
- id string
- The provider-assigned unique ID for this managed resource.
- primaryKey string
- The Primary key for the CosmosDB Account.
- primaryMongodb stringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- primaryReadonly stringKey 
- The Primary read-only Key for the CosmosDB Account.
- primaryReadonly stringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- primaryReadonly stringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- primarySql stringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- readEndpoints string[]
- A list of read endpoints available for this CosmosDB account.
- secondaryKey string
- The Secondary key for the CosmosDB Account.
- secondaryMongodb stringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- secondaryReadonly stringKey 
- The Secondary read-only key for the CosmosDB Account.
- secondaryReadonly stringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- secondaryReadonly stringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- secondarySql stringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- writeEndpoints string[]
- A list of write endpoints available for this CosmosDB account.
- endpoint str
- The endpoint used to connect to the CosmosDB account.
- id str
- The provider-assigned unique ID for this managed resource.
- primary_key str
- The Primary key for the CosmosDB Account.
- primary_mongodb_ strconnection_ string 
- Primary Mongodb connection string for the CosmosDB Account.
- primary_readonly_ strkey 
- The Primary read-only Key for the CosmosDB Account.
- primary_readonly_ strmongodb_ connection_ string 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- primary_readonly_ strsql_ connection_ string 
- Primary readonly SQL connection string for the CosmosDB Account.
- primary_sql_ strconnection_ string 
- Primary SQL connection string for the CosmosDB Account.
- read_endpoints Sequence[str]
- A list of read endpoints available for this CosmosDB account.
- secondary_key str
- The Secondary key for the CosmosDB Account.
- secondary_mongodb_ strconnection_ string 
- Secondary Mongodb connection string for the CosmosDB Account.
- secondary_readonly_ strkey 
- The Secondary read-only key for the CosmosDB Account.
- secondary_readonly_ strmongodb_ connection_ string 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- secondary_readonly_ strsql_ connection_ string 
- Secondary readonly SQL connection string for the CosmosDB Account.
- secondary_sql_ strconnection_ string 
- Secondary SQL connection string for the CosmosDB Account.
- write_endpoints Sequence[str]
- A list of write endpoints available for this CosmosDB account.
- endpoint String
- The endpoint used to connect to the CosmosDB account.
- id String
- The provider-assigned unique ID for this managed resource.
- primaryKey String
- The Primary key for the CosmosDB Account.
- primaryMongodb StringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- primaryReadonly StringKey 
- The Primary read-only Key for the CosmosDB Account.
- primaryReadonly StringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- primaryReadonly StringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- primarySql StringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- readEndpoints List<String>
- A list of read endpoints available for this CosmosDB account.
- secondaryKey String
- The Secondary key for the CosmosDB Account.
- secondaryMongodb StringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- secondaryReadonly StringKey 
- The Secondary read-only key for the CosmosDB Account.
- secondaryReadonly StringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- secondaryReadonly StringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- secondarySql StringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- writeEndpoints List<String>
- A list of write endpoints available for this CosmosDB account.
Look up Existing Account Resource
Get an existing Account resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccountState, opts?: CustomResourceOptions): Account@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_key_metadata_writes_enabled: Optional[bool] = None,
        analytical_storage: Optional[AccountAnalyticalStorageArgs] = None,
        analytical_storage_enabled: Optional[bool] = None,
        automatic_failover_enabled: Optional[bool] = None,
        backup: Optional[AccountBackupArgs] = None,
        burst_capacity_enabled: Optional[bool] = None,
        capabilities: Optional[Sequence[AccountCapabilityArgs]] = None,
        capacity: Optional[AccountCapacityArgs] = None,
        consistency_policy: Optional[AccountConsistencyPolicyArgs] = None,
        cors_rule: Optional[AccountCorsRuleArgs] = None,
        create_mode: Optional[str] = None,
        default_identity_type: Optional[str] = None,
        endpoint: Optional[str] = None,
        free_tier_enabled: Optional[bool] = None,
        geo_locations: Optional[Sequence[AccountGeoLocationArgs]] = None,
        identity: Optional[AccountIdentityArgs] = None,
        ip_range_filters: Optional[Sequence[str]] = None,
        is_virtual_network_filter_enabled: Optional[bool] = None,
        key_vault_key_id: Optional[str] = None,
        kind: Optional[str] = None,
        local_authentication_disabled: Optional[bool] = None,
        location: Optional[str] = None,
        managed_hsm_key_id: Optional[str] = None,
        minimal_tls_version: Optional[str] = None,
        mongo_server_version: Optional[str] = None,
        multiple_write_locations_enabled: Optional[bool] = None,
        name: Optional[str] = None,
        network_acl_bypass_for_azure_services: Optional[bool] = None,
        network_acl_bypass_ids: Optional[Sequence[str]] = None,
        offer_type: Optional[str] = None,
        partition_merge_enabled: Optional[bool] = None,
        primary_key: Optional[str] = None,
        primary_mongodb_connection_string: Optional[str] = None,
        primary_readonly_key: Optional[str] = None,
        primary_readonly_mongodb_connection_string: Optional[str] = None,
        primary_readonly_sql_connection_string: Optional[str] = None,
        primary_sql_connection_string: Optional[str] = None,
        public_network_access_enabled: Optional[bool] = None,
        read_endpoints: Optional[Sequence[str]] = None,
        resource_group_name: Optional[str] = None,
        restore: Optional[AccountRestoreArgs] = None,
        secondary_key: Optional[str] = None,
        secondary_mongodb_connection_string: Optional[str] = None,
        secondary_readonly_key: Optional[str] = None,
        secondary_readonly_mongodb_connection_string: Optional[str] = None,
        secondary_readonly_sql_connection_string: Optional[str] = None,
        secondary_sql_connection_string: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        virtual_network_rules: Optional[Sequence[AccountVirtualNetworkRuleArgs]] = None,
        write_endpoints: Optional[Sequence[str]] = None) -> Accountfunc GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)resources:  _:    type: azure:cosmosdb:Account    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AccessKey boolMetadata Writes Enabled 
- AnalyticalStorage AccountAnalytical Storage 
- An analytical_storageblock as defined below.
- AnalyticalStorage boolEnabled 
- AutomaticFailover boolEnabled 
- Backup
AccountBackup 
- BurstCapacity boolEnabled 
- Capabilities
List<AccountCapability> 
- Capacity
AccountCapacity 
- A capacityblock as defined below.
- ConsistencyPolicy AccountConsistency Policy 
- CorsRule AccountCors Rule 
- CreateMode string
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- DefaultIdentity stringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- Endpoint string
- The endpoint used to connect to the CosmosDB account.
- FreeTier boolEnabled 
- GeoLocations List<AccountGeo Location> 
- Identity
AccountIdentity 
- IpRange List<string>Filters 
- IsVirtual boolNetwork Filter Enabled 
- KeyVault stringKey Id 
- Kind string
- LocalAuthentication boolDisabled 
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- ManagedHsm stringKey Id 
- MinimalTls stringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- MongoServer stringVersion 
- MultipleWrite boolLocations Enabled 
- Name string
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- NetworkAcl boolBypass For Azure Services 
- NetworkAcl List<string>Bypass Ids 
- OfferType string
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- PartitionMerge boolEnabled 
- PrimaryKey string
- The Primary key for the CosmosDB Account.
- PrimaryMongodb stringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- PrimaryReadonly stringKey 
- The Primary read-only Key for the CosmosDB Account.
- PrimaryReadonly stringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- PrimaryReadonly stringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- PrimarySql stringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- PublicNetwork boolAccess Enabled 
- ReadEndpoints List<string>
- A list of read endpoints available for this CosmosDB account.
- ResourceGroup stringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- Restore
AccountRestore 
- SecondaryKey string
- The Secondary key for the CosmosDB Account.
- SecondaryMongodb stringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- SecondaryReadonly stringKey 
- The Secondary read-only key for the CosmosDB Account.
- SecondaryReadonly stringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- SecondaryReadonly stringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- SecondarySql stringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- VirtualNetwork List<AccountRules Virtual Network Rule> 
- WriteEndpoints List<string>
- A list of write endpoints available for this CosmosDB account.
- AccessKey boolMetadata Writes Enabled 
- AnalyticalStorage AccountAnalytical Storage Args 
- An analytical_storageblock as defined below.
- AnalyticalStorage boolEnabled 
- AutomaticFailover boolEnabled 
- Backup
AccountBackup Args 
- BurstCapacity boolEnabled 
- Capabilities
[]AccountCapability Args 
- Capacity
AccountCapacity Args 
- A capacityblock as defined below.
- ConsistencyPolicy AccountConsistency Policy Args 
- CorsRule AccountCors Rule Args 
- CreateMode string
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- DefaultIdentity stringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- Endpoint string
- The endpoint used to connect to the CosmosDB account.
- FreeTier boolEnabled 
- GeoLocations []AccountGeo Location Args 
- Identity
AccountIdentity Args 
- IpRange []stringFilters 
- IsVirtual boolNetwork Filter Enabled 
- KeyVault stringKey Id 
- Kind string
- LocalAuthentication boolDisabled 
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- ManagedHsm stringKey Id 
- MinimalTls stringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- MongoServer stringVersion 
- MultipleWrite boolLocations Enabled 
- Name string
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- NetworkAcl boolBypass For Azure Services 
- NetworkAcl []stringBypass Ids 
- OfferType string
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- PartitionMerge boolEnabled 
- PrimaryKey string
- The Primary key for the CosmosDB Account.
- PrimaryMongodb stringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- PrimaryReadonly stringKey 
- The Primary read-only Key for the CosmosDB Account.
- PrimaryReadonly stringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- PrimaryReadonly stringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- PrimarySql stringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- PublicNetwork boolAccess Enabled 
- ReadEndpoints []string
- A list of read endpoints available for this CosmosDB account.
- ResourceGroup stringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- Restore
AccountRestore Args 
- SecondaryKey string
- The Secondary key for the CosmosDB Account.
- SecondaryMongodb stringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- SecondaryReadonly stringKey 
- The Secondary read-only key for the CosmosDB Account.
- SecondaryReadonly stringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- SecondaryReadonly stringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- SecondarySql stringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- map[string]string
- A mapping of tags to assign to the resource.
- VirtualNetwork []AccountRules Virtual Network Rule Args 
- WriteEndpoints []string
- A list of write endpoints available for this CosmosDB account.
- accessKey BooleanMetadata Writes Enabled 
- analyticalStorage AccountAnalytical Storage 
- An analytical_storageblock as defined below.
- analyticalStorage BooleanEnabled 
- automaticFailover BooleanEnabled 
- backup
AccountBackup 
- burstCapacity BooleanEnabled 
- capabilities
List<AccountCapability> 
- capacity
AccountCapacity 
- A capacityblock as defined below.
- consistencyPolicy AccountConsistency Policy 
- corsRule AccountCors Rule 
- createMode String
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- defaultIdentity StringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- endpoint String
- The endpoint used to connect to the CosmosDB account.
- freeTier BooleanEnabled 
- geoLocations List<AccountGeo Location> 
- identity
AccountIdentity 
- ipRange List<String>Filters 
- isVirtual BooleanNetwork Filter Enabled 
- keyVault StringKey Id 
- kind String
- localAuthentication BooleanDisabled 
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- managedHsm StringKey Id 
- minimalTls StringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- mongoServer StringVersion 
- multipleWrite BooleanLocations Enabled 
- name String
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- networkAcl BooleanBypass For Azure Services 
- networkAcl List<String>Bypass Ids 
- offerType String
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- partitionMerge BooleanEnabled 
- primaryKey String
- The Primary key for the CosmosDB Account.
- primaryMongodb StringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- primaryReadonly StringKey 
- The Primary read-only Key for the CosmosDB Account.
- primaryReadonly StringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- primaryReadonly StringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- primarySql StringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- publicNetwork BooleanAccess Enabled 
- readEndpoints List<String>
- A list of read endpoints available for this CosmosDB account.
- resourceGroup StringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- restore
AccountRestore 
- secondaryKey String
- The Secondary key for the CosmosDB Account.
- secondaryMongodb StringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- secondaryReadonly StringKey 
- The Secondary read-only key for the CosmosDB Account.
- secondaryReadonly StringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- secondaryReadonly StringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- secondarySql StringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- Map<String,String>
- A mapping of tags to assign to the resource.
- virtualNetwork List<AccountRules Virtual Network Rule> 
- writeEndpoints List<String>
- A list of write endpoints available for this CosmosDB account.
- accessKey booleanMetadata Writes Enabled 
- analyticalStorage AccountAnalytical Storage 
- An analytical_storageblock as defined below.
- analyticalStorage booleanEnabled 
- automaticFailover booleanEnabled 
- backup
AccountBackup 
- burstCapacity booleanEnabled 
- capabilities
AccountCapability[] 
- capacity
AccountCapacity 
- A capacityblock as defined below.
- consistencyPolicy AccountConsistency Policy 
- corsRule AccountCors Rule 
- createMode string
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- defaultIdentity stringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- endpoint string
- The endpoint used to connect to the CosmosDB account.
- freeTier booleanEnabled 
- geoLocations AccountGeo Location[] 
- identity
AccountIdentity 
- ipRange string[]Filters 
- isVirtual booleanNetwork Filter Enabled 
- keyVault stringKey Id 
- kind string
- localAuthentication booleanDisabled 
- location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- managedHsm stringKey Id 
- minimalTls stringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- mongoServer stringVersion 
- multipleWrite booleanLocations Enabled 
- name string
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- networkAcl booleanBypass For Azure Services 
- networkAcl string[]Bypass Ids 
- offerType string
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- partitionMerge booleanEnabled 
- primaryKey string
- The Primary key for the CosmosDB Account.
- primaryMongodb stringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- primaryReadonly stringKey 
- The Primary read-only Key for the CosmosDB Account.
- primaryReadonly stringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- primaryReadonly stringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- primarySql stringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- publicNetwork booleanAccess Enabled 
- readEndpoints string[]
- A list of read endpoints available for this CosmosDB account.
- resourceGroup stringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- restore
AccountRestore 
- secondaryKey string
- The Secondary key for the CosmosDB Account.
- secondaryMongodb stringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- secondaryReadonly stringKey 
- The Secondary read-only key for the CosmosDB Account.
- secondaryReadonly stringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- secondaryReadonly stringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- secondarySql stringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- virtualNetwork AccountRules Virtual Network Rule[] 
- writeEndpoints string[]
- A list of write endpoints available for this CosmosDB account.
- access_key_ boolmetadata_ writes_ enabled 
- analytical_storage AccountAnalytical Storage Args 
- An analytical_storageblock as defined below.
- analytical_storage_ boolenabled 
- automatic_failover_ boolenabled 
- backup
AccountBackup Args 
- burst_capacity_ boolenabled 
- capabilities
Sequence[AccountCapability Args] 
- capacity
AccountCapacity Args 
- A capacityblock as defined below.
- consistency_policy AccountConsistency Policy Args 
- cors_rule AccountCors Rule Args 
- create_mode str
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- default_identity_ strtype 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- endpoint str
- The endpoint used to connect to the CosmosDB account.
- free_tier_ boolenabled 
- geo_locations Sequence[AccountGeo Location Args] 
- identity
AccountIdentity Args 
- ip_range_ Sequence[str]filters 
- is_virtual_ boolnetwork_ filter_ enabled 
- key_vault_ strkey_ id 
- kind str
- local_authentication_ booldisabled 
- location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- managed_hsm_ strkey_ id 
- minimal_tls_ strversion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- mongo_server_ strversion 
- multiple_write_ boollocations_ enabled 
- name str
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- network_acl_ boolbypass_ for_ azure_ services 
- network_acl_ Sequence[str]bypass_ ids 
- offer_type str
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- partition_merge_ boolenabled 
- primary_key str
- The Primary key for the CosmosDB Account.
- primary_mongodb_ strconnection_ string 
- Primary Mongodb connection string for the CosmosDB Account.
- primary_readonly_ strkey 
- The Primary read-only Key for the CosmosDB Account.
- primary_readonly_ strmongodb_ connection_ string 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- primary_readonly_ strsql_ connection_ string 
- Primary readonly SQL connection string for the CosmosDB Account.
- primary_sql_ strconnection_ string 
- Primary SQL connection string for the CosmosDB Account.
- public_network_ boolaccess_ enabled 
- read_endpoints Sequence[str]
- A list of read endpoints available for this CosmosDB account.
- resource_group_ strname 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- restore
AccountRestore Args 
- secondary_key str
- The Secondary key for the CosmosDB Account.
- secondary_mongodb_ strconnection_ string 
- Secondary Mongodb connection string for the CosmosDB Account.
- secondary_readonly_ strkey 
- The Secondary read-only key for the CosmosDB Account.
- secondary_readonly_ strmongodb_ connection_ string 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- secondary_readonly_ strsql_ connection_ string 
- Secondary readonly SQL connection string for the CosmosDB Account.
- secondary_sql_ strconnection_ string 
- Secondary SQL connection string for the CosmosDB Account.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- virtual_network_ Sequence[Accountrules Virtual Network Rule Args] 
- write_endpoints Sequence[str]
- A list of write endpoints available for this CosmosDB account.
- accessKey BooleanMetadata Writes Enabled 
- analyticalStorage Property Map
- An analytical_storageblock as defined below.
- analyticalStorage BooleanEnabled 
- automaticFailover BooleanEnabled 
- backup Property Map
- burstCapacity BooleanEnabled 
- capabilities List<Property Map>
- capacity Property Map
- A capacityblock as defined below.
- consistencyPolicy Property Map
- corsRule Property Map
- createMode String
- The creation mode for the CosmosDB Account. Possible values are - Defaultand- Restore. Changing this forces a new resource to be created.- Note: - create_modecan only be defined when the- backup.typeis set to- Continuous.
- defaultIdentity StringType 
- The default identity for accessing Key Vault. Possible values are FirstPartyIdentity,SystemAssignedIdentityorUserAssignedIdentity. Defaults toFirstPartyIdentity.
- endpoint String
- The endpoint used to connect to the CosmosDB account.
- freeTier BooleanEnabled 
- geoLocations List<Property Map>
- identity Property Map
- ipRange List<String>Filters 
- isVirtual BooleanNetwork Filter Enabled 
- keyVault StringKey Id 
- kind String
- localAuthentication BooleanDisabled 
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- managedHsm StringKey Id 
- minimalTls StringVersion 
- Specifies the minimal TLS version for the CosmosDB account. Possible values are: - Tls,- Tls11, and- Tls12. Defaults to- Tls12.- Note Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more details. 
- mongoServer StringVersion 
- multipleWrite BooleanLocations Enabled 
- name String
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- networkAcl BooleanBypass For Azure Services 
- networkAcl List<String>Bypass Ids 
- offerType String
- Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard.
- partitionMerge BooleanEnabled 
- primaryKey String
- The Primary key for the CosmosDB Account.
- primaryMongodb StringConnection String 
- Primary Mongodb connection string for the CosmosDB Account.
- primaryReadonly StringKey 
- The Primary read-only Key for the CosmosDB Account.
- primaryReadonly StringMongodb Connection String 
- Primary readonly Mongodb connection string for the CosmosDB Account.
- primaryReadonly StringSql Connection String 
- Primary readonly SQL connection string for the CosmosDB Account.
- primarySql StringConnection String 
- Primary SQL connection string for the CosmosDB Account.
- publicNetwork BooleanAccess Enabled 
- readEndpoints List<String>
- A list of read endpoints available for this CosmosDB account.
- resourceGroup StringName 
- The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
- restore Property Map
- secondaryKey String
- The Secondary key for the CosmosDB Account.
- secondaryMongodb StringConnection String 
- Secondary Mongodb connection string for the CosmosDB Account.
- secondaryReadonly StringKey 
- The Secondary read-only key for the CosmosDB Account.
- secondaryReadonly StringMongodb Connection String 
- Secondary readonly Mongodb connection string for the CosmosDB Account.
- secondaryReadonly StringSql Connection String 
- Secondary readonly SQL connection string for the CosmosDB Account.
- secondarySql StringConnection String 
- Secondary SQL connection string for the CosmosDB Account.
- Map<String>
- A mapping of tags to assign to the resource.
- virtualNetwork List<Property Map>Rules 
- writeEndpoints List<String>
- A list of write endpoints available for this CosmosDB account.
Supporting Types
AccountAnalyticalStorage, AccountAnalyticalStorageArgs      
- SchemaType string
- The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelityandWellDefined.
- SchemaType string
- The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelityandWellDefined.
- schemaType String
- The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelityandWellDefined.
- schemaType string
- The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelityandWellDefined.
- schema_type str
- The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelityandWellDefined.
- schemaType String
- The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelityandWellDefined.
AccountBackup, AccountBackupArgs    
- Type string
- The type of the - backup. Possible values are- Continuousand- Periodic.- Note: Migration of - Periodicto- Continuousis one-way, changing- Continuousto- Periodicforces a new resource to be created.
- IntervalIn intMinutes 
- The interval in minutes between two backups. Possible values are between 60 and 1440. Defaults to 240.
- RetentionIn intHours 
- The time in hours that each backup is retained. Possible values are between 8 and 720. Defaults to 8.
- StorageRedundancy string
- The storage redundancy is used to indicate the type of backup residency. Possible values are - Geo,- Localand- Zone. Defaults to- Geo.- Note: You can only configure - interval_in_minutes,- retention_in_hoursand- storage_redundancywhen the- typefield is set to- Periodic.
- Tier string
- The continuous backup tier. Possible values are Continuous7DaysandContinuous30Days.
- Type string
- The type of the - backup. Possible values are- Continuousand- Periodic.- Note: Migration of - Periodicto- Continuousis one-way, changing- Continuousto- Periodicforces a new resource to be created.
- IntervalIn intMinutes 
- The interval in minutes between two backups. Possible values are between 60 and 1440. Defaults to 240.
- RetentionIn intHours 
- The time in hours that each backup is retained. Possible values are between 8 and 720. Defaults to 8.
- StorageRedundancy string
- The storage redundancy is used to indicate the type of backup residency. Possible values are - Geo,- Localand- Zone. Defaults to- Geo.- Note: You can only configure - interval_in_minutes,- retention_in_hoursand- storage_redundancywhen the- typefield is set to- Periodic.
- Tier string
- The continuous backup tier. Possible values are Continuous7DaysandContinuous30Days.
- type String
- The type of the - backup. Possible values are- Continuousand- Periodic.- Note: Migration of - Periodicto- Continuousis one-way, changing- Continuousto- Periodicforces a new resource to be created.
- intervalIn IntegerMinutes 
- The interval in minutes between two backups. Possible values are between 60 and 1440. Defaults to 240.
- retentionIn IntegerHours 
- The time in hours that each backup is retained. Possible values are between 8 and 720. Defaults to 8.
- storageRedundancy String
- The storage redundancy is used to indicate the type of backup residency. Possible values are - Geo,- Localand- Zone. Defaults to- Geo.- Note: You can only configure - interval_in_minutes,- retention_in_hoursand- storage_redundancywhen the- typefield is set to- Periodic.
- tier String
- The continuous backup tier. Possible values are Continuous7DaysandContinuous30Days.
- type string
- The type of the - backup. Possible values are- Continuousand- Periodic.- Note: Migration of - Periodicto- Continuousis one-way, changing- Continuousto- Periodicforces a new resource to be created.
- intervalIn numberMinutes 
- The interval in minutes between two backups. Possible values are between 60 and 1440. Defaults to 240.
- retentionIn numberHours 
- The time in hours that each backup is retained. Possible values are between 8 and 720. Defaults to 8.
- storageRedundancy string
- The storage redundancy is used to indicate the type of backup residency. Possible values are - Geo,- Localand- Zone. Defaults to- Geo.- Note: You can only configure - interval_in_minutes,- retention_in_hoursand- storage_redundancywhen the- typefield is set to- Periodic.
- tier string
- The continuous backup tier. Possible values are Continuous7DaysandContinuous30Days.
- type str
- The type of the - backup. Possible values are- Continuousand- Periodic.- Note: Migration of - Periodicto- Continuousis one-way, changing- Continuousto- Periodicforces a new resource to be created.
- interval_in_ intminutes 
- The interval in minutes between two backups. Possible values are between 60 and 1440. Defaults to 240.
- retention_in_ inthours 
- The time in hours that each backup is retained. Possible values are between 8 and 720. Defaults to 8.
- storage_redundancy str
- The storage redundancy is used to indicate the type of backup residency. Possible values are - Geo,- Localand- Zone. Defaults to- Geo.- Note: You can only configure - interval_in_minutes,- retention_in_hoursand- storage_redundancywhen the- typefield is set to- Periodic.
- tier str
- The continuous backup tier. Possible values are Continuous7DaysandContinuous30Days.
- type String
- The type of the - backup. Possible values are- Continuousand- Periodic.- Note: Migration of - Periodicto- Continuousis one-way, changing- Continuousto- Periodicforces a new resource to be created.
- intervalIn NumberMinutes 
- The interval in minutes between two backups. Possible values are between 60 and 1440. Defaults to 240.
- retentionIn NumberHours 
- The time in hours that each backup is retained. Possible values are between 8 and 720. Defaults to 8.
- storageRedundancy String
- The storage redundancy is used to indicate the type of backup residency. Possible values are - Geo,- Localand- Zone. Defaults to- Geo.- Note: You can only configure - interval_in_minutes,- retention_in_hoursand- storage_redundancywhen the- typefield is set to- Periodic.
- tier String
- The continuous backup tier. Possible values are Continuous7DaysandContinuous30Days.
AccountCapability, AccountCapabilityArgs    
- Name string
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- Name string
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- name String
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- name string
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- name str
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
- name String
- Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
AccountCapacity, AccountCapacityArgs    
- TotalThroughput intLimit 
- The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1.-1means no limit.
- TotalThroughput intLimit 
- The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1.-1means no limit.
- totalThroughput IntegerLimit 
- The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1.-1means no limit.
- totalThroughput numberLimit 
- The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1.-1means no limit.
- total_throughput_ intlimit 
- The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1.-1means no limit.
- totalThroughput NumberLimit 
- The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1.-1means no limit.
AccountConsistencyPolicy, AccountConsistencyPolicyArgs      
- ConsistencyLevel string
- The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness,Eventual,Session,StrongorConsistentPrefix.
- MaxInterval intIn Seconds 
- When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5-86400(1 day). Defaults to5. Required whenconsistency_levelis set toBoundedStaleness.
- MaxStaleness intPrefix 
- When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is - 10–- 2147483647. Defaults to- 100. Required when- consistency_levelis set to- BoundedStaleness.- Note: - max_interval_in_secondsand- max_staleness_prefixcan only be set to values other than default when the- consistency_levelis set to- BoundedStaleness.
- ConsistencyLevel string
- The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness,Eventual,Session,StrongorConsistentPrefix.
- MaxInterval intIn Seconds 
- When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5-86400(1 day). Defaults to5. Required whenconsistency_levelis set toBoundedStaleness.
- MaxStaleness intPrefix 
- When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is - 10–- 2147483647. Defaults to- 100. Required when- consistency_levelis set to- BoundedStaleness.- Note: - max_interval_in_secondsand- max_staleness_prefixcan only be set to values other than default when the- consistency_levelis set to- BoundedStaleness.
- consistencyLevel String
- The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness,Eventual,Session,StrongorConsistentPrefix.
- maxInterval IntegerIn Seconds 
- When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5-86400(1 day). Defaults to5. Required whenconsistency_levelis set toBoundedStaleness.
- maxStaleness IntegerPrefix 
- When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is - 10–- 2147483647. Defaults to- 100. Required when- consistency_levelis set to- BoundedStaleness.- Note: - max_interval_in_secondsand- max_staleness_prefixcan only be set to values other than default when the- consistency_levelis set to- BoundedStaleness.
- consistencyLevel string
- The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness,Eventual,Session,StrongorConsistentPrefix.
- maxInterval numberIn Seconds 
- When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5-86400(1 day). Defaults to5. Required whenconsistency_levelis set toBoundedStaleness.
- maxStaleness numberPrefix 
- When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is - 10–- 2147483647. Defaults to- 100. Required when- consistency_levelis set to- BoundedStaleness.- Note: - max_interval_in_secondsand- max_staleness_prefixcan only be set to values other than default when the- consistency_levelis set to- BoundedStaleness.
- consistency_level str
- The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness,Eventual,Session,StrongorConsistentPrefix.
- max_interval_ intin_ seconds 
- When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5-86400(1 day). Defaults to5. Required whenconsistency_levelis set toBoundedStaleness.
- max_staleness_ intprefix 
- When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is - 10–- 2147483647. Defaults to- 100. Required when- consistency_levelis set to- BoundedStaleness.- Note: - max_interval_in_secondsand- max_staleness_prefixcan only be set to values other than default when the- consistency_levelis set to- BoundedStaleness.
- consistencyLevel String
- The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness,Eventual,Session,StrongorConsistentPrefix.
- maxInterval NumberIn Seconds 
- When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5-86400(1 day). Defaults to5. Required whenconsistency_levelis set toBoundedStaleness.
- maxStaleness NumberPrefix 
- When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is - 10–- 2147483647. Defaults to- 100. Required when- consistency_levelis set to- BoundedStaleness.- Note: - max_interval_in_secondsand- max_staleness_prefixcan only be set to values other than default when the- consistency_levelis set to- BoundedStaleness.
AccountCorsRule, AccountCorsRuleArgs      
- AllowedHeaders List<string>
- A list of headers that are allowed to be a part of the cross-origin request.
- AllowedMethods List<string>
- A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUTorPATCH.
- AllowedOrigins List<string>
- A list of origin domains that will be allowed by CORS.
- ExposedHeaders List<string>
- A list of response headers that are exposed to CORS clients.
- MaxAge intIn Seconds 
- The number of seconds the client should cache a preflight response. Possible values are between 1and2147483647.
- AllowedHeaders []string
- A list of headers that are allowed to be a part of the cross-origin request.
- AllowedMethods []string
- A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUTorPATCH.
- AllowedOrigins []string
- A list of origin domains that will be allowed by CORS.
- ExposedHeaders []string
- A list of response headers that are exposed to CORS clients.
- MaxAge intIn Seconds 
- The number of seconds the client should cache a preflight response. Possible values are between 1and2147483647.
- allowedHeaders List<String>
- A list of headers that are allowed to be a part of the cross-origin request.
- allowedMethods List<String>
- A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUTorPATCH.
- allowedOrigins List<String>
- A list of origin domains that will be allowed by CORS.
- exposedHeaders List<String>
- A list of response headers that are exposed to CORS clients.
- maxAge IntegerIn Seconds 
- The number of seconds the client should cache a preflight response. Possible values are between 1and2147483647.
- allowedHeaders string[]
- A list of headers that are allowed to be a part of the cross-origin request.
- allowedMethods string[]
- A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUTorPATCH.
- allowedOrigins string[]
- A list of origin domains that will be allowed by CORS.
- exposedHeaders string[]
- A list of response headers that are exposed to CORS clients.
- maxAge numberIn Seconds 
- The number of seconds the client should cache a preflight response. Possible values are between 1and2147483647.
- allowed_headers Sequence[str]
- A list of headers that are allowed to be a part of the cross-origin request.
- allowed_methods Sequence[str]
- A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUTorPATCH.
- allowed_origins Sequence[str]
- A list of origin domains that will be allowed by CORS.
- exposed_headers Sequence[str]
- A list of response headers that are exposed to CORS clients.
- max_age_ intin_ seconds 
- The number of seconds the client should cache a preflight response. Possible values are between 1and2147483647.
- allowedHeaders List<String>
- A list of headers that are allowed to be a part of the cross-origin request.
- allowedMethods List<String>
- A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUTorPATCH.
- allowedOrigins List<String>
- A list of origin domains that will be allowed by CORS.
- exposedHeaders List<String>
- A list of response headers that are exposed to CORS clients.
- maxAge NumberIn Seconds 
- The number of seconds the client should cache a preflight response. Possible values are between 1and2147483647.
AccountGeoLocation, AccountGeoLocationArgs      
- FailoverPriority int
- The failover priority of the region. A failover priority of 0indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0.
- Location string
- The name of the Azure region to host replicated data.
- Id string
- The CosmosDB Account ID.
- ZoneRedundant bool
- Should zone redundancy be enabled for this region? Defaults to false.
- FailoverPriority int
- The failover priority of the region. A failover priority of 0indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0.
- Location string
- The name of the Azure region to host replicated data.
- Id string
- The CosmosDB Account ID.
- ZoneRedundant bool
- Should zone redundancy be enabled for this region? Defaults to false.
- failoverPriority Integer
- The failover priority of the region. A failover priority of 0indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0.
- location String
- The name of the Azure region to host replicated data.
- id String
- The CosmosDB Account ID.
- zoneRedundant Boolean
- Should zone redundancy be enabled for this region? Defaults to false.
- failoverPriority number
- The failover priority of the region. A failover priority of 0indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0.
- location string
- The name of the Azure region to host replicated data.
- id string
- The CosmosDB Account ID.
- zoneRedundant boolean
- Should zone redundancy be enabled for this region? Defaults to false.
- failover_priority int
- The failover priority of the region. A failover priority of 0indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0.
- location str
- The name of the Azure region to host replicated data.
- id str
- The CosmosDB Account ID.
- zone_redundant bool
- Should zone redundancy be enabled for this region? Defaults to false.
- failoverPriority Number
- The failover priority of the region. A failover priority of 0indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority0.
- location String
- The name of the Azure region to host replicated data.
- id String
- The CosmosDB Account ID.
- zoneRedundant Boolean
- Should zone redundancy be enabled for this region? Defaults to false.
AccountIdentity, AccountIdentityArgs    
- Type string
- The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned,UserAssignedandSystemAssigned, UserAssigned.
- IdentityIds List<string>
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- PrincipalId string
- The Principal ID associated with this Managed Service Identity.
- TenantId string
- The Tenant ID associated with this Managed Service Identity.
- Type string
- The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned,UserAssignedandSystemAssigned, UserAssigned.
- IdentityIds []string
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- PrincipalId string
- The Principal ID associated with this Managed Service Identity.
- TenantId string
- The Tenant ID associated with this Managed Service Identity.
- type String
- The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned,UserAssignedandSystemAssigned, UserAssigned.
- identityIds List<String>
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- principalId String
- The Principal ID associated with this Managed Service Identity.
- tenantId String
- The Tenant ID associated with this Managed Service Identity.
- type string
- The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned,UserAssignedandSystemAssigned, UserAssigned.
- identityIds string[]
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- principalId string
- The Principal ID associated with this Managed Service Identity.
- tenantId string
- The Tenant ID associated with this Managed Service Identity.
- type str
- The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned,UserAssignedandSystemAssigned, UserAssigned.
- identity_ids Sequence[str]
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- principal_id str
- The Principal ID associated with this Managed Service Identity.
- tenant_id str
- The Tenant ID associated with this Managed Service Identity.
- type String
- The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned,UserAssignedandSystemAssigned, UserAssigned.
- identityIds List<String>
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account.
- principalId String
- The Principal ID associated with this Managed Service Identity.
- tenantId String
- The Tenant ID associated with this Managed Service Identity.
AccountRestore, AccountRestoreArgs    
- RestoreTimestamp stringIn Utc 
- The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created.
- SourceCosmosdb stringAccount Id 
- The resource ID of the restorable database account from which the restore has to be initiated. The example is - /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created.- Note: Any database account with - Continuoustype (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by- azure.cosmosdb.getRestorableDatabaseAccounts.
- Databases
List<AccountRestore Database> 
- A databaseblock as defined below. Changing this forces a new resource to be created.
- GremlinDatabases List<AccountRestore Gremlin Database> 
- One or more gremlin_databaseblocks as defined below. Changing this forces a new resource to be created.
- TablesTo List<string>Restores 
- A list of specific tables available for restore. Changing this forces a new resource to be created.
- RestoreTimestamp stringIn Utc 
- The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created.
- SourceCosmosdb stringAccount Id 
- The resource ID of the restorable database account from which the restore has to be initiated. The example is - /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created.- Note: Any database account with - Continuoustype (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by- azure.cosmosdb.getRestorableDatabaseAccounts.
- Databases
[]AccountRestore Database 
- A databaseblock as defined below. Changing this forces a new resource to be created.
- GremlinDatabases []AccountRestore Gremlin Database 
- One or more gremlin_databaseblocks as defined below. Changing this forces a new resource to be created.
- TablesTo []stringRestores 
- A list of specific tables available for restore. Changing this forces a new resource to be created.
- restoreTimestamp StringIn Utc 
- The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created.
- sourceCosmosdb StringAccount Id 
- The resource ID of the restorable database account from which the restore has to be initiated. The example is - /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created.- Note: Any database account with - Continuoustype (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by- azure.cosmosdb.getRestorableDatabaseAccounts.
- databases
List<AccountRestore Database> 
- A databaseblock as defined below. Changing this forces a new resource to be created.
- gremlinDatabases List<AccountRestore Gremlin Database> 
- One or more gremlin_databaseblocks as defined below. Changing this forces a new resource to be created.
- tablesTo List<String>Restores 
- A list of specific tables available for restore. Changing this forces a new resource to be created.
- restoreTimestamp stringIn Utc 
- The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created.
- sourceCosmosdb stringAccount Id 
- The resource ID of the restorable database account from which the restore has to be initiated. The example is - /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created.- Note: Any database account with - Continuoustype (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by- azure.cosmosdb.getRestorableDatabaseAccounts.
- databases
AccountRestore Database[] 
- A databaseblock as defined below. Changing this forces a new resource to be created.
- gremlinDatabases AccountRestore Gremlin Database[] 
- One or more gremlin_databaseblocks as defined below. Changing this forces a new resource to be created.
- tablesTo string[]Restores 
- A list of specific tables available for restore. Changing this forces a new resource to be created.
- restore_timestamp_ strin_ utc 
- The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created.
- source_cosmosdb_ straccount_ id 
- The resource ID of the restorable database account from which the restore has to be initiated. The example is - /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created.- Note: Any database account with - Continuoustype (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by- azure.cosmosdb.getRestorableDatabaseAccounts.
- databases
Sequence[AccountRestore Database] 
- A databaseblock as defined below. Changing this forces a new resource to be created.
- gremlin_databases Sequence[AccountRestore Gremlin Database] 
- One or more gremlin_databaseblocks as defined below. Changing this forces a new resource to be created.
- tables_to_ Sequence[str]restores 
- A list of specific tables available for restore. Changing this forces a new resource to be created.
- restoreTimestamp StringIn Utc 
- The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created.
- sourceCosmosdb StringAccount Id 
- The resource ID of the restorable database account from which the restore has to be initiated. The example is - /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created.- Note: Any database account with - Continuoustype (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by- azure.cosmosdb.getRestorableDatabaseAccounts.
- databases List<Property Map>
- A databaseblock as defined below. Changing this forces a new resource to be created.
- gremlinDatabases List<Property Map>
- One or more gremlin_databaseblocks as defined below. Changing this forces a new resource to be created.
- tablesTo List<String>Restores 
- A list of specific tables available for restore. Changing this forces a new resource to be created.
AccountRestoreDatabase, AccountRestoreDatabaseArgs      
- Name string
- The database name for the restore request. Changing this forces a new resource to be created.
- CollectionNames List<string>
- A list of the collection names for the restore request. Changing this forces a new resource to be created.
- Name string
- The database name for the restore request. Changing this forces a new resource to be created.
- CollectionNames []string
- A list of the collection names for the restore request. Changing this forces a new resource to be created.
- name String
- The database name for the restore request. Changing this forces a new resource to be created.
- collectionNames List<String>
- A list of the collection names for the restore request. Changing this forces a new resource to be created.
- name string
- The database name for the restore request. Changing this forces a new resource to be created.
- collectionNames string[]
- A list of the collection names for the restore request. Changing this forces a new resource to be created.
- name str
- The database name for the restore request. Changing this forces a new resource to be created.
- collection_names Sequence[str]
- A list of the collection names for the restore request. Changing this forces a new resource to be created.
- name String
- The database name for the restore request. Changing this forces a new resource to be created.
- collectionNames List<String>
- A list of the collection names for the restore request. Changing this forces a new resource to be created.
AccountRestoreGremlinDatabase, AccountRestoreGremlinDatabaseArgs        
- Name string
- The Gremlin Database name for the restore request. Changing this forces a new resource to be created.
- GraphNames List<string>
- A list of the Graph names for the restore request. Changing this forces a new resource to be created.
- Name string
- The Gremlin Database name for the restore request. Changing this forces a new resource to be created.
- GraphNames []string
- A list of the Graph names for the restore request. Changing this forces a new resource to be created.
- name String
- The Gremlin Database name for the restore request. Changing this forces a new resource to be created.
- graphNames List<String>
- A list of the Graph names for the restore request. Changing this forces a new resource to be created.
- name string
- The Gremlin Database name for the restore request. Changing this forces a new resource to be created.
- graphNames string[]
- A list of the Graph names for the restore request. Changing this forces a new resource to be created.
- name str
- The Gremlin Database name for the restore request. Changing this forces a new resource to be created.
- graph_names Sequence[str]
- A list of the Graph names for the restore request. Changing this forces a new resource to be created.
- name String
- The Gremlin Database name for the restore request. Changing this forces a new resource to be created.
- graphNames List<String>
- A list of the Graph names for the restore request. Changing this forces a new resource to be created.
AccountVirtualNetworkRule, AccountVirtualNetworkRuleArgs        
- Id string
- The ID of the virtual network subnet.
- IgnoreMissing boolVnet Service Endpoint 
- If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false.
- Id string
- The ID of the virtual network subnet.
- IgnoreMissing boolVnet Service Endpoint 
- If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false.
- id String
- The ID of the virtual network subnet.
- ignoreMissing BooleanVnet Service Endpoint 
- If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false.
- id string
- The ID of the virtual network subnet.
- ignoreMissing booleanVnet Service Endpoint 
- If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false.
- id str
- The ID of the virtual network subnet.
- ignore_missing_ boolvnet_ service_ endpoint 
- If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false.
- id String
- The ID of the virtual network subnet.
- ignoreMissing BooleanVnet Service Endpoint 
- If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.