azure-native.documentdb.SqlResourceSqlDatabase
Explore with Pulumi AI
An Azure Cosmos DB SQL database. API Version: 2021-03-15.
Example Usage
CosmosDBSqlDatabaseCreateUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sqlResourceSqlDatabase = new AzureNative.DocumentDB.SqlResourceSqlDatabase("sqlResourceSqlDatabase", new()
{
AccountName = "ddb1",
DatabaseName = "databaseName",
Location = "West US",
Options = null,
Resource = new AzureNative.DocumentDB.Inputs.SqlDatabaseResourceArgs
{
Id = "databaseName",
},
ResourceGroupName = "rg1",
Tags = null,
});
});
package main
import (
documentdb "github.com/pulumi/pulumi-azure-native-sdk/documentdb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := documentdb.NewSqlResourceSqlDatabase(ctx, "sqlResourceSqlDatabase", &documentdb.SqlResourceSqlDatabaseArgs{
AccountName: pulumi.String("ddb1"),
DatabaseName: pulumi.String("databaseName"),
Location: pulumi.String("West US"),
Options: nil,
Resource: &documentdb.SqlDatabaseResourceArgs{
Id: pulumi.String("databaseName"),
},
ResourceGroupName: pulumi.String("rg1"),
Tags: nil,
})
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.documentdb.SqlResourceSqlDatabase;
import com.pulumi.azurenative.documentdb.SqlResourceSqlDatabaseArgs;
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 sqlResourceSqlDatabase = new SqlResourceSqlDatabase("sqlResourceSqlDatabase", SqlResourceSqlDatabaseArgs.builder()
.accountName("ddb1")
.databaseName("databaseName")
.location("West US")
.options()
.resource(Map.of("id", "databaseName"))
.resourceGroupName("rg1")
.tags()
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
sql_resource_sql_database = azure_native.documentdb.SqlResourceSqlDatabase("sqlResourceSqlDatabase",
account_name="ddb1",
database_name="databaseName",
location="West US",
options=azure_native.documentdb.CreateUpdateOptionsArgs(),
resource=azure_native.documentdb.SqlDatabaseResourceArgs(
id="databaseName",
),
resource_group_name="rg1",
tags={})
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const sqlResourceSqlDatabase = new azure_native.documentdb.SqlResourceSqlDatabase("sqlResourceSqlDatabase", {
accountName: "ddb1",
databaseName: "databaseName",
location: "West US",
options: {},
resource: {
id: "databaseName",
},
resourceGroupName: "rg1",
tags: {},
});
resources:
sqlResourceSqlDatabase:
type: azure-native:documentdb:SqlResourceSqlDatabase
properties:
accountName: ddb1
databaseName: databaseName
location: West US
options: {}
resource:
id: databaseName
resourceGroupName: rg1
tags: {}
Create SqlResourceSqlDatabase Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlResourceSqlDatabase(name: string, args: SqlResourceSqlDatabaseArgs, opts?: CustomResourceOptions);
@overload
def SqlResourceSqlDatabase(resource_name: str,
args: SqlResourceSqlDatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SqlResourceSqlDatabase(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_name: Optional[str] = None,
resource: Optional[SqlDatabaseResourceArgs] = None,
resource_group_name: Optional[str] = None,
database_name: Optional[str] = None,
location: Optional[str] = None,
options: Optional[CreateUpdateOptionsArgs] = None,
tags: Optional[Mapping[str, str]] = None)
func NewSqlResourceSqlDatabase(ctx *Context, name string, args SqlResourceSqlDatabaseArgs, opts ...ResourceOption) (*SqlResourceSqlDatabase, error)
public SqlResourceSqlDatabase(string name, SqlResourceSqlDatabaseArgs args, CustomResourceOptions? opts = null)
public SqlResourceSqlDatabase(String name, SqlResourceSqlDatabaseArgs args)
public SqlResourceSqlDatabase(String name, SqlResourceSqlDatabaseArgs args, CustomResourceOptions options)
type: azure-native:documentdb:SqlResourceSqlDatabase
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 SqlResourceSqlDatabaseArgs
- 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 SqlResourceSqlDatabaseArgs
- 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 SqlResourceSqlDatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SqlResourceSqlDatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SqlResourceSqlDatabaseArgs
- 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 sqlResourceSqlDatabaseResource = new AzureNative.Documentdb.SqlResourceSqlDatabase("sqlResourceSqlDatabaseResource", new()
{
AccountName = "string",
Resource =
{
{ "id", "string" },
},
ResourceGroupName = "string",
DatabaseName = "string",
Location = "string",
Options =
{
{ "autoscaleSettings",
{
{ "maxThroughput", 0 },
} },
{ "throughput", 0 },
},
Tags =
{
{ "string", "string" },
},
});
example, err := documentdb.NewSqlResourceSqlDatabase(ctx, "sqlResourceSqlDatabaseResource", &documentdb.SqlResourceSqlDatabaseArgs{
AccountName: "string",
Resource: map[string]interface{}{
"id": "string",
},
ResourceGroupName: "string",
DatabaseName: "string",
Location: "string",
Options: map[string]interface{}{
"autoscaleSettings": map[string]interface{}{
"maxThroughput": 0,
},
"throughput": 0,
},
Tags: map[string]interface{}{
"string": "string",
},
})
var sqlResourceSqlDatabaseResource = new SqlResourceSqlDatabase("sqlResourceSqlDatabaseResource", SqlResourceSqlDatabaseArgs.builder()
.accountName("string")
.resource(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.resourceGroupName("string")
.databaseName("string")
.location("string")
.options(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
sql_resource_sql_database_resource = azure_native.documentdb.SqlResourceSqlDatabase("sqlResourceSqlDatabaseResource",
account_name=string,
resource={
id: string,
},
resource_group_name=string,
database_name=string,
location=string,
options={
autoscaleSettings: {
maxThroughput: 0,
},
throughput: 0,
},
tags={
string: string,
})
const sqlResourceSqlDatabaseResource = new azure_native.documentdb.SqlResourceSqlDatabase("sqlResourceSqlDatabaseResource", {
accountName: "string",
resource: {
id: "string",
},
resourceGroupName: "string",
databaseName: "string",
location: "string",
options: {
autoscaleSettings: {
maxThroughput: 0,
},
throughput: 0,
},
tags: {
string: "string",
},
});
type: azure-native:documentdb:SqlResourceSqlDatabase
properties:
accountName: string
databaseName: string
location: string
options:
autoscaleSettings:
maxThroughput: 0
throughput: 0
resource:
id: string
resourceGroupName: string
tags:
string: string
SqlResourceSqlDatabase 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 SqlResourceSqlDatabase resource accepts the following input properties:
- Account
Name string - Cosmos DB database account name.
- Resource
Pulumi.
Azure Native. Document DB. Inputs. Sql Database Resource - The standard JSON format of a SQL database
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Database
Name string - Cosmos DB database name.
- Location string
- The location of the resource group to which the resource belongs.
- Options
Pulumi.
Azure Native. Document DB. Inputs. Create Update Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
- 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".
- Account
Name string - Cosmos DB database account name.
- Resource
Sql
Database Resource Args - The standard JSON format of a SQL database
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Database
Name string - Cosmos DB database name.
- Location string
- The location of the resource group to which the resource belongs.
- Options
Create
Update Options Args - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
- 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".
- account
Name String - Cosmos DB database account name.
- resource
Sql
Database Resource - The standard JSON format of a SQL database
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- database
Name String - Cosmos DB database name.
- location String
- The location of the resource group to which the resource belongs.
- options
Create
Update Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
- 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".
- account
Name string - Cosmos DB database account name.
- resource
Sql
Database Resource - The standard JSON format of a SQL database
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- database
Name string - Cosmos DB database name.
- location string
- The location of the resource group to which the resource belongs.
- options
Create
Update Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
- {[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".
- account_
name str - Cosmos DB database account name.
- resource
Sql
Database Resource Args - The standard JSON format of a SQL database
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- database_
name str - Cosmos DB database name.
- location str
- The location of the resource group to which the resource belongs.
- options
Create
Update Options Args - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
- 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".
- account
Name String - Cosmos DB database account name.
- resource Property Map
- The standard JSON format of a SQL database
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- database
Name String - Cosmos DB database name.
- location String
- The location of the resource group to which the resource belongs.
- options Property Map
- A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
- 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".
Outputs
All input properties are implicitly available as output properties. Additionally, the SqlResourceSqlDatabase resource produces the following output properties:
Supporting Types
AutoscaleSettings, AutoscaleSettingsArgs
- Max
Throughput int - Represents maximum throughput, the resource can scale up to.
- Max
Throughput int - Represents maximum throughput, the resource can scale up to.
- max
Throughput Integer - Represents maximum throughput, the resource can scale up to.
- max
Throughput number - Represents maximum throughput, the resource can scale up to.
- max_
throughput int - Represents maximum throughput, the resource can scale up to.
- max
Throughput Number - Represents maximum throughput, the resource can scale up to.
AutoscaleSettingsResponse, AutoscaleSettingsResponseArgs
- Max
Throughput int - Represents maximum throughput, the resource can scale up to.
- Max
Throughput int - Represents maximum throughput, the resource can scale up to.
- max
Throughput Integer - Represents maximum throughput, the resource can scale up to.
- max
Throughput number - Represents maximum throughput, the resource can scale up to.
- max_
throughput int - Represents maximum throughput, the resource can scale up to.
- max
Throughput Number - Represents maximum throughput, the resource can scale up to.
CreateUpdateOptions, CreateUpdateOptionsArgs
- Autoscale
Settings Pulumi.Azure Native. Document DB. Inputs. Autoscale Settings - Specifies the Autoscale settings.
- Throughput int
- Request Units per second. For example, "throughput": 10000.
- Autoscale
Settings AutoscaleSettings - Specifies the Autoscale settings.
- Throughput int
- Request Units per second. For example, "throughput": 10000.
- autoscale
Settings AutoscaleSettings - Specifies the Autoscale settings.
- throughput Integer
- Request Units per second. For example, "throughput": 10000.
- autoscale
Settings AutoscaleSettings - Specifies the Autoscale settings.
- throughput number
- Request Units per second. For example, "throughput": 10000.
- autoscale_
settings AutoscaleSettings - Specifies the Autoscale settings.
- throughput int
- Request Units per second. For example, "throughput": 10000.
- autoscale
Settings Property Map - Specifies the Autoscale settings.
- throughput Number
- Request Units per second. For example, "throughput": 10000.
SqlDatabaseGetPropertiesResponseOptions, SqlDatabaseGetPropertiesResponseOptionsArgs
- Autoscale
Settings Pulumi.Azure Native. Document DB. Inputs. Autoscale Settings Response - Specifies the Autoscale settings.
- Throughput int
- Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
- Autoscale
Settings AutoscaleSettings Response - Specifies the Autoscale settings.
- Throughput int
- Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
- autoscale
Settings AutoscaleSettings Response - Specifies the Autoscale settings.
- throughput Integer
- Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
- autoscale
Settings AutoscaleSettings Response - Specifies the Autoscale settings.
- throughput number
- Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
- autoscale_
settings AutoscaleSettings Response - Specifies the Autoscale settings.
- throughput int
- Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
- autoscale
Settings Property Map - Specifies the Autoscale settings.
- throughput Number
- Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
SqlDatabaseGetPropertiesResponseResource, SqlDatabaseGetPropertiesResponseResourceArgs
- Etag string
- A system generated property representing the resource etag required for optimistic concurrency control.
- Id string
- Name of the Cosmos DB SQL database
- Rid string
- A system generated property. A unique identifier.
- Ts double
- A system generated property that denotes the last updated timestamp of the resource.
- Colls string
- A system generated property that specified the addressable path of the collections resource.
- Users string
- A system generated property that specifies the addressable path of the users resource.
- Etag string
- A system generated property representing the resource etag required for optimistic concurrency control.
- Id string
- Name of the Cosmos DB SQL database
- Rid string
- A system generated property. A unique identifier.
- Ts float64
- A system generated property that denotes the last updated timestamp of the resource.
- Colls string
- A system generated property that specified the addressable path of the collections resource.
- Users string
- A system generated property that specifies the addressable path of the users resource.
- etag String
- A system generated property representing the resource etag required for optimistic concurrency control.
- id String
- Name of the Cosmos DB SQL database
- rid String
- A system generated property. A unique identifier.
- ts Double
- A system generated property that denotes the last updated timestamp of the resource.
- colls String
- A system generated property that specified the addressable path of the collections resource.
- users String
- A system generated property that specifies the addressable path of the users resource.
- etag string
- A system generated property representing the resource etag required for optimistic concurrency control.
- id string
- Name of the Cosmos DB SQL database
- rid string
- A system generated property. A unique identifier.
- ts number
- A system generated property that denotes the last updated timestamp of the resource.
- colls string
- A system generated property that specified the addressable path of the collections resource.
- users string
- A system generated property that specifies the addressable path of the users resource.
- etag str
- A system generated property representing the resource etag required for optimistic concurrency control.
- id str
- Name of the Cosmos DB SQL database
- rid str
- A system generated property. A unique identifier.
- ts float
- A system generated property that denotes the last updated timestamp of the resource.
- colls str
- A system generated property that specified the addressable path of the collections resource.
- users str
- A system generated property that specifies the addressable path of the users resource.
- etag String
- A system generated property representing the resource etag required for optimistic concurrency control.
- id String
- Name of the Cosmos DB SQL database
- rid String
- A system generated property. A unique identifier.
- ts Number
- A system generated property that denotes the last updated timestamp of the resource.
- colls String
- A system generated property that specified the addressable path of the collections resource.
- users String
- A system generated property that specifies the addressable path of the users resource.
SqlDatabaseResource, SqlDatabaseResourceArgs
- Id string
- Name of the Cosmos DB SQL database
- Id string
- Name of the Cosmos DB SQL database
- id String
- Name of the Cosmos DB SQL database
- id string
- Name of the Cosmos DB SQL database
- id str
- Name of the Cosmos DB SQL database
- id String
- Name of the Cosmos DB SQL database
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:documentdb:SqlResourceSqlDatabase databaseName /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0