1. Packages
  2. Scaleway
  3. API Docs
  4. getDatabasePrivilege
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

scaleway.getDatabasePrivilege

Explore with Pulumi AI

scaleway logo
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

    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:

    DatabaseName string
    The database name.
    InstanceId string
    The Database 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 Database 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 Database 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 Database 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 Database 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 Database 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 pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse