1. Packages
  2. Azure Native
  3. API Docs
  4. cosmosdb
  5. DatabaseAccountTable
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.3.0 published on Monday, Apr 28, 2025 by Pulumi

azure-native.cosmosdb.DatabaseAccountTable

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.3.0 published on Monday, Apr 28, 2025 by Pulumi

    An Azure Cosmos DB Table.

    Uses Azure REST API version 2016-03-31.

    Other available API versions: 2015-04-01, 2015-04-08, 2015-11-06, 2016-03-19. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native cosmosdb [ApiVersion]. See the version guide for details.

    Example Usage

    CosmosDBTableReplace

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var databaseAccountTable = new AzureNative.CosmosDB.DatabaseAccountTable("databaseAccountTable", new()
        {
            AccountName = "ddb1",
            Options = null,
            Resource = new AzureNative.CosmosDB.Inputs.TableResourceArgs
            {
                Id = "tableName",
            },
            ResourceGroupName = "rg1",
            TableName = "tableName",
        });
    
    });
    
    package main
    
    import (
    	cosmosdb "github.com/pulumi/pulumi-azure-native-sdk/cosmosdb/v3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cosmosdb.NewDatabaseAccountTable(ctx, "databaseAccountTable", &cosmosdb.DatabaseAccountTableArgs{
    			AccountName: pulumi.String("ddb1"),
    			Options:     pulumi.StringMap{},
    			Resource: &cosmosdb.TableResourceArgs{
    				Id: pulumi.String("tableName"),
    			},
    			ResourceGroupName: pulumi.String("rg1"),
    			TableName:         pulumi.String("tableName"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.cosmosdb.DatabaseAccountTable;
    import com.pulumi.azurenative.cosmosdb.DatabaseAccountTableArgs;
    import com.pulumi.azurenative.cosmosdb.inputs.TableResourceArgs;
    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 databaseAccountTable = new DatabaseAccountTable("databaseAccountTable", DatabaseAccountTableArgs.builder()
                .accountName("ddb1")
                .options(Map.ofEntries(
                ))
                .resource(TableResourceArgs.builder()
                    .id("tableName")
                    .build())
                .resourceGroupName("rg1")
                .tableName("tableName")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const databaseAccountTable = new azure_native.cosmosdb.DatabaseAccountTable("databaseAccountTable", {
        accountName: "ddb1",
        options: {},
        resource: {
            id: "tableName",
        },
        resourceGroupName: "rg1",
        tableName: "tableName",
    });
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    database_account_table = azure_native.cosmosdb.DatabaseAccountTable("databaseAccountTable",
        account_name="ddb1",
        options={},
        resource={
            "id": "tableName",
        },
        resource_group_name="rg1",
        table_name="tableName")
    
    resources:
      databaseAccountTable:
        type: azure-native:cosmosdb:DatabaseAccountTable
        properties:
          accountName: ddb1
          options: {}
          resource:
            id: tableName
          resourceGroupName: rg1
          tableName: tableName
    

    Create DatabaseAccountTable Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DatabaseAccountTable(name: string, args: DatabaseAccountTableArgs, opts?: CustomResourceOptions);
    @overload
    def DatabaseAccountTable(resource_name: str,
                             args: DatabaseAccountTableArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def DatabaseAccountTable(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             account_name: Optional[str] = None,
                             options: Optional[Mapping[str, str]] = None,
                             resource: Optional[TableResourceArgs] = None,
                             resource_group_name: Optional[str] = None,
                             table_name: Optional[str] = None)
    func NewDatabaseAccountTable(ctx *Context, name string, args DatabaseAccountTableArgs, opts ...ResourceOption) (*DatabaseAccountTable, error)
    public DatabaseAccountTable(string name, DatabaseAccountTableArgs args, CustomResourceOptions? opts = null)
    public DatabaseAccountTable(String name, DatabaseAccountTableArgs args)
    public DatabaseAccountTable(String name, DatabaseAccountTableArgs args, CustomResourceOptions options)
    
    type: azure-native:cosmosdb:DatabaseAccountTable
    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 DatabaseAccountTableArgs
    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 DatabaseAccountTableArgs
    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 DatabaseAccountTableArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseAccountTableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseAccountTableArgs
    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 databaseAccountTableResource = new AzureNative.CosmosDB.DatabaseAccountTable("databaseAccountTableResource", new()
    {
        AccountName = "string",
        Options = 
        {
            { "string", "string" },
        },
        Resource = new AzureNative.CosmosDB.Inputs.TableResourceArgs
        {
            Id = "string",
            CreateMode = "string",
            RestoreParameters = new AzureNative.CosmosDB.Inputs.ResourceRestoreParametersArgs
            {
                RestoreSource = "string",
                RestoreTimestampInUtc = "string",
                RestoreWithTtlDisabled = false,
            },
        },
        ResourceGroupName = "string",
        TableName = "string",
    });
    
    example, err := cosmosdb.NewDatabaseAccountTable(ctx, "databaseAccountTableResource", &cosmosdb.DatabaseAccountTableArgs{
    	AccountName: pulumi.String("string"),
    	Options: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Resource: &cosmosdb.TableResourceArgs{
    		Id:         pulumi.String("string"),
    		CreateMode: pulumi.String("string"),
    		RestoreParameters: &cosmosdb.ResourceRestoreParametersArgs{
    			RestoreSource:          pulumi.String("string"),
    			RestoreTimestampInUtc:  pulumi.String("string"),
    			RestoreWithTtlDisabled: pulumi.Bool(false),
    		},
    	},
    	ResourceGroupName: pulumi.String("string"),
    	TableName:         pulumi.String("string"),
    })
    
    var databaseAccountTableResource = new DatabaseAccountTable("databaseAccountTableResource", DatabaseAccountTableArgs.builder()
        .accountName("string")
        .options(Map.of("string", "string"))
        .resource(TableResourceArgs.builder()
            .id("string")
            .createMode("string")
            .restoreParameters(ResourceRestoreParametersArgs.builder()
                .restoreSource("string")
                .restoreTimestampInUtc("string")
                .restoreWithTtlDisabled(false)
                .build())
            .build())
        .resourceGroupName("string")
        .tableName("string")
        .build());
    
    database_account_table_resource = azure_native.cosmosdb.DatabaseAccountTable("databaseAccountTableResource",
        account_name="string",
        options={
            "string": "string",
        },
        resource={
            "id": "string",
            "create_mode": "string",
            "restore_parameters": {
                "restore_source": "string",
                "restore_timestamp_in_utc": "string",
                "restore_with_ttl_disabled": False,
            },
        },
        resource_group_name="string",
        table_name="string")
    
    const databaseAccountTableResource = new azure_native.cosmosdb.DatabaseAccountTable("databaseAccountTableResource", {
        accountName: "string",
        options: {
            string: "string",
        },
        resource: {
            id: "string",
            createMode: "string",
            restoreParameters: {
                restoreSource: "string",
                restoreTimestampInUtc: "string",
                restoreWithTtlDisabled: false,
            },
        },
        resourceGroupName: "string",
        tableName: "string",
    });
    
    type: azure-native:cosmosdb:DatabaseAccountTable
    properties:
        accountName: string
        options:
            string: string
        resource:
            createMode: string
            id: string
            restoreParameters:
                restoreSource: string
                restoreTimestampInUtc: string
                restoreWithTtlDisabled: false
        resourceGroupName: string
        tableName: string
    

    DatabaseAccountTable 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 DatabaseAccountTable resource accepts the following input properties:

    AccountName string
    Cosmos DB database account name.
    Options Dictionary<string, string>
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    Resource Pulumi.AzureNative.CosmosDB.Inputs.TableResource
    The standard JSON format of a Table
    ResourceGroupName string
    Name of an Azure resource group.
    TableName string
    Cosmos DB table name.
    AccountName string
    Cosmos DB database account name.
    Options map[string]string
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    Resource TableResourceArgs
    The standard JSON format of a Table
    ResourceGroupName string
    Name of an Azure resource group.
    TableName string
    Cosmos DB table name.
    accountName String
    Cosmos DB database account name.
    options Map<String,String>
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    resource TableResource
    The standard JSON format of a Table
    resourceGroupName String
    Name of an Azure resource group.
    tableName String
    Cosmos DB table name.
    accountName string
    Cosmos DB database account name.
    options {[key: string]: string}
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    resource TableResource
    The standard JSON format of a Table
    resourceGroupName string
    Name of an Azure resource group.
    tableName string
    Cosmos DB table name.
    account_name str
    Cosmos DB database account name.
    options Mapping[str, str]
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    resource TableResourceArgs
    The standard JSON format of a Table
    resource_group_name str
    Name of an Azure resource group.
    table_name str
    Cosmos DB table name.
    accountName String
    Cosmos DB database account name.
    options Map<String>
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    resource Property Map
    The standard JSON format of a Table
    resourceGroupName String
    Name of an Azure resource group.
    tableName String
    Cosmos DB table name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DatabaseAccountTable resource produces the following output properties:

    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the database account.
    Type string
    The type of Azure resource.
    Location string
    The location of the resource group to which the resource belongs.
    Tags Dictionary<string, string>
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the database account.
    Type string
    The type of Azure resource.
    Location string
    The location of the resource group to which the resource belongs.
    Tags map[string]string
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    azureApiVersion String
    The Azure API version of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the database account.
    type String
    The type of Azure resource.
    location String
    The location of the resource group to which the resource belongs.
    tags Map<String,String>
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    azureApiVersion string
    The Azure API version of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the database account.
    type string
    The type of Azure resource.
    location string
    The location of the resource group to which the resource belongs.
    tags {[key: string]: string}
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    azure_api_version str
    The Azure API version of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the database account.
    type str
    The type of Azure resource.
    location str
    The location of the resource group to which the resource belongs.
    tags Mapping[str, str]
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    azureApiVersion String
    The Azure API version of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the database account.
    type String
    The type of Azure resource.
    location String
    The location of the resource group to which the resource belongs.
    tags Map<String>
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

    Supporting Types

    CreateMode, CreateModeArgs

    Default
    Default
    Restore
    Restore
    CreateModeDefault
    Default
    CreateModeRestore
    Restore
    Default
    Default
    Restore
    Restore
    Default
    Default
    Restore
    Restore
    DEFAULT
    Default
    RESTORE
    Restore
    "Default"
    Default
    "Restore"
    Restore

    ResourceRestoreParameters, ResourceRestoreParametersArgs

    RestoreSource string
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    RestoreTimestampInUtc string
    Time to which the account has to be restored (ISO-8601 format).
    RestoreWithTtlDisabled bool
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    RestoreSource string
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    RestoreTimestampInUtc string
    Time to which the account has to be restored (ISO-8601 format).
    RestoreWithTtlDisabled bool
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    restoreSource String
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    restoreTimestampInUtc String
    Time to which the account has to be restored (ISO-8601 format).
    restoreWithTtlDisabled Boolean
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    restoreSource string
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    restoreTimestampInUtc string
    Time to which the account has to be restored (ISO-8601 format).
    restoreWithTtlDisabled boolean
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    restore_source str
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    restore_timestamp_in_utc str
    Time to which the account has to be restored (ISO-8601 format).
    restore_with_ttl_disabled bool
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    restoreSource String
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    restoreTimestampInUtc String
    Time to which the account has to be restored (ISO-8601 format).
    restoreWithTtlDisabled Boolean
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.

    TableResource, TableResourceArgs

    Id string
    Name of the Cosmos DB table
    CreateMode string | Pulumi.AzureNative.CosmosDB.CreateMode
    Enum to indicate the mode of resource creation.
    RestoreParameters Pulumi.AzureNative.CosmosDB.Inputs.ResourceRestoreParameters
    Parameters to indicate the information about the restore
    Id string
    Name of the Cosmos DB table
    CreateMode string | CreateMode
    Enum to indicate the mode of resource creation.
    RestoreParameters ResourceRestoreParameters
    Parameters to indicate the information about the restore
    id String
    Name of the Cosmos DB table
    createMode String | CreateMode
    Enum to indicate the mode of resource creation.
    restoreParameters ResourceRestoreParameters
    Parameters to indicate the information about the restore
    id string
    Name of the Cosmos DB table
    createMode string | CreateMode
    Enum to indicate the mode of resource creation.
    restoreParameters ResourceRestoreParameters
    Parameters to indicate the information about the restore
    id str
    Name of the Cosmos DB table
    create_mode str | CreateMode
    Enum to indicate the mode of resource creation.
    restore_parameters ResourceRestoreParameters
    Parameters to indicate the information about the restore
    id String
    Name of the Cosmos DB table
    createMode String | "Default" | "Restore"
    Enum to indicate the mode of resource creation.
    restoreParameters Property Map
    Parameters to indicate the information about the restore

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:cosmosdb:DatabaseAccountTable tableName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Azure Native v3.3.0 published on Monday, Apr 28, 2025 by Pulumi