azure-native.documentdb.SqlResourceSqlUserDefinedFunction
Explore with Pulumi AI
An Azure Cosmos DB userDefinedFunction. Azure REST API version: 2023-04-15. Prior API version in Azure Native 1.x: 2021-03-15.
Other available API versions: 2019-08-01, 2023-03-15-preview, 2023-09-15, 2023-09-15-preview, 2023-11-15, 2023-11-15-preview, 2024-02-15-preview, 2024-05-15, 2024-05-15-preview.
Example Usage
CosmosDBSqlUserDefinedFunctionCreateUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sqlResourceSqlUserDefinedFunction = new AzureNative.DocumentDB.SqlResourceSqlUserDefinedFunction("sqlResourceSqlUserDefinedFunction", new()
{
AccountName = "ddb1",
ContainerName = "containerName",
DatabaseName = "databaseName",
Options = null,
Resource = new AzureNative.DocumentDB.Inputs.SqlUserDefinedFunctionResourceArgs
{
Body = "body",
Id = "userDefinedFunctionName",
},
ResourceGroupName = "rg1",
UserDefinedFunctionName = "userDefinedFunctionName",
});
});
package main
import (
documentdb "github.com/pulumi/pulumi-azure-native-sdk/documentdb/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := documentdb.NewSqlResourceSqlUserDefinedFunction(ctx, "sqlResourceSqlUserDefinedFunction", &documentdb.SqlResourceSqlUserDefinedFunctionArgs{
AccountName: pulumi.String("ddb1"),
ContainerName: pulumi.String("containerName"),
DatabaseName: pulumi.String("databaseName"),
Options: nil,
Resource: &documentdb.SqlUserDefinedFunctionResourceArgs{
Body: pulumi.String("body"),
Id: pulumi.String("userDefinedFunctionName"),
},
ResourceGroupName: pulumi.String("rg1"),
UserDefinedFunctionName: pulumi.String("userDefinedFunctionName"),
})
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.SqlResourceSqlUserDefinedFunction;
import com.pulumi.azurenative.documentdb.SqlResourceSqlUserDefinedFunctionArgs;
import com.pulumi.azurenative.documentdb.inputs.CreateUpdateOptionsArgs;
import com.pulumi.azurenative.documentdb.inputs.SqlUserDefinedFunctionResourceArgs;
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 sqlResourceSqlUserDefinedFunction = new SqlResourceSqlUserDefinedFunction("sqlResourceSqlUserDefinedFunction", SqlResourceSqlUserDefinedFunctionArgs.builder()
.accountName("ddb1")
.containerName("containerName")
.databaseName("databaseName")
.options()
.resource(SqlUserDefinedFunctionResourceArgs.builder()
.body("body")
.id("userDefinedFunctionName")
.build())
.resourceGroupName("rg1")
.userDefinedFunctionName("userDefinedFunctionName")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
sql_resource_sql_user_defined_function = azure_native.documentdb.SqlResourceSqlUserDefinedFunction("sqlResourceSqlUserDefinedFunction",
account_name="ddb1",
container_name="containerName",
database_name="databaseName",
options=azure_native.documentdb.CreateUpdateOptionsArgs(),
resource=azure_native.documentdb.SqlUserDefinedFunctionResourceArgs(
body="body",
id="userDefinedFunctionName",
),
resource_group_name="rg1",
user_defined_function_name="userDefinedFunctionName")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const sqlResourceSqlUserDefinedFunction = new azure_native.documentdb.SqlResourceSqlUserDefinedFunction("sqlResourceSqlUserDefinedFunction", {
accountName: "ddb1",
containerName: "containerName",
databaseName: "databaseName",
options: {},
resource: {
body: "body",
id: "userDefinedFunctionName",
},
resourceGroupName: "rg1",
userDefinedFunctionName: "userDefinedFunctionName",
});
resources:
sqlResourceSqlUserDefinedFunction:
type: azure-native:documentdb:SqlResourceSqlUserDefinedFunction
properties:
accountName: ddb1
containerName: containerName
databaseName: databaseName
options: {}
resource:
body: body
id: userDefinedFunctionName
resourceGroupName: rg1
userDefinedFunctionName: userDefinedFunctionName
Create SqlResourceSqlUserDefinedFunction Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlResourceSqlUserDefinedFunction(name: string, args: SqlResourceSqlUserDefinedFunctionArgs, opts?: CustomResourceOptions);
@overload
def SqlResourceSqlUserDefinedFunction(resource_name: str,
args: SqlResourceSqlUserDefinedFunctionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SqlResourceSqlUserDefinedFunction(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_name: Optional[str] = None,
container_name: Optional[str] = None,
database_name: Optional[str] = None,
resource: Optional[SqlUserDefinedFunctionResourceArgs] = None,
resource_group_name: Optional[str] = None,
location: Optional[str] = None,
options: Optional[CreateUpdateOptionsArgs] = None,
tags: Optional[Mapping[str, str]] = None,
user_defined_function_name: Optional[str] = None)
func NewSqlResourceSqlUserDefinedFunction(ctx *Context, name string, args SqlResourceSqlUserDefinedFunctionArgs, opts ...ResourceOption) (*SqlResourceSqlUserDefinedFunction, error)
public SqlResourceSqlUserDefinedFunction(string name, SqlResourceSqlUserDefinedFunctionArgs args, CustomResourceOptions? opts = null)
public SqlResourceSqlUserDefinedFunction(String name, SqlResourceSqlUserDefinedFunctionArgs args)
public SqlResourceSqlUserDefinedFunction(String name, SqlResourceSqlUserDefinedFunctionArgs args, CustomResourceOptions options)
type: azure-native:documentdb:SqlResourceSqlUserDefinedFunction
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 SqlResourceSqlUserDefinedFunctionArgs
- 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 SqlResourceSqlUserDefinedFunctionArgs
- 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 SqlResourceSqlUserDefinedFunctionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SqlResourceSqlUserDefinedFunctionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SqlResourceSqlUserDefinedFunctionArgs
- 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 sqlResourceSqlUserDefinedFunctionResource = new AzureNative.DocumentDB.SqlResourceSqlUserDefinedFunction("sqlResourceSqlUserDefinedFunctionResource", new()
{
AccountName = "string",
ContainerName = "string",
DatabaseName = "string",
Resource = new AzureNative.DocumentDB.Inputs.SqlUserDefinedFunctionResourceArgs
{
Id = "string",
Body = "string",
},
ResourceGroupName = "string",
Location = "string",
Options = new AzureNative.DocumentDB.Inputs.CreateUpdateOptionsArgs
{
AutoscaleSettings = new AzureNative.DocumentDB.Inputs.AutoscaleSettingsArgs
{
MaxThroughput = 0,
},
Throughput = 0,
},
Tags =
{
{ "string", "string" },
},
UserDefinedFunctionName = "string",
});
example, err := documentdb.NewSqlResourceSqlUserDefinedFunction(ctx, "sqlResourceSqlUserDefinedFunctionResource", &documentdb.SqlResourceSqlUserDefinedFunctionArgs{
AccountName: pulumi.String("string"),
ContainerName: pulumi.String("string"),
DatabaseName: pulumi.String("string"),
Resource: &documentdb.SqlUserDefinedFunctionResourceArgs{
Id: pulumi.String("string"),
Body: pulumi.String("string"),
},
ResourceGroupName: pulumi.String("string"),
Location: pulumi.String("string"),
Options: &documentdb.CreateUpdateOptionsArgs{
AutoscaleSettings: &documentdb.AutoscaleSettingsArgs{
MaxThroughput: pulumi.Int(0),
},
Throughput: pulumi.Int(0),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
UserDefinedFunctionName: pulumi.String("string"),
})
var sqlResourceSqlUserDefinedFunctionResource = new SqlResourceSqlUserDefinedFunction("sqlResourceSqlUserDefinedFunctionResource", SqlResourceSqlUserDefinedFunctionArgs.builder()
.accountName("string")
.containerName("string")
.databaseName("string")
.resource(SqlUserDefinedFunctionResourceArgs.builder()
.id("string")
.body("string")
.build())
.resourceGroupName("string")
.location("string")
.options(CreateUpdateOptionsArgs.builder()
.autoscaleSettings(AutoscaleSettingsArgs.builder()
.maxThroughput(0)
.build())
.throughput(0)
.build())
.tags(Map.of("string", "string"))
.userDefinedFunctionName("string")
.build());
sql_resource_sql_user_defined_function_resource = azure_native.documentdb.SqlResourceSqlUserDefinedFunction("sqlResourceSqlUserDefinedFunctionResource",
account_name="string",
container_name="string",
database_name="string",
resource=azure_native.documentdb.SqlUserDefinedFunctionResourceArgs(
id="string",
body="string",
),
resource_group_name="string",
location="string",
options=azure_native.documentdb.CreateUpdateOptionsArgs(
autoscale_settings=azure_native.documentdb.AutoscaleSettingsArgs(
max_throughput=0,
),
throughput=0,
),
tags={
"string": "string",
},
user_defined_function_name="string")
const sqlResourceSqlUserDefinedFunctionResource = new azure_native.documentdb.SqlResourceSqlUserDefinedFunction("sqlResourceSqlUserDefinedFunctionResource", {
accountName: "string",
containerName: "string",
databaseName: "string",
resource: {
id: "string",
body: "string",
},
resourceGroupName: "string",
location: "string",
options: {
autoscaleSettings: {
maxThroughput: 0,
},
throughput: 0,
},
tags: {
string: "string",
},
userDefinedFunctionName: "string",
});
type: azure-native:documentdb:SqlResourceSqlUserDefinedFunction
properties:
accountName: string
containerName: string
databaseName: string
location: string
options:
autoscaleSettings:
maxThroughput: 0
throughput: 0
resource:
body: string
id: string
resourceGroupName: string
tags:
string: string
userDefinedFunctionName: string
SqlResourceSqlUserDefinedFunction Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SqlResourceSqlUserDefinedFunction resource accepts the following input properties:
- Account
Name string - Cosmos DB database account name.
- Container
Name string - Cosmos DB container name.
- Database
Name string - Cosmos DB database name.
- Resource
Pulumi.
Azure Native. Document DB. Inputs. Sql User Defined Function Resource - The standard JSON format of a userDefinedFunction
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- 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".
- User
Defined stringFunction Name - Cosmos DB userDefinedFunction name.
- Account
Name string - Cosmos DB database account name.
- Container
Name string - Cosmos DB container name.
- Database
Name string - Cosmos DB database name.
- Resource
Sql
User Defined Function Resource Args - The standard JSON format of a userDefinedFunction
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- 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".
- User
Defined stringFunction Name - Cosmos DB userDefinedFunction name.
- account
Name String - Cosmos DB database account name.
- container
Name String - Cosmos DB container name.
- database
Name String - Cosmos DB database name.
- resource
Sql
User Defined Function Resource - The standard JSON format of a userDefinedFunction
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- 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".
- user
Defined StringFunction Name - Cosmos DB userDefinedFunction name.
- account
Name string - Cosmos DB database account name.
- container
Name string - Cosmos DB container name.
- database
Name string - Cosmos DB database name.
- resource
Sql
User Defined Function Resource - The standard JSON format of a userDefinedFunction
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- 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".
- user
Defined stringFunction Name - Cosmos DB userDefinedFunction name.
- account_
name str - Cosmos DB database account name.
- container_
name str - Cosmos DB container name.
- database_
name str - Cosmos DB database name.
- resource
Sql
User Defined Function Resource Args - The standard JSON format of a userDefinedFunction
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- 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".
- user_
defined_ strfunction_ name - Cosmos DB userDefinedFunction name.
- account
Name String - Cosmos DB database account name.
- container
Name String - Cosmos DB container name.
- database
Name String - Cosmos DB database name.
- resource Property Map
- The standard JSON format of a userDefinedFunction
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- 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".
- user
Defined StringFunction Name - Cosmos DB userDefinedFunction name.
Outputs
All input properties are implicitly available as output properties. Additionally, the SqlResourceSqlUserDefinedFunction 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.
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.
SqlUserDefinedFunctionGetPropertiesResponseResource, SqlUserDefinedFunctionGetPropertiesResponseResourceArgs
- Etag string
- A system generated property representing the resource etag required for optimistic concurrency control.
- Id string
- Name of the Cosmos DB SQL userDefinedFunction
- Rid string
- A system generated property. A unique identifier.
- Ts double
- A system generated property that denotes the last updated timestamp of the resource.
- Body string
- Body of the User Defined Function
- Etag string
- A system generated property representing the resource etag required for optimistic concurrency control.
- Id string
- Name of the Cosmos DB SQL userDefinedFunction
- Rid string
- A system generated property. A unique identifier.
- Ts float64
- A system generated property that denotes the last updated timestamp of the resource.
- Body string
- Body of the User Defined Function
- etag String
- A system generated property representing the resource etag required for optimistic concurrency control.
- id String
- Name of the Cosmos DB SQL userDefinedFunction
- rid String
- A system generated property. A unique identifier.
- ts Double
- A system generated property that denotes the last updated timestamp of the resource.
- body String
- Body of the User Defined Function
- etag string
- A system generated property representing the resource etag required for optimistic concurrency control.
- id string
- Name of the Cosmos DB SQL userDefinedFunction
- rid string
- A system generated property. A unique identifier.
- ts number
- A system generated property that denotes the last updated timestamp of the resource.
- body string
- Body of the User Defined Function
- etag str
- A system generated property representing the resource etag required for optimistic concurrency control.
- id str
- Name of the Cosmos DB SQL userDefinedFunction
- rid str
- A system generated property. A unique identifier.
- ts float
- A system generated property that denotes the last updated timestamp of the resource.
- body str
- Body of the User Defined Function
- etag String
- A system generated property representing the resource etag required for optimistic concurrency control.
- id String
- Name of the Cosmos DB SQL userDefinedFunction
- rid String
- A system generated property. A unique identifier.
- ts Number
- A system generated property that denotes the last updated timestamp of the resource.
- body String
- Body of the User Defined Function
SqlUserDefinedFunctionResource, SqlUserDefinedFunctionResourceArgs
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:documentdb:SqlResourceSqlUserDefinedFunction userDefinedFunctionName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0