azure-native.dbforpostgresql.Role
Explore with Pulumi AI
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 * 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",
});
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")
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)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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Role resource accepts the following input properties:
- ClusterName string
- The name of the cluster.
- Password string
- The password of the cluster role.
- ResourceGroup stringName 
- 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.
- ResourceGroup stringName 
- 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.
- resourceGroup StringName 
- 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.
- resourceGroup stringName 
- 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_ strname 
- 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.
- resourceGroup StringName 
- 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.Azure Native. DBfor Postgre SQL. Outputs. System Data Response 
- 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 SystemData Response 
- 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 SystemData Response 
- 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 SystemData Response 
- 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 SystemData Response 
- 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.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- 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.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- 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.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- 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.
- createdBy stringType 
- The type of identity that created the resource.
- lastModified stringAt 
- The timestamp of resource last modification (UTC)
- lastModified stringBy 
- The identity that last modified the resource.
- lastModified stringBy Type 
- 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_ strtype 
- The type of identity that created the resource.
- last_modified_ strat 
- The timestamp of resource last modification (UTC)
- last_modified_ strby 
- The identity that last modified the resource.
- last_modified_ strby_ type 
- 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.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- 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