1. Packages
  2. Azure Native
  3. API Docs
  4. dbforpostgresql
  5. ServerGroupRole
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.dbforpostgresql.ServerGroupRole

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

    Represents a cluster role.

    Uses Azure REST API version 2023-03-02-preview.

    Other available API versions: 2022-11-08. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native dbforpostgresql [ApiVersion]. See the version guide for details.

    Example Usage

    RoleCreate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var serverGroupRole = new AzureNative.DBforPostgreSQL.ServerGroupRole("serverGroupRole", new()
        {
            ClusterName = "pgtestsvc4",
            Password = "password",
            ResourceGroupName = "TestGroup",
            RoleName = "role1",
        });
    
    });
    
    package main
    
    import (
    	dbforpostgresql "github.com/pulumi/pulumi-azure-native-sdk/dbforpostgresql/v3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dbforpostgresql.NewServerGroupRole(ctx, "serverGroupRole", &dbforpostgresql.ServerGroupRoleArgs{
    			ClusterName:       pulumi.String("pgtestsvc4"),
    			Password:          pulumi.String("password"),
    			ResourceGroupName: pulumi.String("TestGroup"),
    			RoleName:          pulumi.String("role1"),
    		})
    		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.dbforpostgresql.ServerGroupRole;
    import com.pulumi.azurenative.dbforpostgresql.ServerGroupRoleArgs;
    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 serverGroupRole = new ServerGroupRole("serverGroupRole", ServerGroupRoleArgs.builder()
                .clusterName("pgtestsvc4")
                .password("password")
                .resourceGroupName("TestGroup")
                .roleName("role1")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const serverGroupRole = new azure_native.dbforpostgresql.ServerGroupRole("serverGroupRole", {
        clusterName: "pgtestsvc4",
        password: "password",
        resourceGroupName: "TestGroup",
        roleName: "role1",
    });
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    server_group_role = azure_native.dbforpostgresql.ServerGroupRole("serverGroupRole",
        cluster_name="pgtestsvc4",
        password="password",
        resource_group_name="TestGroup",
        role_name="role1")
    
    resources:
      serverGroupRole:
        type: azure-native:dbforpostgresql:ServerGroupRole
        properties:
          clusterName: pgtestsvc4
          password: password
          resourceGroupName: TestGroup
          roleName: role1
    

    Create ServerGroupRole Resource

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

    Constructor syntax

    new ServerGroupRole(name: string, args: ServerGroupRoleArgs, opts?: CustomResourceOptions);
    @overload
    def ServerGroupRole(resource_name: str,
                        args: ServerGroupRoleArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServerGroupRole(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        cluster_name: Optional[str] = None,
                        object_id: Optional[str] = None,
                        principal_type: Optional[Union[str, PrincipalType]] = None,
                        resource_group_name: Optional[str] = None,
                        password: Optional[str] = None,
                        role_name: Optional[str] = None,
                        role_type: Optional[Union[str, RoleType]] = None,
                        tenant_id: Optional[str] = None)
    func NewServerGroupRole(ctx *Context, name string, args ServerGroupRoleArgs, opts ...ResourceOption) (*ServerGroupRole, error)
    public ServerGroupRole(string name, ServerGroupRoleArgs args, CustomResourceOptions? opts = null)
    public ServerGroupRole(String name, ServerGroupRoleArgs args)
    public ServerGroupRole(String name, ServerGroupRoleArgs args, CustomResourceOptions options)
    
    type: azure-native:dbforpostgresql:ServerGroupRole
    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 ServerGroupRoleArgs
    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 ServerGroupRoleArgs
    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 ServerGroupRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServerGroupRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServerGroupRoleArgs
    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 serverGroupRoleResource = new AzureNative.DBforPostgreSQL.ServerGroupRole("serverGroupRoleResource", new()
    {
        ClusterName = "string",
        ObjectId = "string",
        PrincipalType = "string",
        ResourceGroupName = "string",
        Password = "string",
        RoleName = "string",
        RoleType = "string",
        TenantId = "string",
    });
    
    example, err := dbforpostgresql.NewServerGroupRole(ctx, "serverGroupRoleResource", &dbforpostgresql.ServerGroupRoleArgs{
    	ClusterName:       pulumi.String("string"),
    	ObjectId:          pulumi.String("string"),
    	PrincipalType:     pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	Password:          pulumi.String("string"),
    	RoleName:          pulumi.String("string"),
    	RoleType:          pulumi.String("string"),
    	TenantId:          pulumi.String("string"),
    })
    
    var serverGroupRoleResource = new ServerGroupRole("serverGroupRoleResource", ServerGroupRoleArgs.builder()
        .clusterName("string")
        .objectId("string")
        .principalType("string")
        .resourceGroupName("string")
        .password("string")
        .roleName("string")
        .roleType("string")
        .tenantId("string")
        .build());
    
    server_group_role_resource = azure_native.dbforpostgresql.ServerGroupRole("serverGroupRoleResource",
        cluster_name="string",
        object_id="string",
        principal_type="string",
        resource_group_name="string",
        password="string",
        role_name="string",
        role_type="string",
        tenant_id="string")
    
    const serverGroupRoleResource = new azure_native.dbforpostgresql.ServerGroupRole("serverGroupRoleResource", {
        clusterName: "string",
        objectId: "string",
        principalType: "string",
        resourceGroupName: "string",
        password: "string",
        roleName: "string",
        roleType: "string",
        tenantId: "string",
    });
    
    type: azure-native:dbforpostgresql:ServerGroupRole
    properties:
        clusterName: string
        objectId: string
        password: string
        principalType: string
        resourceGroupName: string
        roleName: string
        roleType: string
        tenantId: string
    

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

    ClusterName string
    The name of the cluster.
    ObjectId string
    PrincipalType string | Pulumi.AzureNative.DBforPostgreSQL.PrincipalType
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Password string
    The password of the cluster role. If an identity is used, password will not be required.
    RoleName string
    The name of the cluster role.
    RoleType string | Pulumi.AzureNative.DBforPostgreSQL.RoleType
    TenantId string
    ClusterName string
    The name of the cluster.
    ObjectId string
    PrincipalType string | PrincipalType
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Password string
    The password of the cluster role. If an identity is used, password will not be required.
    RoleName string
    The name of the cluster role.
    RoleType string | RoleType
    TenantId string
    clusterName String
    The name of the cluster.
    objectId String
    principalType String | PrincipalType
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    password String
    The password of the cluster role. If an identity is used, password will not be required.
    roleName String
    The name of the cluster role.
    roleType String | RoleType
    tenantId String
    clusterName string
    The name of the cluster.
    objectId string
    principalType string | PrincipalType
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    password string
    The password of the cluster role. If an identity is used, password will not be required.
    roleName string
    The name of the cluster role.
    roleType string | RoleType
    tenantId string
    cluster_name str
    The name of the cluster.
    object_id str
    principal_type str | PrincipalType
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    password str
    The password of the cluster role. If an identity is used, password will not be required.
    role_name str
    The name of the cluster role.
    role_type str | RoleType
    tenant_id str
    clusterName String
    The name of the cluster.
    objectId String
    principalType String | "user" | "servicePrincipal" | "group"
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    password String
    The password of the cluster role. If an identity is used, password will not be required.
    roleName String
    The name of the cluster role.
    roleType String | "user" | "admin"
    tenantId String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServerGroupRole 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 resource
    ProvisioningState string
    Provisioning state of the role
    SystemData Pulumi.AzureNative.DBforPostgreSQL.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    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 resource
    ProvisioningState string
    Provisioning state of the role
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    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 resource
    provisioningState String
    Provisioning state of the role
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    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 resource
    provisioningState string
    Provisioning state of the role
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    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 resource
    provisioning_state str
    Provisioning state of the role
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    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 resource
    provisioningState String
    Provisioning state of the role
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Supporting Types

    PrincipalType, PrincipalTypeArgs

    User
    user
    ServicePrincipal
    servicePrincipal
    @Group
    group
    PrincipalTypeUser
    user
    PrincipalTypeServicePrincipal
    servicePrincipal
    PrincipalTypeGroup
    group
    User
    user
    ServicePrincipal
    servicePrincipal
    Group
    group
    User
    user
    ServicePrincipal
    servicePrincipal
    Group
    group
    USER
    user
    SERVICE_PRINCIPAL
    servicePrincipal
    GROUP
    group
    "user"
    user
    "servicePrincipal"
    servicePrincipal
    "group"
    group

    RoleType, RoleTypeArgs

    User
    user
    Admin
    admin
    RoleTypeUser
    user
    RoleTypeAdmin
    admin
    User
    user
    Admin
    admin
    User
    user
    Admin
    admin
    USER
    user
    ADMIN
    admin
    "user"
    user
    "admin"
    admin

    SystemDataResponse, SystemDataResponseArgs

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    Import

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

    $ pulumi import azure-native:dbforpostgresql:ServerGroupRole role1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName} 
    

    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