Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse
scaleway.getDatabasePrivilege
Explore with Pulumi AI
Gets information about the privileges in a database.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
const main = scaleway.getDatabasePrivilege({
databaseName: "my-database",
instanceId: "11111111-1111-111111111111",
userName: "my-user",
});
import pulumi
import pulumi_scaleway as scaleway
main = scaleway.get_database_privilege(database_name="my-database",
instance_id="11111111-1111-111111111111",
user_name="my-user")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.LookupDatabasePrivilege(ctx, &scaleway.LookupDatabasePrivilegeArgs{
DatabaseName: "my-database",
InstanceId: "11111111-1111-111111111111",
UserName: "my-user",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = Scaleway.GetDatabasePrivilege.Invoke(new()
{
DatabaseName = "my-database",
InstanceId = "11111111-1111-111111111111",
UserName = "my-user",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetDatabasePrivilegeArgs;
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 main = ScalewayFunctions.getDatabasePrivilege(GetDatabasePrivilegeArgs.builder()
.databaseName("my-database")
.instanceId("11111111-1111-111111111111")
.userName("my-user")
.build());
}
}
variables:
main:
fn::invoke:
Function: scaleway:getDatabasePrivilege
Arguments:
databaseName: my-database
instanceId: 11111111-1111-111111111111
userName: my-user
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,
region: 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,
region: 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:
- Database
Name string - The database name.
- Instance
Id string - The Database Instance ID.
- User
Name string - The user name.
- Region string
region
) The region in which the resource exists.
- Database
Name string - The database name.
- Instance
Id string - The Database Instance ID.
- User
Name string - The user name.
- Region string
region
) The region in which the resource exists.
- database
Name String - The database name.
- instance
Id String - The Database Instance ID.
- user
Name String - The user name.
- region String
region
) The region in which the resource exists.
- database
Name string - The database name.
- instance
Id string - The Database Instance ID.
- user
Name string - The user name.
- region string
region
) The region in which the resource exists.
- database_
name str - The database name.
- instance_
id str - The Database Instance ID.
- user_
name str - The user name.
- region str
region
) The region in which the resource exists.
- database
Name String - The database name.
- instance
Id String - The Database Instance ID.
- user
Name String - The user name.
- region String
region
) The region in which the resource exists.
getDatabasePrivilege Result
The following output properties are available:
- Database
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Permission string
- The permission for this user on the database. Possible values are
readonly
,readwrite
,all
,custom
andnone
. - User
Name string - Region string
- Database
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Permission string
- The permission for this user on the database. Possible values are
readonly
,readwrite
,all
,custom
andnone
. - User
Name string - Region string
- database
Name String - id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - permission String
- The permission for this user on the database. Possible values are
readonly
,readwrite
,all
,custom
andnone
. - user
Name String - region String
- database
Name string - id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - permission string
- The permission for this user on the database. Possible values are
readonly
,readwrite
,all
,custom
andnone
. - user
Name string - region 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
andnone
. - user_
name str - region str
- database
Name String - id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - permission String
- The permission for this user on the database. Possible values are
readonly
,readwrite
,all
,custom
andnone
. - user
Name String - region String
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.