azure-native.sql.ServerTrustGroup
Explore with Pulumi AI
A server trust group. API Version: 2020-11-01-preview.
Example Usage
Create server trust group
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var serverTrustGroup = new AzureNative.Sql.ServerTrustGroup("serverTrustGroup", new()
{
GroupMembers = new[]
{
new AzureNative.Sql.Inputs.ServerInfoArgs
{
ServerId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1",
},
new AzureNative.Sql.Inputs.ServerInfoArgs
{
ServerId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2",
},
},
LocationName = "Japan East",
ResourceGroupName = "Default",
ServerTrustGroupName = "server-trust-group-test",
TrustScopes = new[]
{
"GlobalTransactions",
"ServiceBroker",
},
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewServerTrustGroup(ctx, "serverTrustGroup", &sql.ServerTrustGroupArgs{
GroupMembers: []sql.ServerInfoArgs{
{
ServerId: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"),
},
{
ServerId: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"),
},
},
LocationName: pulumi.String("Japan East"),
ResourceGroupName: pulumi.String("Default"),
ServerTrustGroupName: pulumi.String("server-trust-group-test"),
TrustScopes: pulumi.StringArray{
pulumi.String("GlobalTransactions"),
pulumi.String("ServiceBroker"),
},
})
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.ServerTrustGroup;
import com.pulumi.azurenative.sql.ServerTrustGroupArgs;
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 serverTrustGroup = new ServerTrustGroup("serverTrustGroup", ServerTrustGroupArgs.builder()
.groupMembers(
Map.of("serverId", "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"),
Map.of("serverId", "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"))
.locationName("Japan East")
.resourceGroupName("Default")
.serverTrustGroupName("server-trust-group-test")
.trustScopes(
"GlobalTransactions",
"ServiceBroker")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
server_trust_group = azure_native.sql.ServerTrustGroup("serverTrustGroup",
group_members=[
azure_native.sql.ServerInfoArgs(
server_id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1",
),
azure_native.sql.ServerInfoArgs(
server_id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2",
),
],
location_name="Japan East",
resource_group_name="Default",
server_trust_group_name="server-trust-group-test",
trust_scopes=[
"GlobalTransactions",
"ServiceBroker",
])
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const serverTrustGroup = new azure_native.sql.ServerTrustGroup("serverTrustGroup", {
groupMembers: [
{
serverId: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1",
},
{
serverId: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2",
},
],
locationName: "Japan East",
resourceGroupName: "Default",
serverTrustGroupName: "server-trust-group-test",
trustScopes: [
"GlobalTransactions",
"ServiceBroker",
],
});
resources:
serverTrustGroup:
type: azure-native:sql:ServerTrustGroup
properties:
groupMembers:
- serverId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1
- serverId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2
locationName: Japan East
resourceGroupName: Default
serverTrustGroupName: server-trust-group-test
trustScopes:
- GlobalTransactions
- ServiceBroker
Create ServerTrustGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerTrustGroup(name: string, args: ServerTrustGroupArgs, opts?: CustomResourceOptions);
@overload
def ServerTrustGroup(resource_name: str,
args: ServerTrustGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerTrustGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_members: Optional[Sequence[ServerInfoArgs]] = None,
location_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
trust_scopes: Optional[Sequence[str]] = None,
server_trust_group_name: Optional[str] = None)
func NewServerTrustGroup(ctx *Context, name string, args ServerTrustGroupArgs, opts ...ResourceOption) (*ServerTrustGroup, error)
public ServerTrustGroup(string name, ServerTrustGroupArgs args, CustomResourceOptions? opts = null)
public ServerTrustGroup(String name, ServerTrustGroupArgs args)
public ServerTrustGroup(String name, ServerTrustGroupArgs args, CustomResourceOptions options)
type: azure-native:sql:ServerTrustGroup
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 ServerTrustGroupArgs
- 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 ServerTrustGroupArgs
- 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 ServerTrustGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerTrustGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerTrustGroupArgs
- 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 serverTrustGroupResource = new AzureNative.Sql.ServerTrustGroup("serverTrustGroupResource", new()
{
GroupMembers = new[]
{
{
{ "serverId", "string" },
},
},
LocationName = "string",
ResourceGroupName = "string",
TrustScopes = new[]
{
"string",
},
ServerTrustGroupName = "string",
});
example, err := sql.NewServerTrustGroup(ctx, "serverTrustGroupResource", &sql.ServerTrustGroupArgs{
GroupMembers: []map[string]interface{}{
map[string]interface{}{
"serverId": "string",
},
},
LocationName: "string",
ResourceGroupName: "string",
TrustScopes: []string{
"string",
},
ServerTrustGroupName: "string",
})
var serverTrustGroupResource = new ServerTrustGroup("serverTrustGroupResource", ServerTrustGroupArgs.builder()
.groupMembers(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.locationName("string")
.resourceGroupName("string")
.trustScopes("string")
.serverTrustGroupName("string")
.build());
server_trust_group_resource = azure_native.sql.ServerTrustGroup("serverTrustGroupResource",
group_members=[{
serverId: string,
}],
location_name=string,
resource_group_name=string,
trust_scopes=[string],
server_trust_group_name=string)
const serverTrustGroupResource = new azure_native.sql.ServerTrustGroup("serverTrustGroupResource", {
groupMembers: [{
serverId: "string",
}],
locationName: "string",
resourceGroupName: "string",
trustScopes: ["string"],
serverTrustGroupName: "string",
});
type: azure-native:sql:ServerTrustGroup
properties:
groupMembers:
- serverId: string
locationName: string
resourceGroupName: string
serverTrustGroupName: string
trustScopes:
- string
ServerTrustGroup 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 ServerTrustGroup resource accepts the following input properties:
- Group
Members List<Pulumi.Azure Native. Sql. Inputs. Server Info> - Group members information for the server trust group.
- Location
Name string - The name of the region where the resource is located.
- 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.
- Trust
Scopes List<string> - Trust scope of the server trust group.
- Server
Trust stringGroup Name - The name of the server trust group.
- Group
Members []ServerInfo Args - Group members information for the server trust group.
- Location
Name string - The name of the region where the resource is located.
- 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.
- Trust
Scopes []string - Trust scope of the server trust group.
- Server
Trust stringGroup Name - The name of the server trust group.
- group
Members List<ServerInfo> - Group members information for the server trust group.
- location
Name String - The name of the region where the resource is located.
- 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.
- trust
Scopes List<String> - Trust scope of the server trust group.
- server
Trust StringGroup Name - The name of the server trust group.
- group
Members ServerInfo[] - Group members information for the server trust group.
- location
Name string - The name of the region where the resource is located.
- 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.
- trust
Scopes string[] - Trust scope of the server trust group.
- server
Trust stringGroup Name - The name of the server trust group.
- group_
members Sequence[ServerInfo Args] - Group members information for the server trust group.
- location_
name str - The name of the region where the resource is located.
- 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.
- trust_
scopes Sequence[str] - Trust scope of the server trust group.
- server_
trust_ strgroup_ name - The name of the server trust group.
- group
Members List<Property Map> - Group members information for the server trust group.
- location
Name String - The name of the region where the resource is located.
- 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.
- trust
Scopes List<String> - Trust scope of the server trust group.
- server
Trust StringGroup Name - The name of the server trust group.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerTrustGroup resource produces the following output properties:
Supporting Types
ServerInfo, ServerInfoArgs
- Server
Id string - Server Id.
- Server
Id string - Server Id.
- server
Id String - Server Id.
- server
Id string - Server Id.
- server_
id str - Server Id.
- server
Id String - Server Id.
ServerInfoResponse, ServerInfoResponseArgs
- Server
Id string - Server Id.
- Server
Id string - Server Id.
- server
Id String - Server Id.
- server
Id string - Server Id.
- server_
id str - Server Id.
- server
Id String - Server Id.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:ServerTrustGroup server-trust-group-test /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test
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