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 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)
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:
- Cluster
Name string - The name of the cluster.
- Password string
- The password of the cluster role.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Role
Name string - The name of the cluster role.
- Cluster
Name string - The name of the cluster.
- Password string
- The password of the cluster role.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Role
Name string - The name of the cluster role.
- cluster
Name String - The name of the cluster.
- password String
- The password of the cluster role.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- role
Name String - The name of the cluster role.
- cluster
Name string - The name of the cluster.
- password string
- The password of the cluster role.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- role
Name 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.
- cluster
Name String - The name of the cluster.
- password String
- The password of the cluster role.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- role
Name 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
- Provisioning
State string - Provisioning state of the role
- System
Data 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
- Provisioning
State string - Provisioning state of the role
- System
Data 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
- provisioning
State String - Provisioning state of the role
- system
Data 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
- provisioning
State string - Provisioning state of the role
- system
Data 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
- provisioning
State String - Provisioning state of the role
- system
Data 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
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified 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.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified 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