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

com.pulumi.azure.cosmosdb.kotlin.AccountArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.cosmosdb.kotlin

import com.pulumi.azure.cosmosdb.AccountArgs.builder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountAnalyticalStorageArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountAnalyticalStorageArgsBuilder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountBackupArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountBackupArgsBuilder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountCapabilityArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountCapabilityArgsBuilder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountCapacityArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountCapacityArgsBuilder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountConsistencyPolicyArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountConsistencyPolicyArgsBuilder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountCorsRuleArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountCorsRuleArgsBuilder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountGeoLocationArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountGeoLocationArgsBuilder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountIdentityArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountIdentityArgsBuilder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountRestoreArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountRestoreArgsBuilder
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountVirtualNetworkRuleArgs
import com.pulumi.azure.cosmosdb.kotlin.inputs.AccountVirtualNetworkRuleArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a CosmosDB (formally DocumentDB) Account.
 * ## Example Usage
 * 
 * ```typescript
 * 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",
 *     enableAutomaticFailover: 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,
 *         },
 *     ],
 * });
 * ```
 * ```python
 * 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",
 *     enable_automatic_failover=True,
 *     capabilities=[
 *         azure.cosmosdb.AccountCapabilityArgs(
 *             name="EnableAggregationPipeline",
 *         ),
 *         azure.cosmosdb.AccountCapabilityArgs(
 *             name="mongoEnableDocLevelTTL",
 *         ),
 *         azure.cosmosdb.AccountCapabilityArgs(
 *             name="MongoDBv3.4",
 *         ),
 *         azure.cosmosdb.AccountCapabilityArgs(
 *             name="EnableMongo",
 *         ),
 *     ],
 *     consistency_policy=azure.cosmosdb.AccountConsistencyPolicyArgs(
 *         consistency_level="BoundedStaleness",
 *         max_interval_in_seconds=300,
 *         max_staleness_prefix=100000,
 *     ),
 *     geo_locations=[
 *         azure.cosmosdb.AccountGeoLocationArgs(
 *             location="eastus",
 *             failover_priority=1,
 *         ),
 *         azure.cosmosdb.AccountGeoLocationArgs(
 *             location="westus",
 *             failover_priority=0,
 *         ),
 *     ])
 * ```
 * ```csharp
 * 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",
 *         EnableAutomaticFailover = 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,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/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"),
 * 			EnableAutomaticFailover: 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
 * 	})
 * }
 * ```
 * ```java
 * 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")
 *             .enableAutomaticFailover(true)
 *             .capabilities(
 *                 AccountCapabilityArgs.builder()
 *                     .name("EnableAggregationPipeline")
 *                     .build(),
 *                 AccountCapabilityArgs.builder()
 *                     .name("mongoEnableDocLevelTTL")
 *                     .build(),
 *                 AccountCapabilityArgs.builder()
 *                     .name("MongoDBv3.4")
 *                     .build(),
 *                 AccountCapabilityArgs.builder()
 *                     .name("EnableMongo")
 *                     .build())
 *             .consistencyPolicy(AccountConsistencyPolicyArgs.builder()
 *                 .consistencyLevel("BoundedStaleness")
 *                 .maxIntervalInSeconds(300)
 *                 .maxStalenessPrefix(100000)
 *                 .build())
 *             .geoLocations(
 *                 AccountGeoLocationArgs.builder()
 *                     .location("eastus")
 *                     .failoverPriority(1)
 *                     .build(),
 *                 AccountGeoLocationArgs.builder()
 *                     .location("westus")
 *                     .failoverPriority(0)
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 *       enableAutomaticFailover: 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
 * 
 * ```typescript
 * 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],
 *     },
 * });
 * ```
 * ```python
 * 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=[azure.cosmosdb.AccountCapabilityArgs(
 *         name="EnableMongo",
 *     )],
 *     consistency_policy=azure.cosmosdb.AccountConsistencyPolicyArgs(
 *         consistency_level="Strong",
 *     ),
 *     geo_locations=[azure.cosmosdb.AccountGeoLocationArgs(
 *         location="westus",
 *         failover_priority=0,
 *     )],
 *     identity=azure.cosmosdb.AccountIdentityArgs(
 *         type="UserAssigned",
 *         identity_ids=[example.id],
 *     ))
 * ```
 * ```csharp
 * 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,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/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: 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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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}
 * ```
 * 
 * ## Import
 * CosmosDB Accounts can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:cosmosdb/account:Account account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1
 * ```
 * @property accessKeyMetadataWritesEnabled
 * @property analyticalStorage An `analytical_storage` block as defined below.
 * @property analyticalStorageEnabled
 * @property automaticFailoverEnabled
 * @property backup
 * @property capabilities
 * @property capacity A `capacity` block as defined below.
 * @property consistencyPolicy
 * @property corsRule
 * @property createMode The creation mode for the CosmosDB Account. Possible values are `Default` and `Restore`. Changing this forces a new resource to be created.
 * > **Note:** `create_mode` can only be defined when the `backup.type` is set to `Continuous`.
 * @property defaultIdentityType The default identity for accessing Key Vault. Possible values are `FirstPartyIdentity`, `SystemAssignedIdentity` or `UserAssignedIdentity`. Defaults to `FirstPartyIdentity`.
 * @property enableAutomaticFailover
 * @property enableFreeTier
 * @property enableMultipleWriteLocations
 * @property freeTierEnabled
 * @property geoLocations
 * @property identity
 * @property ipRangeFilter
 * @property isVirtualNetworkFilterEnabled
 * @property keyVaultKeyId
 * @property kind
 * @property localAuthenticationDisabled
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property minimalTlsVersion Specifies the minimal TLS version for the CosmosDB account. Possible values are: `Tls`, `Tls11`, and `Tls12`. Defaults to `Tls12`.
 * @property mongoServerVersion
 * @property multipleWriteLocationsEnabled
 * @property name Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
 * @property networkAclBypassForAzureServices
 * @property networkAclBypassIds
 * @property offerType Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to `Standard`.
 * @property partitionMergeEnabled
 * @property publicNetworkAccessEnabled
 * @property resourceGroupName The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
 * @property restore
 * @property tags A mapping of tags to assign to the resource.
 * @property virtualNetworkRules
 */
public data class AccountArgs(
    public val accessKeyMetadataWritesEnabled: Output? = null,
    public val analyticalStorage: Output? = null,
    public val analyticalStorageEnabled: Output? = null,
    public val automaticFailoverEnabled: Output? = null,
    public val backup: Output? = null,
    public val capabilities: Output>? = null,
    public val capacity: Output? = null,
    public val consistencyPolicy: Output? = null,
    public val corsRule: Output? = null,
    public val createMode: Output? = null,
    public val defaultIdentityType: Output? = null,
    @Deprecated(
        message = """
  This property has been superseded by `automatic_failover_enabled` and will be removed in v4.0 of
      the AzureRM Provider
  """,
    )
    public val enableAutomaticFailover: Output? = null,
    @Deprecated(
        message = """
  This property has been superseded by `free_tier_enabled` and will be removed in v4.0 of the
      AzureRM Provider
  """,
    )
    public val enableFreeTier: Output? = null,
    @Deprecated(
        message = """
  This property has been superseded by `multiple_write_locations_enabled` and will be removed in
      v4.0 of the AzureRM Provider
  """,
    )
    public val enableMultipleWriteLocations: Output? = null,
    public val freeTierEnabled: Output? = null,
    public val geoLocations: Output>? = null,
    public val identity: Output? = null,
    public val ipRangeFilter: Output? = null,
    public val isVirtualNetworkFilterEnabled: Output? = null,
    public val keyVaultKeyId: Output? = null,
    public val kind: Output? = null,
    public val localAuthenticationDisabled: Output? = null,
    public val location: Output? = null,
    public val minimalTlsVersion: Output? = null,
    public val mongoServerVersion: Output? = null,
    public val multipleWriteLocationsEnabled: Output? = null,
    public val name: Output? = null,
    public val networkAclBypassForAzureServices: Output? = null,
    public val networkAclBypassIds: Output>? = null,
    public val offerType: Output? = null,
    public val partitionMergeEnabled: Output? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val resourceGroupName: Output? = null,
    public val restore: Output? = null,
    public val tags: Output>? = null,
    public val virtualNetworkRules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cosmosdb.AccountArgs =
        com.pulumi.azure.cosmosdb.AccountArgs.builder()
            .accessKeyMetadataWritesEnabled(accessKeyMetadataWritesEnabled?.applyValue({ args0 -> args0 }))
            .analyticalStorage(analyticalStorage?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .analyticalStorageEnabled(analyticalStorageEnabled?.applyValue({ args0 -> args0 }))
            .automaticFailoverEnabled(automaticFailoverEnabled?.applyValue({ args0 -> args0 }))
            .backup(backup?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .capabilities(
                capabilities?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .capacity(capacity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .consistencyPolicy(consistencyPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .corsRule(corsRule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .createMode(createMode?.applyValue({ args0 -> args0 }))
            .defaultIdentityType(defaultIdentityType?.applyValue({ args0 -> args0 }))
            .enableAutomaticFailover(enableAutomaticFailover?.applyValue({ args0 -> args0 }))
            .enableFreeTier(enableFreeTier?.applyValue({ args0 -> args0 }))
            .enableMultipleWriteLocations(enableMultipleWriteLocations?.applyValue({ args0 -> args0 }))
            .freeTierEnabled(freeTierEnabled?.applyValue({ args0 -> args0 }))
            .geoLocations(
                geoLocations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ipRangeFilter(ipRangeFilter?.applyValue({ args0 -> args0 }))
            .isVirtualNetworkFilterEnabled(isVirtualNetworkFilterEnabled?.applyValue({ args0 -> args0 }))
            .keyVaultKeyId(keyVaultKeyId?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .localAuthenticationDisabled(localAuthenticationDisabled?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .minimalTlsVersion(minimalTlsVersion?.applyValue({ args0 -> args0 }))
            .mongoServerVersion(mongoServerVersion?.applyValue({ args0 -> args0 }))
            .multipleWriteLocationsEnabled(multipleWriteLocationsEnabled?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkAclBypassForAzureServices(networkAclBypassForAzureServices?.applyValue({ args0 -> args0 }))
            .networkAclBypassIds(networkAclBypassIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .offerType(offerType?.applyValue({ args0 -> args0 }))
            .partitionMergeEnabled(partitionMergeEnabled?.applyValue({ args0 -> args0 }))
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .restore(restore?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .virtualNetworkRules(
                virtualNetworkRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [AccountArgs].
 */
@PulumiTagMarker
public class AccountArgsBuilder internal constructor() {
    private var accessKeyMetadataWritesEnabled: Output? = null

    private var analyticalStorage: Output? = null

    private var analyticalStorageEnabled: Output? = null

    private var automaticFailoverEnabled: Output? = null

    private var backup: Output? = null

    private var capabilities: Output>? = null

    private var capacity: Output? = null

    private var consistencyPolicy: Output? = null

    private var corsRule: Output? = null

    private var createMode: Output? = null

    private var defaultIdentityType: Output? = null

    private var enableAutomaticFailover: Output? = null

    private var enableFreeTier: Output? = null

    private var enableMultipleWriteLocations: Output? = null

    private var freeTierEnabled: Output? = null

    private var geoLocations: Output>? = null

    private var identity: Output? = null

    private var ipRangeFilter: Output? = null

    private var isVirtualNetworkFilterEnabled: Output? = null

    private var keyVaultKeyId: Output? = null

    private var kind: Output? = null

    private var localAuthenticationDisabled: Output? = null

    private var location: Output? = null

    private var minimalTlsVersion: Output? = null

    private var mongoServerVersion: Output? = null

    private var multipleWriteLocationsEnabled: Output? = null

    private var name: Output? = null

    private var networkAclBypassForAzureServices: Output? = null

    private var networkAclBypassIds: Output>? = null

    private var offerType: Output? = null

    private var partitionMergeEnabled: Output? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var resourceGroupName: Output? = null

    private var restore: Output? = null

    private var tags: Output>? = null

    private var virtualNetworkRules: Output>? = null

    /**
     * @param value
     */
    @JvmName("newsnrobwhtmtfsg")
    public suspend fun accessKeyMetadataWritesEnabled(`value`: Output) {
        this.accessKeyMetadataWritesEnabled = value
    }

    /**
     * @param value An `analytical_storage` block as defined below.
     */
    @JvmName("pqabckbnfrsjebrc")
    public suspend fun analyticalStorage(`value`: Output) {
        this.analyticalStorage = value
    }

    /**
     * @param value
     */
    @JvmName("klwgsudcimpdjeye")
    public suspend fun analyticalStorageEnabled(`value`: Output) {
        this.analyticalStorageEnabled = value
    }

    /**
     * @param value
     */
    @JvmName("unxdgxsuofurphtm")
    public suspend fun automaticFailoverEnabled(`value`: Output) {
        this.automaticFailoverEnabled = value
    }

    /**
     * @param value
     */
    @JvmName("dbgvniltsjuyumxr")
    public suspend fun backup(`value`: Output) {
        this.backup = value
    }

    /**
     * @param value
     */
    @JvmName("aurqagauleajmcie")
    public suspend fun capabilities(`value`: Output>) {
        this.capabilities = value
    }

    @JvmName("ksnyqyjldtpiixuh")
    public suspend fun capabilities(vararg values: Output) {
        this.capabilities = Output.all(values.asList())
    }

    /**
     * @param values
     */
    @JvmName("sevcgsfciubdwupw")
    public suspend fun capabilities(values: List>) {
        this.capabilities = Output.all(values)
    }

    /**
     * @param value A `capacity` block as defined below.
     */
    @JvmName("ppqnapmtnbxgetjn")
    public suspend fun capacity(`value`: Output) {
        this.capacity = value
    }

    /**
     * @param value
     */
    @JvmName("gitnoswahnxhwegs")
    public suspend fun consistencyPolicy(`value`: Output) {
        this.consistencyPolicy = value
    }

    /**
     * @param value
     */
    @JvmName("biupjinjalejjfxq")
    public suspend fun corsRule(`value`: Output) {
        this.corsRule = value
    }

    /**
     * @param value The creation mode for the CosmosDB Account. Possible values are `Default` and `Restore`. Changing this forces a new resource to be created.
     * > **Note:** `create_mode` can only be defined when the `backup.type` is set to `Continuous`.
     */
    @JvmName("nnpfgctytqnljkte")
    public suspend fun createMode(`value`: Output) {
        this.createMode = value
    }

    /**
     * @param value The default identity for accessing Key Vault. Possible values are `FirstPartyIdentity`, `SystemAssignedIdentity` or `UserAssignedIdentity`. Defaults to `FirstPartyIdentity`.
     */
    @JvmName("bnakhoslyigiinly")
    public suspend fun defaultIdentityType(`value`: Output) {
        this.defaultIdentityType = value
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  This property has been superseded by `automatic_failover_enabled` and will be removed in v4.0 of
      the AzureRM Provider
  """,
    )
    @JvmName("wfsmawsakhagpdpn")
    public suspend fun enableAutomaticFailover(`value`: Output) {
        this.enableAutomaticFailover = value
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  This property has been superseded by `free_tier_enabled` and will be removed in v4.0 of the
      AzureRM Provider
  """,
    )
    @JvmName("peigprcnixqrdcvs")
    public suspend fun enableFreeTier(`value`: Output) {
        this.enableFreeTier = value
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  This property has been superseded by `multiple_write_locations_enabled` and will be removed in
      v4.0 of the AzureRM Provider
  """,
    )
    @JvmName("amkmbqpalrrpjrqr")
    public suspend fun enableMultipleWriteLocations(`value`: Output) {
        this.enableMultipleWriteLocations = value
    }

    /**
     * @param value
     */
    @JvmName("ukrwlsglhyfhsbxd")
    public suspend fun freeTierEnabled(`value`: Output) {
        this.freeTierEnabled = value
    }

    /**
     * @param value
     */
    @JvmName("ddmufbgcfgcqqwqy")
    public suspend fun geoLocations(`value`: Output>) {
        this.geoLocations = value
    }

    @JvmName("vdlqsmsgqaiyefxj")
    public suspend fun geoLocations(vararg values: Output) {
        this.geoLocations = Output.all(values.asList())
    }

    /**
     * @param values
     */
    @JvmName("siotfybgaitctwoi")
    public suspend fun geoLocations(values: List>) {
        this.geoLocations = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("kfqeyklsnensaqsi")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value
     */
    @JvmName("niqvybsssqfehefp")
    public suspend fun ipRangeFilter(`value`: Output) {
        this.ipRangeFilter = value
    }

    /**
     * @param value
     */
    @JvmName("acxwuijdgaajecmb")
    public suspend fun isVirtualNetworkFilterEnabled(`value`: Output) {
        this.isVirtualNetworkFilterEnabled = value
    }

    /**
     * @param value
     */
    @JvmName("xtvfrcytotqckbpe")
    public suspend fun keyVaultKeyId(`value`: Output) {
        this.keyVaultKeyId = value
    }

    /**
     * @param value
     */
    @JvmName("xamjlimwkiukhakh")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value
     */
    @JvmName("grchtjpmyfpmsjel")
    public suspend fun localAuthenticationDisabled(`value`: Output) {
        this.localAuthenticationDisabled = value
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("ikttkylabxasonqe")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Specifies the minimal TLS version for the CosmosDB account. Possible values are: `Tls`, `Tls11`, and `Tls12`. Defaults to `Tls12`.
     */
    @JvmName("xwcujvdkmuyqnfsb")
    public suspend fun minimalTlsVersion(`value`: Output) {
        this.minimalTlsVersion = value
    }

    /**
     * @param value
     */
    @JvmName("vfwagbdjeblepbjh")
    public suspend fun mongoServerVersion(`value`: Output) {
        this.mongoServerVersion = value
    }

    /**
     * @param value
     */
    @JvmName("ycjvioxvaurysauo")
    public suspend fun multipleWriteLocationsEnabled(`value`: Output) {
        this.multipleWriteLocationsEnabled = value
    }

    /**
     * @param value Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
     */
    @JvmName("wrikyiodqactqsrc")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @JvmName("yoqwfkbxgdogtaud")
    public suspend fun networkAclBypassForAzureServices(`value`: Output) {
        this.networkAclBypassForAzureServices = value
    }

    /**
     * @param value
     */
    @JvmName("ebbslcaxdwsdlbco")
    public suspend fun networkAclBypassIds(`value`: Output>) {
        this.networkAclBypassIds = value
    }

    @JvmName("ixwndrenltxcygru")
    public suspend fun networkAclBypassIds(vararg values: Output) {
        this.networkAclBypassIds = Output.all(values.asList())
    }

    /**
     * @param values
     */
    @JvmName("cwgstpexxlfsppuv")
    public suspend fun networkAclBypassIds(values: List>) {
        this.networkAclBypassIds = Output.all(values)
    }

    /**
     * @param value Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to `Standard`.
     */
    @JvmName("aqaampvjgcapwxje")
    public suspend fun offerType(`value`: Output) {
        this.offerType = value
    }

    /**
     * @param value
     */
    @JvmName("ruaoayuuxmvfimgk")
    public suspend fun partitionMergeEnabled(`value`: Output) {
        this.partitionMergeEnabled = value
    }

    /**
     * @param value
     */
    @JvmName("kedqkyyedjilaese")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

    /**
     * @param value The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
     */
    @JvmName("iscmtxtjslyxprwm")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value
     */
    @JvmName("kpmsekqhrcvapuht")
    public suspend fun restore(`value`: Output) {
        this.restore = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("xosptkdmjrvbakhr")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value
     */
    @JvmName("dtmluymivyvostej")
    public suspend fun virtualNetworkRules(`value`: Output>) {
        this.virtualNetworkRules = value
    }

    @JvmName("gmnerikgewdvqtjk")
    public suspend fun virtualNetworkRules(vararg values: Output) {
        this.virtualNetworkRules = Output.all(values.asList())
    }

    /**
     * @param values
     */
    @JvmName("gdtccedccnqhmslu")
    public suspend fun virtualNetworkRules(values: List>) {
        this.virtualNetworkRules = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("wraitqwkqpwqwaao")
    public suspend fun accessKeyMetadataWritesEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessKeyMetadataWritesEnabled = mapped
    }

    /**
     * @param value An `analytical_storage` block as defined below.
     */
    @JvmName("ylktvbvnjyktines")
    public suspend fun analyticalStorage(`value`: AccountAnalyticalStorageArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.analyticalStorage = mapped
    }

    /**
     * @param argument An `analytical_storage` block as defined below.
     */
    @JvmName("vkptameoyiklapgo")
    public suspend
    fun analyticalStorage(argument: suspend AccountAnalyticalStorageArgsBuilder.() -> Unit) {
        val toBeMapped = AccountAnalyticalStorageArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.analyticalStorage = mapped
    }

    /**
     * @param value
     */
    @JvmName("jgykvslvphtdsxym")
    public suspend fun analyticalStorageEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.analyticalStorageEnabled = mapped
    }

    /**
     * @param value
     */
    @JvmName("hngktmmpassylpvg")
    public suspend fun automaticFailoverEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.automaticFailoverEnabled = mapped
    }

    /**
     * @param value
     */
    @JvmName("ldympyhagowyxiip")
    public suspend fun backup(`value`: AccountBackupArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backup = mapped
    }

    /**
     * @param argument
     */
    @JvmName("ippbadxxgsfqxmga")
    public suspend fun backup(argument: suspend AccountBackupArgsBuilder.() -> Unit) {
        val toBeMapped = AccountBackupArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.backup = mapped
    }

    /**
     * @param value
     */
    @JvmName("fdikwgwweltqpolf")
    public suspend fun capabilities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capabilities = mapped
    }

    /**
     * @param argument
     */
    @JvmName("dhqgrkdpbrnseiwk")
    public suspend fun capabilities(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccountCapabilityArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.capabilities = mapped
    }

    /**
     * @param argument
     */
    @JvmName("nkaffamvvcwjmpkm")
    public suspend fun capabilities(
        vararg
        argument: suspend AccountCapabilityArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AccountCapabilityArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.capabilities = mapped
    }

    /**
     * @param argument
     */
    @JvmName("fipypfahqfjkeuxn")
    public suspend fun capabilities(argument: suspend AccountCapabilityArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AccountCapabilityArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.capabilities = mapped
    }

    /**
     * @param values
     */
    @JvmName("pdpgyiawxfokolgj")
    public suspend fun capabilities(vararg values: AccountCapabilityArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.capabilities = mapped
    }

    /**
     * @param value A `capacity` block as defined below.
     */
    @JvmName("dqqcmbbxltvjahds")
    public suspend fun capacity(`value`: AccountCapacityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacity = mapped
    }

    /**
     * @param argument A `capacity` block as defined below.
     */
    @JvmName("wdkhihgjidyottpf")
    public suspend fun capacity(argument: suspend AccountCapacityArgsBuilder.() -> Unit) {
        val toBeMapped = AccountCapacityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.capacity = mapped
    }

    /**
     * @param value
     */
    @JvmName("hfgroaxcqtghqajh")
    public suspend fun consistencyPolicy(`value`: AccountConsistencyPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.consistencyPolicy = mapped
    }

    /**
     * @param argument
     */
    @JvmName("xgxdhsrnpfxreuix")
    public suspend
    fun consistencyPolicy(argument: suspend AccountConsistencyPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = AccountConsistencyPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.consistencyPolicy = mapped
    }

    /**
     * @param value
     */
    @JvmName("pdwdiichdcughykf")
    public suspend fun corsRule(`value`: AccountCorsRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.corsRule = mapped
    }

    /**
     * @param argument
     */
    @JvmName("wcmwemiaxabbgcuu")
    public suspend fun corsRule(argument: suspend AccountCorsRuleArgsBuilder.() -> Unit) {
        val toBeMapped = AccountCorsRuleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.corsRule = mapped
    }

    /**
     * @param value The creation mode for the CosmosDB Account. Possible values are `Default` and `Restore`. Changing this forces a new resource to be created.
     * > **Note:** `create_mode` can only be defined when the `backup.type` is set to `Continuous`.
     */
    @JvmName("xywyogbqkuctvxbm")
    public suspend fun createMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.createMode = mapped
    }

    /**
     * @param value The default identity for accessing Key Vault. Possible values are `FirstPartyIdentity`, `SystemAssignedIdentity` or `UserAssignedIdentity`. Defaults to `FirstPartyIdentity`.
     */
    @JvmName("rugbjtqotlbbxyuh")
    public suspend fun defaultIdentityType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultIdentityType = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  This property has been superseded by `automatic_failover_enabled` and will be removed in v4.0 of
      the AzureRM Provider
  """,
    )
    @JvmName("wuimmnygjcmhkyjd")
    public suspend fun enableAutomaticFailover(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableAutomaticFailover = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  This property has been superseded by `free_tier_enabled` and will be removed in v4.0 of the
      AzureRM Provider
  """,
    )
    @JvmName("ejqwoflvkjvxmyka")
    public suspend fun enableFreeTier(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableFreeTier = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  This property has been superseded by `multiple_write_locations_enabled` and will be removed in
      v4.0 of the AzureRM Provider
  """,
    )
    @JvmName("hywyjyveixvhokwx")
    public suspend fun enableMultipleWriteLocations(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableMultipleWriteLocations = mapped
    }

    /**
     * @param value
     */
    @JvmName("jjdlycdgjhqcmrlc")
    public suspend fun freeTierEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.freeTierEnabled = mapped
    }

    /**
     * @param value
     */
    @JvmName("oxgqwomnnvyamhxh")
    public suspend fun geoLocations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.geoLocations = mapped
    }

    /**
     * @param argument
     */
    @JvmName("sretybfgrtdwxwek")
    public suspend
    fun geoLocations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccountGeoLocationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.geoLocations = mapped
    }

    /**
     * @param argument
     */
    @JvmName("jqykrkglmywxtqcs")
    public suspend fun geoLocations(
        vararg
        argument: suspend AccountGeoLocationArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AccountGeoLocationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.geoLocations = mapped
    }

    /**
     * @param argument
     */
    @JvmName("ggirbruawgrrmnhl")
    public suspend fun geoLocations(argument: suspend AccountGeoLocationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AccountGeoLocationArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.geoLocations = mapped
    }

    /**
     * @param values
     */
    @JvmName("iegwdtaqlnjlvhyf")
    public suspend fun geoLocations(vararg values: AccountGeoLocationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.geoLocations = mapped
    }

    /**
     * @param value
     */
    @JvmName("hdearmtonhhhiqjt")
    public suspend fun identity(`value`: AccountIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument
     */
    @JvmName("vghocofrcrdyighd")
    public suspend fun identity(argument: suspend AccountIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = AccountIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value
     */
    @JvmName("oaruupeqyfkurpot")
    public suspend fun ipRangeFilter(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipRangeFilter = mapped
    }

    /**
     * @param value
     */
    @JvmName("nqqukeoweylpujpn")
    public suspend fun isVirtualNetworkFilterEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isVirtualNetworkFilterEnabled = mapped
    }

    /**
     * @param value
     */
    @JvmName("dmefvcyxofbwlgkc")
    public suspend fun keyVaultKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultKeyId = mapped
    }

    /**
     * @param value
     */
    @JvmName("nbpjkvvkhqwbtcbl")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value
     */
    @JvmName("djpvamdmpxulpwse")
    public suspend fun localAuthenticationDisabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.localAuthenticationDisabled = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("lnwvxuyonlnmwsed")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Specifies the minimal TLS version for the CosmosDB account. Possible values are: `Tls`, `Tls11`, and `Tls12`. Defaults to `Tls12`.
     */
    @JvmName("ytegdxblftdhhgoi")
    public suspend fun minimalTlsVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minimalTlsVersion = mapped
    }

    /**
     * @param value
     */
    @JvmName("anxiuleflweufysf")
    public suspend fun mongoServerVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mongoServerVersion = mapped
    }

    /**
     * @param value
     */
    @JvmName("rvhgtjmmxqprdkyu")
    public suspend fun multipleWriteLocationsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.multipleWriteLocationsEnabled = mapped
    }

    /**
     * @param value Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.
     */
    @JvmName("uwbpfbkasqsnsjeu")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @JvmName("exhrnlyvarprxyyr")
    public suspend fun networkAclBypassForAzureServices(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkAclBypassForAzureServices = mapped
    }

    /**
     * @param value
     */
    @JvmName("wrbgnbdlvtahxbgo")
    public suspend fun networkAclBypassIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkAclBypassIds = mapped
    }

    /**
     * @param values
     */
    @JvmName("rafwiivbjclhixry")
    public suspend fun networkAclBypassIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.networkAclBypassIds = mapped
    }

    /**
     * @param value Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to `Standard`.
     */
    @JvmName("hjlpswopyfctuhmb")
    public suspend fun offerType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.offerType = mapped
    }

    /**
     * @param value
     */
    @JvmName("pqgtffnnlrkiribm")
    public suspend fun partitionMergeEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.partitionMergeEnabled = mapped
    }

    /**
     * @param value
     */
    @JvmName("oketlyavqsptwqvw")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

    /**
     * @param value The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.
     */
    @JvmName("onvnbjtpsghfugyu")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value
     */
    @JvmName("kytaxycqhbsftbem")
    public suspend fun restore(`value`: AccountRestoreArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restore = mapped
    }

    /**
     * @param argument
     */
    @JvmName("hxjtbhnxgpqyjcvy")
    public suspend fun restore(argument: suspend AccountRestoreArgsBuilder.() -> Unit) {
        val toBeMapped = AccountRestoreArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.restore = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("jcqrclegaiqsquic")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("vcsmhlnmdymtwaut")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value
     */
    @JvmName("uvbnqqkjsxpnabcf")
    public suspend fun virtualNetworkRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetworkRules = mapped
    }

    /**
     * @param argument
     */
    @JvmName("aeswgjnykxexjlnr")
    public suspend
    fun virtualNetworkRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccountVirtualNetworkRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworkRules = mapped
    }

    /**
     * @param argument
     */
    @JvmName("jygjtxgvfrtxlrty")
    public suspend fun virtualNetworkRules(
        vararg
        argument: suspend AccountVirtualNetworkRuleArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AccountVirtualNetworkRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworkRules = mapped
    }

    /**
     * @param argument
     */
    @JvmName("pkmnsmpatktgtdrb")
    public suspend
    fun virtualNetworkRules(argument: suspend AccountVirtualNetworkRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AccountVirtualNetworkRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.virtualNetworkRules = mapped
    }

    /**
     * @param values
     */
    @JvmName("uuxprubkaofprklq")
    public suspend fun virtualNetworkRules(vararg values: AccountVirtualNetworkRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.virtualNetworkRules = mapped
    }

    internal fun build(): AccountArgs = AccountArgs(
        accessKeyMetadataWritesEnabled = accessKeyMetadataWritesEnabled,
        analyticalStorage = analyticalStorage,
        analyticalStorageEnabled = analyticalStorageEnabled,
        automaticFailoverEnabled = automaticFailoverEnabled,
        backup = backup,
        capabilities = capabilities,
        capacity = capacity,
        consistencyPolicy = consistencyPolicy,
        corsRule = corsRule,
        createMode = createMode,
        defaultIdentityType = defaultIdentityType,
        enableAutomaticFailover = enableAutomaticFailover,
        enableFreeTier = enableFreeTier,
        enableMultipleWriteLocations = enableMultipleWriteLocations,
        freeTierEnabled = freeTierEnabled,
        geoLocations = geoLocations,
        identity = identity,
        ipRangeFilter = ipRangeFilter,
        isVirtualNetworkFilterEnabled = isVirtualNetworkFilterEnabled,
        keyVaultKeyId = keyVaultKeyId,
        kind = kind,
        localAuthenticationDisabled = localAuthenticationDisabled,
        location = location,
        minimalTlsVersion = minimalTlsVersion,
        mongoServerVersion = mongoServerVersion,
        multipleWriteLocationsEnabled = multipleWriteLocationsEnabled,
        name = name,
        networkAclBypassForAzureServices = networkAclBypassForAzureServices,
        networkAclBypassIds = networkAclBypassIds,
        offerType = offerType,
        partitionMergeEnabled = partitionMergeEnabled,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        resourceGroupName = resourceGroupName,
        restore = restore,
        tags = tags,
        virtualNetworkRules = virtualNetworkRules,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy