1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. PostgresqlAccountPrivilegesOperation
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.PostgresqlAccountPrivilegesOperation

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create postgresql account privileges

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-3";
    // create vpc
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    // create vpc subnet
    const subnet = new tencentcloud.Subnet("subnet", {
        availabilityZone: availabilityZone,
        vpcId: vpc.vpcId,
        cidrBlock: "10.0.20.0/28",
        isMulticast: false,
    });
    // create postgresql
    const examplePostgresqlInstance = new tencentcloud.PostgresqlInstance("examplePostgresqlInstance", {
        availabilityZone: availabilityZone,
        chargeType: "POSTPAID_BY_HOUR",
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        dbMajorVersion: "10",
        engineVersion: "10.23",
        rootUser: "root123",
        rootPassword: "Root123$",
        charset: "UTF8",
        projectId: 0,
        cpu: 1,
        memory: 2,
        storage: 10,
        tags: {
            test: "tf",
        },
    });
    // create account
    const examplePostgresqlAccount = new tencentcloud.PostgresqlAccount("examplePostgresqlAccount", {
        dbInstanceId: examplePostgresqlInstance.postgresqlInstanceId,
        userName: "tf_example",
        password: "Password@123",
        type: "normal",
        remark: "remark",
        lockStatus: false,
    });
    // create account privileges
    const examplePostgresqlAccountPrivilegesOperation = new tencentcloud.PostgresqlAccountPrivilegesOperation("examplePostgresqlAccountPrivilegesOperation", {
        dbInstanceId: examplePostgresqlInstance.postgresqlInstanceId,
        userName: examplePostgresqlAccount.userName,
        modifyPrivilegeSets: [{
            databasePrivilege: {
                object: {
                    objectName: "postgres",
                    objectType: "database",
                },
                privilegeSets: [
                    "CONNECT",
                    "TEMPORARY",
                    "CREATE",
                ],
            },
            modifyType: "grantObject",
            isCascade: false,
        }],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-3"
    # create vpc
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    # create vpc subnet
    subnet = tencentcloud.Subnet("subnet",
        availability_zone=availability_zone,
        vpc_id=vpc.vpc_id,
        cidr_block="10.0.20.0/28",
        is_multicast=False)
    # create postgresql
    example_postgresql_instance = tencentcloud.PostgresqlInstance("examplePostgresqlInstance",
        availability_zone=availability_zone,
        charge_type="POSTPAID_BY_HOUR",
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        db_major_version="10",
        engine_version="10.23",
        root_user="root123",
        root_password="Root123$",
        charset="UTF8",
        project_id=0,
        cpu=1,
        memory=2,
        storage=10,
        tags={
            "test": "tf",
        })
    # create account
    example_postgresql_account = tencentcloud.PostgresqlAccount("examplePostgresqlAccount",
        db_instance_id=example_postgresql_instance.postgresql_instance_id,
        user_name="tf_example",
        password="Password@123",
        type="normal",
        remark="remark",
        lock_status=False)
    # create account privileges
    example_postgresql_account_privileges_operation = tencentcloud.PostgresqlAccountPrivilegesOperation("examplePostgresqlAccountPrivilegesOperation",
        db_instance_id=example_postgresql_instance.postgresql_instance_id,
        user_name=example_postgresql_account.user_name,
        modify_privilege_sets=[{
            "database_privilege": {
                "object": {
                    "object_name": "postgres",
                    "object_type": "database",
                },
                "privilege_sets": [
                    "CONNECT",
                    "TEMPORARY",
                    "CREATE",
                ],
            },
            "modify_type": "grantObject",
            "is_cascade": False,
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		availabilityZone := "ap-guangzhou-3"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		// create vpc
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		// create vpc subnet
    		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("10.0.20.0/28"),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		// create postgresql
    		examplePostgresqlInstance, err := tencentcloud.NewPostgresqlInstance(ctx, "examplePostgresqlInstance", &tencentcloud.PostgresqlInstanceArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			ChargeType:       pulumi.String("POSTPAID_BY_HOUR"),
    			VpcId:            vpc.VpcId,
    			SubnetId:         subnet.SubnetId,
    			DbMajorVersion:   pulumi.String("10"),
    			EngineVersion:    pulumi.String("10.23"),
    			RootUser:         pulumi.String("root123"),
    			RootPassword:     pulumi.String("Root123$"),
    			Charset:          pulumi.String("UTF8"),
    			ProjectId:        pulumi.Float64(0),
    			Cpu:              pulumi.Float64(1),
    			Memory:           pulumi.Float64(2),
    			Storage:          pulumi.Float64(10),
    			Tags: pulumi.StringMap{
    				"test": pulumi.String("tf"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// create account
    		examplePostgresqlAccount, err := tencentcloud.NewPostgresqlAccount(ctx, "examplePostgresqlAccount", &tencentcloud.PostgresqlAccountArgs{
    			DbInstanceId: examplePostgresqlInstance.PostgresqlInstanceId,
    			UserName:     pulumi.String("tf_example"),
    			Password:     pulumi.String("Password@123"),
    			Type:         pulumi.String("normal"),
    			Remark:       pulumi.String("remark"),
    			LockStatus:   pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		// create account privileges
    		_, err = tencentcloud.NewPostgresqlAccountPrivilegesOperation(ctx, "examplePostgresqlAccountPrivilegesOperation", &tencentcloud.PostgresqlAccountPrivilegesOperationArgs{
    			DbInstanceId: examplePostgresqlInstance.PostgresqlInstanceId,
    			UserName:     examplePostgresqlAccount.UserName,
    			ModifyPrivilegeSets: tencentcloud.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArray{
    				&tencentcloud.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs{
    					DatabasePrivilege: &tencentcloud.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeArgs{
    						Object: &tencentcloud.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObjectArgs{
    							ObjectName: pulumi.String("postgres"),
    							ObjectType: pulumi.String("database"),
    						},
    						PrivilegeSets: pulumi.StringArray{
    							pulumi.String("CONNECT"),
    							pulumi.String("TEMPORARY"),
    							pulumi.String("CREATE"),
    						},
    					},
    					ModifyType: pulumi.String("grantObject"),
    					IsCascade:  pulumi.Bool(false),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-3";
        // create vpc
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        // create vpc subnet
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            AvailabilityZone = availabilityZone,
            VpcId = vpc.VpcId,
            CidrBlock = "10.0.20.0/28",
            IsMulticast = false,
        });
    
        // create postgresql
        var examplePostgresqlInstance = new Tencentcloud.PostgresqlInstance("examplePostgresqlInstance", new()
        {
            AvailabilityZone = availabilityZone,
            ChargeType = "POSTPAID_BY_HOUR",
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            DbMajorVersion = "10",
            EngineVersion = "10.23",
            RootUser = "root123",
            RootPassword = "Root123$",
            Charset = "UTF8",
            ProjectId = 0,
            Cpu = 1,
            Memory = 2,
            Storage = 10,
            Tags = 
            {
                { "test", "tf" },
            },
        });
    
        // create account
        var examplePostgresqlAccount = new Tencentcloud.PostgresqlAccount("examplePostgresqlAccount", new()
        {
            DbInstanceId = examplePostgresqlInstance.PostgresqlInstanceId,
            UserName = "tf_example",
            Password = "Password@123",
            Type = "normal",
            Remark = "remark",
            LockStatus = false,
        });
    
        // create account privileges
        var examplePostgresqlAccountPrivilegesOperation = new Tencentcloud.PostgresqlAccountPrivilegesOperation("examplePostgresqlAccountPrivilegesOperation", new()
        {
            DbInstanceId = examplePostgresqlInstance.PostgresqlInstanceId,
            UserName = examplePostgresqlAccount.UserName,
            ModifyPrivilegeSets = new[]
            {
                new Tencentcloud.Inputs.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs
                {
                    DatabasePrivilege = new Tencentcloud.Inputs.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeArgs
                    {
                        Object = new Tencentcloud.Inputs.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObjectArgs
                        {
                            ObjectName = "postgres",
                            ObjectType = "database",
                        },
                        PrivilegeSets = new[]
                        {
                            "CONNECT",
                            "TEMPORARY",
                            "CREATE",
                        },
                    },
                    ModifyType = "grantObject",
                    IsCascade = false,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.PostgresqlInstance;
    import com.pulumi.tencentcloud.PostgresqlInstanceArgs;
    import com.pulumi.tencentcloud.PostgresqlAccount;
    import com.pulumi.tencentcloud.PostgresqlAccountArgs;
    import com.pulumi.tencentcloud.PostgresqlAccountPrivilegesOperation;
    import com.pulumi.tencentcloud.PostgresqlAccountPrivilegesOperationArgs;
    import com.pulumi.tencentcloud.inputs.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs;
    import com.pulumi.tencentcloud.inputs.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeArgs;
    import com.pulumi.tencentcloud.inputs.PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObjectArgs;
    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) {
            final var config = ctx.config();
            final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-3");
            // create vpc
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            // create vpc subnet
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .availabilityZone(availabilityZone)
                .vpcId(vpc.vpcId())
                .cidrBlock("10.0.20.0/28")
                .isMulticast(false)
                .build());
    
            // create postgresql
            var examplePostgresqlInstance = new PostgresqlInstance("examplePostgresqlInstance", PostgresqlInstanceArgs.builder()
                .availabilityZone(availabilityZone)
                .chargeType("POSTPAID_BY_HOUR")
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .dbMajorVersion("10")
                .engineVersion("10.23")
                .rootUser("root123")
                .rootPassword("Root123$")
                .charset("UTF8")
                .projectId(0)
                .cpu(1)
                .memory(2)
                .storage(10)
                .tags(Map.of("test", "tf"))
                .build());
    
            // create account
            var examplePostgresqlAccount = new PostgresqlAccount("examplePostgresqlAccount", PostgresqlAccountArgs.builder()
                .dbInstanceId(examplePostgresqlInstance.postgresqlInstanceId())
                .userName("tf_example")
                .password("Password@123")
                .type("normal")
                .remark("remark")
                .lockStatus(false)
                .build());
    
            // create account privileges
            var examplePostgresqlAccountPrivilegesOperation = new PostgresqlAccountPrivilegesOperation("examplePostgresqlAccountPrivilegesOperation", PostgresqlAccountPrivilegesOperationArgs.builder()
                .dbInstanceId(examplePostgresqlInstance.postgresqlInstanceId())
                .userName(examplePostgresqlAccount.userName())
                .modifyPrivilegeSets(PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs.builder()
                    .databasePrivilege(PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeArgs.builder()
                        .object(PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObjectArgs.builder()
                            .objectName("postgres")
                            .objectType("database")
                            .build())
                        .privilegeSets(                    
                            "CONNECT",
                            "TEMPORARY",
                            "CREATE")
                        .build())
                    .modifyType("grantObject")
                    .isCascade(false)
                    .build())
                .build());
    
        }
    }
    
    configuration:
      availabilityZone:
        type: string
        default: ap-guangzhou-3
    resources:
      # create vpc
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      # create vpc subnet
      subnet:
        type: tencentcloud:Subnet
        properties:
          availabilityZone: ${availabilityZone}
          vpcId: ${vpc.vpcId}
          cidrBlock: 10.0.20.0/28
          isMulticast: false
      # create postgresql
      examplePostgresqlInstance:
        type: tencentcloud:PostgresqlInstance
        properties:
          availabilityZone: ${availabilityZone}
          chargeType: POSTPAID_BY_HOUR
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          dbMajorVersion: '10'
          engineVersion: '10.23'
          rootUser: root123
          rootPassword: Root123$
          charset: UTF8
          projectId: 0
          cpu: 1
          memory: 2
          storage: 10
          tags:
            test: tf
      # create account
      examplePostgresqlAccount:
        type: tencentcloud:PostgresqlAccount
        properties:
          dbInstanceId: ${examplePostgresqlInstance.postgresqlInstanceId}
          userName: tf_example
          password: Password@123
          type: normal
          remark: remark
          lockStatus: false
      # create account privileges
      examplePostgresqlAccountPrivilegesOperation:
        type: tencentcloud:PostgresqlAccountPrivilegesOperation
        properties:
          dbInstanceId: ${examplePostgresqlInstance.postgresqlInstanceId}
          userName: ${examplePostgresqlAccount.userName}
          modifyPrivilegeSets:
            - databasePrivilege:
                object:
                  objectName: postgres
                  objectType: database
                privilegeSets:
                  - CONNECT
                  - TEMPORARY
                  - CREATE
              modifyType: grantObject
              isCascade: false
    

    Create PostgresqlAccountPrivilegesOperation Resource

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

    Constructor syntax

    new PostgresqlAccountPrivilegesOperation(name: string, args: PostgresqlAccountPrivilegesOperationArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresqlAccountPrivilegesOperation(resource_name: str,
                                             args: PostgresqlAccountPrivilegesOperationArgs,
                                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresqlAccountPrivilegesOperation(resource_name: str,
                                             opts: Optional[ResourceOptions] = None,
                                             db_instance_id: Optional[str] = None,
                                             modify_privilege_sets: Optional[Sequence[PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs]] = None,
                                             user_name: Optional[str] = None,
                                             postgresql_account_privileges_operation_id: Optional[str] = None)
    func NewPostgresqlAccountPrivilegesOperation(ctx *Context, name string, args PostgresqlAccountPrivilegesOperationArgs, opts ...ResourceOption) (*PostgresqlAccountPrivilegesOperation, error)
    public PostgresqlAccountPrivilegesOperation(string name, PostgresqlAccountPrivilegesOperationArgs args, CustomResourceOptions? opts = null)
    public PostgresqlAccountPrivilegesOperation(String name, PostgresqlAccountPrivilegesOperationArgs args)
    public PostgresqlAccountPrivilegesOperation(String name, PostgresqlAccountPrivilegesOperationArgs args, CustomResourceOptions options)
    
    type: tencentcloud:PostgresqlAccountPrivilegesOperation
    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 PostgresqlAccountPrivilegesOperationArgs
    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 PostgresqlAccountPrivilegesOperationArgs
    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 PostgresqlAccountPrivilegesOperationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresqlAccountPrivilegesOperationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresqlAccountPrivilegesOperationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    ModifyPrivilegeSets List<PostgresqlAccountPrivilegesOperationModifyPrivilegeSet>
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    UserName string
    Instance username.
    PostgresqlAccountPrivilegesOperationId string
    ID of the resource.
    DbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    ModifyPrivilegeSets []PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    UserName string
    Instance username.
    PostgresqlAccountPrivilegesOperationId string
    ID of the resource.
    dbInstanceId String
    Instance ID in the format of postgres-4wdeb0zv.
    modifyPrivilegeSets List<PostgresqlAccountPrivilegesOperationModifyPrivilegeSet>
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    userName String
    Instance username.
    postgresqlAccountPrivilegesOperationId String
    ID of the resource.
    dbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    modifyPrivilegeSets PostgresqlAccountPrivilegesOperationModifyPrivilegeSet[]
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    userName string
    Instance username.
    postgresqlAccountPrivilegesOperationId string
    ID of the resource.
    db_instance_id str
    Instance ID in the format of postgres-4wdeb0zv.
    modify_privilege_sets Sequence[PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs]
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    user_name str
    Instance username.
    postgresql_account_privileges_operation_id str
    ID of the resource.
    dbInstanceId String
    Instance ID in the format of postgres-4wdeb0zv.
    modifyPrivilegeSets List<Property Map>
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    userName String
    Instance username.
    postgresqlAccountPrivilegesOperationId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PostgresqlAccountPrivilegesOperation Resource

    Get an existing PostgresqlAccountPrivilegesOperation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PostgresqlAccountPrivilegesOperationState, opts?: CustomResourceOptions): PostgresqlAccountPrivilegesOperation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_instance_id: Optional[str] = None,
            modify_privilege_sets: Optional[Sequence[PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs]] = None,
            postgresql_account_privileges_operation_id: Optional[str] = None,
            user_name: Optional[str] = None) -> PostgresqlAccountPrivilegesOperation
    func GetPostgresqlAccountPrivilegesOperation(ctx *Context, name string, id IDInput, state *PostgresqlAccountPrivilegesOperationState, opts ...ResourceOption) (*PostgresqlAccountPrivilegesOperation, error)
    public static PostgresqlAccountPrivilegesOperation Get(string name, Input<string> id, PostgresqlAccountPrivilegesOperationState? state, CustomResourceOptions? opts = null)
    public static PostgresqlAccountPrivilegesOperation get(String name, Output<String> id, PostgresqlAccountPrivilegesOperationState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:PostgresqlAccountPrivilegesOperation    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    ModifyPrivilegeSets List<PostgresqlAccountPrivilegesOperationModifyPrivilegeSet>
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    PostgresqlAccountPrivilegesOperationId string
    ID of the resource.
    UserName string
    Instance username.
    DbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    ModifyPrivilegeSets []PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    PostgresqlAccountPrivilegesOperationId string
    ID of the resource.
    UserName string
    Instance username.
    dbInstanceId String
    Instance ID in the format of postgres-4wdeb0zv.
    modifyPrivilegeSets List<PostgresqlAccountPrivilegesOperationModifyPrivilegeSet>
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    postgresqlAccountPrivilegesOperationId String
    ID of the resource.
    userName String
    Instance username.
    dbInstanceId string
    Instance ID in the format of postgres-4wdeb0zv.
    modifyPrivilegeSets PostgresqlAccountPrivilegesOperationModifyPrivilegeSet[]
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    postgresqlAccountPrivilegesOperationId string
    ID of the resource.
    userName string
    Instance username.
    db_instance_id str
    Instance ID in the format of postgres-4wdeb0zv.
    modify_privilege_sets Sequence[PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs]
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    postgresql_account_privileges_operation_id str
    ID of the resource.
    user_name str
    Instance username.
    dbInstanceId String
    Instance ID in the format of postgres-4wdeb0zv.
    modifyPrivilegeSets List<Property Map>
    Privileges to modify. Batch modification supported, up to 50 entries at a time.
    postgresqlAccountPrivilegesOperationId String
    ID of the resource.
    userName String
    Instance username.

    Supporting Types

    PostgresqlAccountPrivilegesOperationModifyPrivilegeSet, PostgresqlAccountPrivilegesOperationModifyPrivilegeSetArgs

    DatabasePrivilege PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilege
    Database objects and the user permissions on these objects. Note: This field may return null, indicating that no valid value can be obtained.
    IsCascade bool
    Required only when ModifyType is revokeObject. When the parameter is true, revoking permissions will cascade. The default value is false.
    ModifyType string
    Supported modification method: grantObject, revokeObject, alterRole. grantObject represents granting permissions on object, revokeObject represents revoking permissions on object, and alterRole represents modifying the account type.
    DatabasePrivilege PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilege
    Database objects and the user permissions on these objects. Note: This field may return null, indicating that no valid value can be obtained.
    IsCascade bool
    Required only when ModifyType is revokeObject. When the parameter is true, revoking permissions will cascade. The default value is false.
    ModifyType string
    Supported modification method: grantObject, revokeObject, alterRole. grantObject represents granting permissions on object, revokeObject represents revoking permissions on object, and alterRole represents modifying the account type.
    databasePrivilege PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilege
    Database objects and the user permissions on these objects. Note: This field may return null, indicating that no valid value can be obtained.
    isCascade Boolean
    Required only when ModifyType is revokeObject. When the parameter is true, revoking permissions will cascade. The default value is false.
    modifyType String
    Supported modification method: grantObject, revokeObject, alterRole. grantObject represents granting permissions on object, revokeObject represents revoking permissions on object, and alterRole represents modifying the account type.
    databasePrivilege PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilege
    Database objects and the user permissions on these objects. Note: This field may return null, indicating that no valid value can be obtained.
    isCascade boolean
    Required only when ModifyType is revokeObject. When the parameter is true, revoking permissions will cascade. The default value is false.
    modifyType string
    Supported modification method: grantObject, revokeObject, alterRole. grantObject represents granting permissions on object, revokeObject represents revoking permissions on object, and alterRole represents modifying the account type.
    database_privilege PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilege
    Database objects and the user permissions on these objects. Note: This field may return null, indicating that no valid value can be obtained.
    is_cascade bool
    Required only when ModifyType is revokeObject. When the parameter is true, revoking permissions will cascade. The default value is false.
    modify_type str
    Supported modification method: grantObject, revokeObject, alterRole. grantObject represents granting permissions on object, revokeObject represents revoking permissions on object, and alterRole represents modifying the account type.
    databasePrivilege Property Map
    Database objects and the user permissions on these objects. Note: This field may return null, indicating that no valid value can be obtained.
    isCascade Boolean
    Required only when ModifyType is revokeObject. When the parameter is true, revoking permissions will cascade. The default value is false.
    modifyType String
    Supported modification method: grantObject, revokeObject, alterRole. grantObject represents granting permissions on object, revokeObject represents revoking permissions on object, and alterRole represents modifying the account type.

    PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilege, PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeArgs

    Object PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObject
    Database object.If ObjectType is database, DatabaseName/SchemaName/TableName can be null.If ObjectType is schema, SchemaName/TableName can be null.If ObjectType is table, TableName can be null.If ObjectType is column, DatabaseName/SchemaName/TableName can&#39;t be null.In all other cases, DatabaseName/SchemaName/TableName can be null. Note: This field may return null, indicating that no valid value can be obtained.
    PrivilegeSets List<string>
    Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
    Object PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObject
    Database object.If ObjectType is database, DatabaseName/SchemaName/TableName can be null.If ObjectType is schema, SchemaName/TableName can be null.If ObjectType is table, TableName can be null.If ObjectType is column, DatabaseName/SchemaName/TableName can&#39;t be null.In all other cases, DatabaseName/SchemaName/TableName can be null. Note: This field may return null, indicating that no valid value can be obtained.
    PrivilegeSets []string
    Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
    object PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObject
    Database object.If ObjectType is database, DatabaseName/SchemaName/TableName can be null.If ObjectType is schema, SchemaName/TableName can be null.If ObjectType is table, TableName can be null.If ObjectType is column, DatabaseName/SchemaName/TableName can&#39;t be null.In all other cases, DatabaseName/SchemaName/TableName can be null. Note: This field may return null, indicating that no valid value can be obtained.
    privilegeSets List<String>
    Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
    object PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObject
    Database object.If ObjectType is database, DatabaseName/SchemaName/TableName can be null.If ObjectType is schema, SchemaName/TableName can be null.If ObjectType is table, TableName can be null.If ObjectType is column, DatabaseName/SchemaName/TableName can&#39;t be null.In all other cases, DatabaseName/SchemaName/TableName can be null. Note: This field may return null, indicating that no valid value can be obtained.
    privilegeSets string[]
    Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
    object PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObject
    Database object.If ObjectType is database, DatabaseName/SchemaName/TableName can be null.If ObjectType is schema, SchemaName/TableName can be null.If ObjectType is table, TableName can be null.If ObjectType is column, DatabaseName/SchemaName/TableName can&#39;t be null.In all other cases, DatabaseName/SchemaName/TableName can be null. Note: This field may return null, indicating that no valid value can be obtained.
    privilege_sets Sequence[str]
    Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
    object Property Map
    Database object.If ObjectType is database, DatabaseName/SchemaName/TableName can be null.If ObjectType is schema, SchemaName/TableName can be null.If ObjectType is table, TableName can be null.If ObjectType is column, DatabaseName/SchemaName/TableName can&#39;t be null.In all other cases, DatabaseName/SchemaName/TableName can be null. Note: This field may return null, indicating that no valid value can be obtained.
    privilegeSets List<String>
    Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.

    PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObject, PostgresqlAccountPrivilegesOperationModifyPrivilegeSetDatabasePrivilegeObjectArgs

    ObjectName string
    Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
    ObjectType string
    Supported database object types: account, database, schema, sequence, procedure, type, function, table, view, matview, column. Note: This field may return null, indicating that no valid value can be obtained.
    DatabaseName string
    Database name to which the database object belongs. This parameter is mandatory when ObjectType is not database. Note: This field may return null, indicating that no valid value can be obtained.
    SchemaName string
    Schema name to which the database object belongs. This parameter is mandatory when ObjectType is not database or schema. Note: This field may return null, indicating that no valid value can be obtained.
    TableName string
    Table name to which the database object belongs. This parameter is mandatory when ObjectType is column. Note: This field may return null, indicating that no valid value can be obtained.
    ObjectName string
    Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
    ObjectType string
    Supported database object types: account, database, schema, sequence, procedure, type, function, table, view, matview, column. Note: This field may return null, indicating that no valid value can be obtained.
    DatabaseName string
    Database name to which the database object belongs. This parameter is mandatory when ObjectType is not database. Note: This field may return null, indicating that no valid value can be obtained.
    SchemaName string
    Schema name to which the database object belongs. This parameter is mandatory when ObjectType is not database or schema. Note: This field may return null, indicating that no valid value can be obtained.
    TableName string
    Table name to which the database object belongs. This parameter is mandatory when ObjectType is column. Note: This field may return null, indicating that no valid value can be obtained.
    objectName String
    Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
    objectType String
    Supported database object types: account, database, schema, sequence, procedure, type, function, table, view, matview, column. Note: This field may return null, indicating that no valid value can be obtained.
    databaseName String
    Database name to which the database object belongs. This parameter is mandatory when ObjectType is not database. Note: This field may return null, indicating that no valid value can be obtained.
    schemaName String
    Schema name to which the database object belongs. This parameter is mandatory when ObjectType is not database or schema. Note: This field may return null, indicating that no valid value can be obtained.
    tableName String
    Table name to which the database object belongs. This parameter is mandatory when ObjectType is column. Note: This field may return null, indicating that no valid value can be obtained.
    objectName string
    Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
    objectType string
    Supported database object types: account, database, schema, sequence, procedure, type, function, table, view, matview, column. Note: This field may return null, indicating that no valid value can be obtained.
    databaseName string
    Database name to which the database object belongs. This parameter is mandatory when ObjectType is not database. Note: This field may return null, indicating that no valid value can be obtained.
    schemaName string
    Schema name to which the database object belongs. This parameter is mandatory when ObjectType is not database or schema. Note: This field may return null, indicating that no valid value can be obtained.
    tableName string
    Table name to which the database object belongs. This parameter is mandatory when ObjectType is column. Note: This field may return null, indicating that no valid value can be obtained.
    object_name str
    Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
    object_type str
    Supported database object types: account, database, schema, sequence, procedure, type, function, table, view, matview, column. Note: This field may return null, indicating that no valid value can be obtained.
    database_name str
    Database name to which the database object belongs. This parameter is mandatory when ObjectType is not database. Note: This field may return null, indicating that no valid value can be obtained.
    schema_name str
    Schema name to which the database object belongs. This parameter is mandatory when ObjectType is not database or schema. Note: This field may return null, indicating that no valid value can be obtained.
    table_name str
    Table name to which the database object belongs. This parameter is mandatory when ObjectType is column. Note: This field may return null, indicating that no valid value can be obtained.
    objectName String
    Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
    objectType String
    Supported database object types: account, database, schema, sequence, procedure, type, function, table, view, matview, column. Note: This field may return null, indicating that no valid value can be obtained.
    databaseName String
    Database name to which the database object belongs. This parameter is mandatory when ObjectType is not database. Note: This field may return null, indicating that no valid value can be obtained.
    schemaName String
    Schema name to which the database object belongs. This parameter is mandatory when ObjectType is not database or schema. Note: This field may return null, indicating that no valid value can be obtained.
    tableName String
    Table name to which the database object belongs. This parameter is mandatory when ObjectType is column. Note: This field may return null, indicating that no valid value can be obtained.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack