azure-native.sql.WorkloadClassifier
Explore with Pulumi AI
Workload classifier operations for a data warehouse Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.
Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.
Example Usage
Create a workload group with all properties specified.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workloadClassifier = new AzureNative.Sql.WorkloadClassifier("workloadClassifier", new()
{
Context = "test_context",
DatabaseName = "testdb",
EndTime = "14:00",
Importance = "high",
Label = "test_label",
MemberName = "dbo",
ResourceGroupName = "Default-SQL-SouthEastAsia",
ServerName = "testsvr",
StartTime = "12:00",
WorkloadClassifierName = "wlm_workloadclassifier",
WorkloadGroupName = "wlm_workloadgroup",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewWorkloadClassifier(ctx, "workloadClassifier", &sql.WorkloadClassifierArgs{
Context: pulumi.String("test_context"),
DatabaseName: pulumi.String("testdb"),
EndTime: pulumi.String("14:00"),
Importance: pulumi.String("high"),
Label: pulumi.String("test_label"),
MemberName: pulumi.String("dbo"),
ResourceGroupName: pulumi.String("Default-SQL-SouthEastAsia"),
ServerName: pulumi.String("testsvr"),
StartTime: pulumi.String("12:00"),
WorkloadClassifierName: pulumi.String("wlm_workloadclassifier"),
WorkloadGroupName: pulumi.String("wlm_workloadgroup"),
})
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.sql.WorkloadClassifier;
import com.pulumi.azurenative.sql.WorkloadClassifierArgs;
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 workloadClassifier = new WorkloadClassifier("workloadClassifier", WorkloadClassifierArgs.builder()
.context("test_context")
.databaseName("testdb")
.endTime("14:00")
.importance("high")
.label("test_label")
.memberName("dbo")
.resourceGroupName("Default-SQL-SouthEastAsia")
.serverName("testsvr")
.startTime("12:00")
.workloadClassifierName("wlm_workloadclassifier")
.workloadGroupName("wlm_workloadgroup")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
workload_classifier = azure_native.sql.WorkloadClassifier("workloadClassifier",
context="test_context",
database_name="testdb",
end_time="14:00",
importance="high",
label="test_label",
member_name="dbo",
resource_group_name="Default-SQL-SouthEastAsia",
server_name="testsvr",
start_time="12:00",
workload_classifier_name="wlm_workloadclassifier",
workload_group_name="wlm_workloadgroup")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const workloadClassifier = new azure_native.sql.WorkloadClassifier("workloadClassifier", {
context: "test_context",
databaseName: "testdb",
endTime: "14:00",
importance: "high",
label: "test_label",
memberName: "dbo",
resourceGroupName: "Default-SQL-SouthEastAsia",
serverName: "testsvr",
startTime: "12:00",
workloadClassifierName: "wlm_workloadclassifier",
workloadGroupName: "wlm_workloadgroup",
});
resources:
workloadClassifier:
type: azure-native:sql:WorkloadClassifier
properties:
context: test_context
databaseName: testdb
endTime: 14:00
importance: high
label: test_label
memberName: dbo
resourceGroupName: Default-SQL-SouthEastAsia
serverName: testsvr
startTime: 12:00
workloadClassifierName: wlm_workloadclassifier
workloadGroupName: wlm_workloadgroup
Create a workload group with the required properties specified.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workloadClassifier = new AzureNative.Sql.WorkloadClassifier("workloadClassifier", new()
{
DatabaseName = "testdb",
MemberName = "dbo",
ResourceGroupName = "Default-SQL-SouthEastAsia",
ServerName = "testsvr",
WorkloadClassifierName = "wlm_workloadclassifier",
WorkloadGroupName = "wlm_workloadgroup",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewWorkloadClassifier(ctx, "workloadClassifier", &sql.WorkloadClassifierArgs{
DatabaseName: pulumi.String("testdb"),
MemberName: pulumi.String("dbo"),
ResourceGroupName: pulumi.String("Default-SQL-SouthEastAsia"),
ServerName: pulumi.String("testsvr"),
WorkloadClassifierName: pulumi.String("wlm_workloadclassifier"),
WorkloadGroupName: pulumi.String("wlm_workloadgroup"),
})
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.sql.WorkloadClassifier;
import com.pulumi.azurenative.sql.WorkloadClassifierArgs;
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 workloadClassifier = new WorkloadClassifier("workloadClassifier", WorkloadClassifierArgs.builder()
.databaseName("testdb")
.memberName("dbo")
.resourceGroupName("Default-SQL-SouthEastAsia")
.serverName("testsvr")
.workloadClassifierName("wlm_workloadclassifier")
.workloadGroupName("wlm_workloadgroup")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
workload_classifier = azure_native.sql.WorkloadClassifier("workloadClassifier",
database_name="testdb",
member_name="dbo",
resource_group_name="Default-SQL-SouthEastAsia",
server_name="testsvr",
workload_classifier_name="wlm_workloadclassifier",
workload_group_name="wlm_workloadgroup")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const workloadClassifier = new azure_native.sql.WorkloadClassifier("workloadClassifier", {
databaseName: "testdb",
memberName: "dbo",
resourceGroupName: "Default-SQL-SouthEastAsia",
serverName: "testsvr",
workloadClassifierName: "wlm_workloadclassifier",
workloadGroupName: "wlm_workloadgroup",
});
resources:
workloadClassifier:
type: azure-native:sql:WorkloadClassifier
properties:
databaseName: testdb
memberName: dbo
resourceGroupName: Default-SQL-SouthEastAsia
serverName: testsvr
workloadClassifierName: wlm_workloadclassifier
workloadGroupName: wlm_workloadgroup
Create WorkloadClassifier Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkloadClassifier(name: string, args: WorkloadClassifierArgs, opts?: CustomResourceOptions);
@overload
def WorkloadClassifier(resource_name: str,
args: WorkloadClassifierArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkloadClassifier(resource_name: str,
opts: Optional[ResourceOptions] = None,
database_name: Optional[str] = None,
member_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
workload_group_name: Optional[str] = None,
context: Optional[str] = None,
end_time: Optional[str] = None,
importance: Optional[str] = None,
label: Optional[str] = None,
start_time: Optional[str] = None,
workload_classifier_name: Optional[str] = None)
func NewWorkloadClassifier(ctx *Context, name string, args WorkloadClassifierArgs, opts ...ResourceOption) (*WorkloadClassifier, error)
public WorkloadClassifier(string name, WorkloadClassifierArgs args, CustomResourceOptions? opts = null)
public WorkloadClassifier(String name, WorkloadClassifierArgs args)
public WorkloadClassifier(String name, WorkloadClassifierArgs args, CustomResourceOptions options)
type: azure-native:sql:WorkloadClassifier
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 WorkloadClassifierArgs
- 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 WorkloadClassifierArgs
- 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 WorkloadClassifierArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkloadClassifierArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkloadClassifierArgs
- 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 workloadClassifierResource = new AzureNative.Sql.WorkloadClassifier("workloadClassifierResource", new()
{
DatabaseName = "string",
MemberName = "string",
ResourceGroupName = "string",
ServerName = "string",
WorkloadGroupName = "string",
Context = "string",
EndTime = "string",
Importance = "string",
Label = "string",
StartTime = "string",
WorkloadClassifierName = "string",
});
example, err := sql.NewWorkloadClassifier(ctx, "workloadClassifierResource", &sql.WorkloadClassifierArgs{
DatabaseName: pulumi.String("string"),
MemberName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
ServerName: pulumi.String("string"),
WorkloadGroupName: pulumi.String("string"),
Context: pulumi.String("string"),
EndTime: pulumi.String("string"),
Importance: pulumi.String("string"),
Label: pulumi.String("string"),
StartTime: pulumi.String("string"),
WorkloadClassifierName: pulumi.String("string"),
})
var workloadClassifierResource = new WorkloadClassifier("workloadClassifierResource", WorkloadClassifierArgs.builder()
.databaseName("string")
.memberName("string")
.resourceGroupName("string")
.serverName("string")
.workloadGroupName("string")
.context("string")
.endTime("string")
.importance("string")
.label("string")
.startTime("string")
.workloadClassifierName("string")
.build());
workload_classifier_resource = azure_native.sql.WorkloadClassifier("workloadClassifierResource",
database_name="string",
member_name="string",
resource_group_name="string",
server_name="string",
workload_group_name="string",
context="string",
end_time="string",
importance="string",
label="string",
start_time="string",
workload_classifier_name="string")
const workloadClassifierResource = new azure_native.sql.WorkloadClassifier("workloadClassifierResource", {
databaseName: "string",
memberName: "string",
resourceGroupName: "string",
serverName: "string",
workloadGroupName: "string",
context: "string",
endTime: "string",
importance: "string",
label: "string",
startTime: "string",
workloadClassifierName: "string",
});
type: azure-native:sql:WorkloadClassifier
properties:
context: string
databaseName: string
endTime: string
importance: string
label: string
memberName: string
resourceGroupName: string
serverName: string
startTime: string
workloadClassifierName: string
workloadGroupName: string
WorkloadClassifier 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 WorkloadClassifier resource accepts the following input properties:
- Database
Name string - The name of the database.
- Member
Name string - The workload classifier member name.
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string - The name of the server.
- Workload
Group stringName - The name of the workload group from which to receive the classifier from.
- Context string
- The workload classifier context.
- End
Time string - The workload classifier end time for classification.
- Importance string
- The workload classifier importance.
- Label string
- The workload classifier label.
- Start
Time string - The workload classifier start time for classification.
- Workload
Classifier stringName - The name of the workload classifier to create/update.
- Database
Name string - The name of the database.
- Member
Name string - The workload classifier member name.
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string - The name of the server.
- Workload
Group stringName - The name of the workload group from which to receive the classifier from.
- Context string
- The workload classifier context.
- End
Time string - The workload classifier end time for classification.
- Importance string
- The workload classifier importance.
- Label string
- The workload classifier label.
- Start
Time string - The workload classifier start time for classification.
- Workload
Classifier stringName - The name of the workload classifier to create/update.
- database
Name String - The name of the database.
- member
Name String - The workload classifier member name.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String - The name of the server.
- workload
Group StringName - The name of the workload group from which to receive the classifier from.
- context String
- The workload classifier context.
- end
Time String - The workload classifier end time for classification.
- importance String
- The workload classifier importance.
- label String
- The workload classifier label.
- start
Time String - The workload classifier start time for classification.
- workload
Classifier StringName - The name of the workload classifier to create/update.
- database
Name string - The name of the database.
- member
Name string - The workload classifier member name.
- resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name string - The name of the server.
- workload
Group stringName - The name of the workload group from which to receive the classifier from.
- context string
- The workload classifier context.
- end
Time string - The workload classifier end time for classification.
- importance string
- The workload classifier importance.
- label string
- The workload classifier label.
- start
Time string - The workload classifier start time for classification.
- workload
Classifier stringName - The name of the workload classifier to create/update.
- database_
name str - The name of the database.
- member_
name str - The workload classifier member name.
- resource_
group_ strname - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server_
name str - The name of the server.
- workload_
group_ strname - The name of the workload group from which to receive the classifier from.
- context str
- The workload classifier context.
- end_
time str - The workload classifier end time for classification.
- importance str
- The workload classifier importance.
- label str
- The workload classifier label.
- start_
time str - The workload classifier start time for classification.
- workload_
classifier_ strname - The name of the workload classifier to create/update.
- database
Name String - The name of the database.
- member
Name String - The workload classifier member name.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String - The name of the server.
- workload
Group StringName - The name of the workload group from which to receive the classifier from.
- context String
- The workload classifier context.
- end
Time String - The workload classifier end time for classification.
- importance String
- The workload classifier importance.
- label String
- The workload classifier label.
- start
Time String - The workload classifier start time for classification.
- workload
Classifier StringName - The name of the workload classifier to create/update.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkloadClassifier resource produces the following output properties:
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:WorkloadClassifier wlm_workloadclassifier /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0