tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getPostgresqlAccountPrivileges
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 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 dictionary
The following arguments are supported:
- Database
Object List<GetSets Postgresql Account Privileges Database Object Set> - Instance database object info.
- Db
Instance stringId - Instance ID.
- User
Name string - Instance username.
- Id string
- Result
Output stringFile - Used to save results.
- Database
Object []GetSets Postgresql Account Privileges Database Object Set - Instance database object info.
- Db
Instance stringId - Instance ID.
- User
Name string - Instance username.
- Id string
- Result
Output stringFile - Used to save results.
- database
Object List<GetSets Postgresql Account Privileges Database Object Set> - Instance database object info.
- db
Instance StringId - Instance ID.
- user
Name String - Instance username.
- id String
- result
Output StringFile - Used to save results.
- database
Object GetSets Postgresql Account Privileges Database Object Set[] - Instance database object info.
- db
Instance stringId - Instance ID.
- user
Name string - Instance username.
- id string
- result
Output 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.
- database
Object List<Property Map>Sets - Instance database object info.
- db
Instance StringId - Instance ID.
- user
Name String - Instance username.
- id String
- result
Output StringFile - Used to save results.
getPostgresqlAccountPrivileges Result
The following output properties are available:
- Database
Object List<GetSets Postgresql Account Privileges Database Object Set> - Db
Instance stringId - Id string
- Privilege
Sets 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.
- User
Name string - Result
Output stringFile
- Database
Object []GetSets Postgresql Account Privileges Database Object Set - Db
Instance stringId - Id string
- Privilege
Sets []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 string - Result
Output stringFile
- database
Object List<GetSets Postgresql Account Privileges Database Object Set> - db
Instance StringId - id String
- privilege
Sets 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.
- user
Name String - result
Output StringFile
- database
Object GetSets Postgresql Account Privileges Database Object Set[] - db
Instance stringId - id string
- privilege
Sets 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 string - result
Output 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
- database
Object List<Property Map>Sets - db
Instance StringId - id String
- privilege
Sets 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.
- user
Name String - result
Output StringFile
Supporting Types
GetPostgresqlAccountPrivilegesDatabaseObjectSet
- Object
Name string - Database object Name.Note: This field may return null, indicating that no valid value can be obtained.
- Object
Type 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.
- Database
Name 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.
- Schema
Name 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.
- Table
Name 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 string - Database object Name.Note: This field may return null, indicating that no valid value can be obtained.
- Object
Type 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.
- Database
Name 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.
- Schema
Name 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.
- Table
Name 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 String - Database object Name.Note: This field may return null, indicating that no valid value can be obtained.
- object
Type 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.
- database
Name 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.
- schema
Name 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.
- table
Name 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 string - Database object Name.Note: This field may return null, indicating that no valid value can be obtained.
- object
Type 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.
- database
Name 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.
- schema
Name 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.
- table
Name 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.
- object
Name String - Database object Name.Note: This field may return null, indicating that no valid value can be obtained.
- object
Type 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.
- database
Name 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.
- schema
Name 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.
- table
Name 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<Get
Postgresql 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 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
[]Get
Postgresql 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 []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<Get
Postgresql 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 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
Get
Postgresql 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 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[Get
Postgresql 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.
- privilege
Sets 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
- Database
Name 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.
- Object
Name string - Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
- Object
Type 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.
- Schema
Name 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.
- Table
Name 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 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.
- Object
Name string - Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
- Object
Type 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.
- Schema
Name 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.
- Table
Name 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 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.
- object
Name String - Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
- object
Type 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.
- schema
Name 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.
- table
Name 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 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.
- object
Name string - Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
- object
Type 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.
- schema
Name 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.
- table
Name 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.
- database
Name 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.
- object
Name String - Database object Name. Note: This field may return null, indicating that no valid value can be obtained.
- object
Type 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.
- schema
Name 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.
- table
Name 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 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack