1. Packages
  2. Scaleway
  3. API Docs
  4. getDatabasePrivilege
Scaleway v1.11.0 published on Sunday, Oct 29, 2023 by lbrlabs

scaleway.getDatabasePrivilege

Explore with Pulumi AI

scaleway logo
Scaleway v1.11.0 published on Sunday, Oct 29, 2023 by lbrlabs

    Gets information about the privilege on RDB database.

    Example Usage

    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 main
    
    import (
    	"github.com/lbrlabs/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, &scaleway.LookupDatabasePrivilegeArgs{
    			DatabaseName: "my-database",
    			InstanceId:   "11111111-1111-111111111111",
    			UserName:     "my-user",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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());
    
        }
    }
    
    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")
    
    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",
    });
    
    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:

    DatabaseName string
    The database name.
    InstanceId string
    The RDB instance ID.
    UserName string
    The user name.
    Region string
    region) The region in which the resource exists.
    DatabaseName string
    The database name.
    InstanceId string
    The RDB instance ID.
    UserName string
    The user name.
    Region string
    region) The region in which the resource exists.
    databaseName String
    The database name.
    instanceId String
    The RDB instance ID.
    userName String
    The user name.
    region String
    region) The region in which the resource exists.
    databaseName string
    The database name.
    instanceId string
    The RDB instance ID.
    userName string
    The user name.
    region string
    region) The region in which the resource exists.
    database_name str
    The database name.
    instance_id str
    The RDB instance ID.
    user_name str
    The user name.
    region str
    region) The region in which the resource exists.
    databaseName String
    The database name.
    instanceId String
    The RDB instance ID.
    userName String
    The user name.
    region String
    region) The region in which the resource exists.

    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
    Region 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
    Region 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
    region 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
    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 and none.
    user_name str
    region 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
    region String

    Package Details

    Repository
    scaleway lbrlabs/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.11.0 published on Sunday, Oct 29, 2023 by lbrlabs