1. Packages
  2. Azure Native
  3. API Docs
  4. dbforpostgresql
  5. Role
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.dbforpostgresql.Role

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

    Represents a cluster role. Azure REST API version: 2022-11-08.

    Other available API versions: 2023-03-02-preview.

    Example Usage

    RoleCreate

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

    Create Role Resource

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

    Constructor syntax

    new Role(name: string, args: RoleArgs, opts?: CustomResourceOptions);
    @overload
    def Role(resource_name: str,
             args: RoleArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Role(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             cluster_name: Optional[str] = None,
             password: Optional[str] = None,
             resource_group_name: Optional[str] = None,
             role_name: Optional[str] = None)
    func NewRole(ctx *Context, name string, args RoleArgs, opts ...ResourceOption) (*Role, error)
    public Role(string name, RoleArgs args, CustomResourceOptions? opts = null)
    public Role(String name, RoleArgs args)
    public Role(String name, RoleArgs args, CustomResourceOptions options)
    
    type: azure-native:dbforpostgresql:Role
    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 RoleArgs
    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 RoleArgs
    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 RoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoleArgs
    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 roleResource = new AzureNative.DBforPostgreSQL.Role("roleResource", new()
    {
        ClusterName = "string",
        Password = "string",
        ResourceGroupName = "string",
        RoleName = "string",
    });
    
    example, err := dbforpostgresql.NewRole(ctx, "roleResource", &dbforpostgresql.RoleArgs{
    ClusterName: pulumi.String("string"),
    Password: pulumi.String("string"),
    ResourceGroupName: pulumi.String("string"),
    RoleName: pulumi.String("string"),
    })
    
    var roleResource = new Role("roleResource", RoleArgs.builder()
        .clusterName("string")
        .password("string")
        .resourceGroupName("string")
        .roleName("string")
        .build());
    
    role_resource = azure_native.dbforpostgresql.Role("roleResource",
        cluster_name="string",
        password="string",
        resource_group_name="string",
        role_name="string")
    
    const roleResource = new azure_native.dbforpostgresql.Role("roleResource", {
        clusterName: "string",
        password: "string",
        resourceGroupName: "string",
        roleName: "string",
    });
    
    type: azure-native:dbforpostgresql:Role
    properties:
        clusterName: string
        password: string
        resourceGroupName: string
        roleName: string
    

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

    ClusterName string
    The name of the cluster.
    Password string
    The password of the cluster role.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    RoleName string
    The name of the cluster role.
    ClusterName string
    The name of the cluster.
    Password string
    The password of the cluster role.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    RoleName string
    The name of the cluster role.
    clusterName String
    The name of the cluster.
    password String
    The password of the cluster role.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    roleName String
    The name of the cluster role.
    clusterName string
    The name of the cluster.
    password string
    The password of the cluster role.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    roleName string
    The name of the cluster role.
    cluster_name str
    The name of the cluster.
    password str
    The password of the cluster role.
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    role_name str
    The name of the cluster role.
    clusterName String
    The name of the cluster.
    password String
    The password of the cluster role.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    roleName String
    The name of the cluster role.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Role resource produces the following output properties:

    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"
    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"
    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"
    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"
    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"
    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

    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:Role 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 v1 docs if using the v1 version of this package.
    Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi