Scaleway

Community
Package contributed by a community member
v0.2.1 published on Friday, Feb 25, 2022 by Lee Briggs

getDatabasePrivilege

Gets information about the privilege on a RDB database.

Example Usage

using Pulumi;
using Scaleway = Pulumi.Scaleway;

class MyStack : Stack
{
    public MyStack()
    {
        var findPriv = Output.Create(Scaleway.GetDatabasePrivilege.InvokeAsync(new Scaleway.GetDatabasePrivilegeArgs
        {
            DatabaseName = "my-database",
            InstanceId = "fr-par/11111111-1111-111111111111",
            UserName = "my-user",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-scaleway/sdk/go/scaleway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := scaleway.LookupDatabasePrivilege(ctx, &GetDatabasePrivilegeArgs{
			DatabaseName: "my-database",
			InstanceId:   "fr-par/11111111-1111-111111111111",
			UserName:     "my-user",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_scaleway as scaleway

find_priv = scaleway.get_database_privilege(database_name="my-database",
    instance_id="fr-par/11111111-1111-111111111111",
    user_name="my-user")
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

// Get the database privilege for the user "my-user" on the database "my-database" hosted on instance id fr-par/11111111-1111-1111-1111-111111111111
const findPriv = pulumi.output(scaleway.getDatabasePrivilege({
    databaseName: "my-database",
    instanceId: "fr-par/11111111-1111-111111111111",
    userName: "my-user",
}));

Coming soon!

Using getDatabasePrivilege

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 getDatabasePrivilege(args: GetDatabasePrivilegeArgs, opts?: InvokeOptions): Promise<GetDatabasePrivilegeResult>
function getDatabasePrivilegeOutput(args: GetDatabasePrivilegeOutputArgs, opts?: InvokeOptions): Output<GetDatabasePrivilegeResult>
def get_database_privilege(database_name: Optional[str] = None,
                           instance_id: Optional[str] = None,
                           user_name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDatabasePrivilegeResult
def get_database_privilege_output(database_name: Optional[pulumi.Input[str]] = None,
                           instance_id: Optional[pulumi.Input[str]] = None,
                           user_name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetDatabasePrivilegeResult]
func LookupDatabasePrivilege(ctx *Context, args *LookupDatabasePrivilegeArgs, opts ...InvokeOption) (*LookupDatabasePrivilegeResult, error)
func LookupDatabasePrivilegeOutput(ctx *Context, args *LookupDatabasePrivilegeOutputArgs, opts ...InvokeOption) LookupDatabasePrivilegeResultOutput

> Note: This function is named LookupDatabasePrivilege in the Go SDK.

public static class GetDatabasePrivilege 
{
    public static Task<GetDatabasePrivilegeResult> InvokeAsync(GetDatabasePrivilegeArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabasePrivilegeResult> Invoke(GetDatabasePrivilegeInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabasePrivilegeResult> getDatabasePrivilege(GetDatabasePrivilegeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: scaleway:index/getDatabasePrivilege:getDatabasePrivilege
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DatabaseName string

The database name.

InstanceId string

The RDB instance ID.

UserName string

The user name.

DatabaseName string

The database name.

InstanceId string

The RDB instance ID.

UserName string

The user name.

databaseName String

The database name.

instanceId String

The RDB instance ID.

userName String

The user name.

databaseName string

The database name.

instanceId string

The RDB instance ID.

userName string

The user name.

database_name str

The database name.

instance_id str

The RDB instance ID.

user_name str

The user name.

databaseName String

The database name.

instanceId String

The RDB instance ID.

userName String

The user name.

getDatabasePrivilege Result

The following output properties are available:

DatabaseName string
Id string

The provider-assigned unique ID for this managed resource.

InstanceId string
Permission string

The permission for this user on the database. Possible values are readonly, readwrite, all, custom and none.

UserName string
DatabaseName string
Id string

The provider-assigned unique ID for this managed resource.

InstanceId string
Permission string

The permission for this user on the database. Possible values are readonly, readwrite, all, custom and none.

UserName string
databaseName String
id String

The provider-assigned unique ID for this managed resource.

instanceId String
permission String

The permission for this user on the database. Possible values are readonly, readwrite, all, custom and none.

userName String
databaseName string
id string

The provider-assigned unique ID for this managed resource.

instanceId string
permission string

The permission for this user on the database. Possible values are readonly, readwrite, all, custom and none.

userName string
database_name str
id str

The provider-assigned unique ID for this managed resource.

instance_id str
permission str

The permission for this user on the database. Possible values are readonly, readwrite, all, custom and none.

user_name str
databaseName String
id String

The provider-assigned unique ID for this managed resource.

instanceId String
permission String

The permission for this user on the database. Possible values are readonly, readwrite, all, custom and none.

userName String

Package Details

Repository
https://github.com/jaxxstorm/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.