tencentcloud 1.81.191 published on Friday, May 9, 2025 by tencentcloudstack
tencentcloud.getPostgresqlAccountPrivileges
Explore with Pulumi AI
tencentcloud 1.81.191 published on Friday, May 9, 2025 by tencentcloudstack
Use this data source to query detailed information of postgresql account privileges
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = tencentcloud.getPostgresqlAccountPrivileges({
    databaseObjectSets: [{
        objectName: "postgres",
        objectType: "database",
    }],
    dbInstanceId: "postgres-3hk6b6tj",
    userName: "tf_example",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.get_postgresql_account_privileges(database_object_sets=[{
        "object_name": "postgres",
        "object_type": "database",
    }],
    db_instance_id="postgres-3hk6b6tj",
    user_name="tf_example")
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tencentcloud.GetPostgresqlAccountPrivileges(ctx, &tencentcloud.GetPostgresqlAccountPrivilegesArgs{
			DatabaseObjectSets: []tencentcloud.GetPostgresqlAccountPrivilegesDatabaseObjectSet{
				{
					ObjectName: "postgres",
					ObjectType: "database",
				},
			},
			DbInstanceId: "postgres-3hk6b6tj",
			UserName:     "tf_example",
		}, nil)
		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 example = Tencentcloud.GetPostgresqlAccountPrivileges.Invoke(new()
    {
        DatabaseObjectSets = new[]
        {
            new Tencentcloud.Inputs.GetPostgresqlAccountPrivilegesDatabaseObjectSetInputArgs
            {
                ObjectName = "postgres",
                ObjectType = "database",
            },
        },
        DbInstanceId = "postgres-3hk6b6tj",
        UserName = "tf_example",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetPostgresqlAccountPrivilegesArgs;
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 example = TencentcloudFunctions.getPostgresqlAccountPrivileges(GetPostgresqlAccountPrivilegesArgs.builder()
            .databaseObjectSets(GetPostgresqlAccountPrivilegesDatabaseObjectSetArgs.builder()
                .objectName("postgres")
                .objectType("database")
                .build())
            .dbInstanceId("postgres-3hk6b6tj")
            .userName("tf_example")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: tencentcloud:getPostgresqlAccountPrivileges
      arguments:
        databaseObjectSets:
          - objectName: postgres
            objectType: database
        dbInstanceId: postgres-3hk6b6tj
        userName: tf_example
Using getPostgresqlAccountPrivileges
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPostgresqlAccountPrivileges(args: GetPostgresqlAccountPrivilegesArgs, opts?: InvokeOptions): Promise<GetPostgresqlAccountPrivilegesResult>
function getPostgresqlAccountPrivilegesOutput(args: GetPostgresqlAccountPrivilegesOutputArgs, opts?: InvokeOptions): Output<GetPostgresqlAccountPrivilegesResult>def get_postgresql_account_privileges(database_object_sets: Optional[Sequence[GetPostgresqlAccountPrivilegesDatabaseObjectSet]] = None,
                                      db_instance_id: Optional[str] = None,
                                      id: Optional[str] = None,
                                      result_output_file: Optional[str] = None,
                                      user_name: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetPostgresqlAccountPrivilegesResult
def get_postgresql_account_privileges_output(database_object_sets: Optional[pulumi.Input[Sequence[pulumi.Input[GetPostgresqlAccountPrivilegesDatabaseObjectSetArgs]]]] = None,
                                      db_instance_id: Optional[pulumi.Input[str]] = None,
                                      id: Optional[pulumi.Input[str]] = None,
                                      result_output_file: Optional[pulumi.Input[str]] = None,
                                      user_name: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetPostgresqlAccountPrivilegesResult]func GetPostgresqlAccountPrivileges(ctx *Context, args *GetPostgresqlAccountPrivilegesArgs, opts ...InvokeOption) (*GetPostgresqlAccountPrivilegesResult, error)
func GetPostgresqlAccountPrivilegesOutput(ctx *Context, args *GetPostgresqlAccountPrivilegesOutputArgs, opts ...InvokeOption) GetPostgresqlAccountPrivilegesResultOutput> Note: This function is named GetPostgresqlAccountPrivileges in the Go SDK.
public static class GetPostgresqlAccountPrivileges 
{
    public static Task<GetPostgresqlAccountPrivilegesResult> InvokeAsync(GetPostgresqlAccountPrivilegesArgs args, InvokeOptions? opts = null)
    public static Output<GetPostgresqlAccountPrivilegesResult> Invoke(GetPostgresqlAccountPrivilegesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPostgresqlAccountPrivilegesResult> getPostgresqlAccountPrivileges(GetPostgresqlAccountPrivilegesArgs args, InvokeOptions options)
public static Output<GetPostgresqlAccountPrivilegesResult> getPostgresqlAccountPrivileges(GetPostgresqlAccountPrivilegesArgs args, InvokeOptions options)
fn::invoke:
  function: tencentcloud:index/getPostgresqlAccountPrivileges:getPostgresqlAccountPrivileges
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DatabaseObject List<GetSets Postgresql Account Privileges Database Object Set> 
- Instance database object info.
- DbInstance stringId 
- Instance ID.
- UserName string
- Instance username.
- Id string
- ResultOutput stringFile 
- Used to save results.
- DatabaseObject []GetSets Postgresql Account Privileges Database Object Set 
- Instance database object info.
- DbInstance stringId 
- Instance ID.
- UserName string
- Instance username.
- Id string
- ResultOutput stringFile 
- Used to save results.
- databaseObject List<GetSets Postgresql Account Privileges Database Object Set> 
- Instance database object info.
- dbInstance StringId 
- Instance ID.
- userName String
- Instance username.
- id String
- resultOutput StringFile 
- Used to save results.
- databaseObject GetSets Postgresql Account Privileges Database Object Set[] 
- Instance database object info.
- dbInstance stringId 
- Instance ID.
- userName string
- Instance username.
- id string
- resultOutput stringFile 
- Used to save results.
- database_object_ Sequence[Getsets Postgresql Account Privileges Database Object Set] 
- Instance database object info.
- db_instance_ strid 
- Instance ID.
- user_name str
- Instance username.
- id str
- result_output_ strfile 
- Used to save results.
- databaseObject List<Property Map>Sets 
- Instance database object info.
- dbInstance StringId 
- Instance ID.
- userName String
- Instance username.
- id String
- resultOutput StringFile 
- Used to save results.
getPostgresqlAccountPrivileges Result
The following output properties are available:
- DatabaseObject List<GetSets Postgresql Account Privileges Database Object Set> 
- DbInstance stringId 
- Id string
- PrivilegeSets List<GetPostgresql Account Privileges Privilege Set> 
- Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
- UserName string
- ResultOutput stringFile 
- DatabaseObject []GetSets Postgresql Account Privileges Database Object Set 
- DbInstance stringId 
- Id string
- PrivilegeSets []GetPostgresql Account Privileges Privilege Set 
- Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
- UserName string
- ResultOutput stringFile 
- databaseObject List<GetSets Postgresql Account Privileges Database Object Set> 
- dbInstance StringId 
- id String
- privilegeSets List<GetPostgresql Account Privileges Privilege Set> 
- Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
- userName String
- resultOutput StringFile 
- databaseObject GetSets Postgresql Account Privileges Database Object Set[] 
- dbInstance stringId 
- id string
- privilegeSets GetPostgresql Account Privileges Privilege Set[] 
- Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
- userName string
- resultOutput stringFile 
- database_object_ Sequence[Getsets Postgresql Account Privileges Database Object Set] 
- db_instance_ strid 
- id str
- privilege_sets Sequence[GetPostgresql Account Privileges Privilege Set] 
- Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
- user_name str
- result_output_ strfile 
- databaseObject List<Property Map>Sets 
- dbInstance StringId 
- id String
- privilegeSets List<Property Map>
- Privileges the specific account has on database object. Note: This field may return null, indicating that no valid value can be obtained.
- userName String
- resultOutput StringFile 
Supporting Types
GetPostgresqlAccountPrivilegesDatabaseObjectSet      
- 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.
GetPostgresqlAccountPrivilegesPrivilegeSet     
- Objects
List<GetPostgresql Account Privileges Privilege Set Object> 
- 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'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.
- Objects
[]GetPostgresql Account Privileges Privilege Set Object 
- 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'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.
- objects
List<GetPostgresql Account Privileges Privilege Set Object> 
- 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'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.
- objects
GetPostgresql Account Privileges Privilege Set Object[] 
- 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'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.
- objects
Sequence[GetPostgresql Account Privileges Privilege Set Object] 
- 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'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.
- objects List<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'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.
GetPostgresqlAccountPrivilegesPrivilegeSetObject      
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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 tencentcloudTerraform Provider.
tencentcloud 1.81.191 published on Friday, May 9, 2025 by tencentcloudstack