1. Packages
  2. OVH
  3. API Docs
  4. Hosting
  5. getPrivateDatabaseUser
OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud

ovh.Hosting.getPrivateDatabaseUser

Explore with Pulumi AI

ovh logo
OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud

    Use this data source to retrieve information about an hosting privatedatabase user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const user = ovh.Hosting.getPrivateDatabaseUser({
        serviceName: "XXXXXX",
        userName: "XXXXXX",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    user = ovh.Hosting.get_private_database_user(service_name="XXXXXX",
        user_name="XXXXXX")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Hosting"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Hosting.GetPrivateDatabaseUser(ctx, &hosting.GetPrivateDatabaseUserArgs{
    			ServiceName: "XXXXXX",
    			UserName:    "XXXXXX",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var user = Ovh.Hosting.GetPrivateDatabaseUser.Invoke(new()
        {
            ServiceName = "XXXXXX",
            UserName = "XXXXXX",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Hosting.HostingFunctions;
    import com.pulumi.ovh.Hosting.inputs.GetPrivateDatabaseUserArgs;
    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 user = HostingFunctions.getPrivateDatabaseUser(GetPrivateDatabaseUserArgs.builder()
                .serviceName("XXXXXX")
                .userName("XXXXXX")
                .build());
    
        }
    }
    
    variables:
      user:
        fn::invoke:
          Function: ovh:Hosting:getPrivateDatabaseUser
          Arguments:
            serviceName: XXXXXX
            userName: XXXXXX
    

    Using getPrivateDatabaseUser

    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 getPrivateDatabaseUser(args: GetPrivateDatabaseUserArgs, opts?: InvokeOptions): Promise<GetPrivateDatabaseUserResult>
    function getPrivateDatabaseUserOutput(args: GetPrivateDatabaseUserOutputArgs, opts?: InvokeOptions): Output<GetPrivateDatabaseUserResult>
    def get_private_database_user(service_name: Optional[str] = None,
                                  user_name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetPrivateDatabaseUserResult
    def get_private_database_user_output(service_name: Optional[pulumi.Input[str]] = None,
                                  user_name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetPrivateDatabaseUserResult]
    func GetPrivateDatabaseUser(ctx *Context, args *GetPrivateDatabaseUserArgs, opts ...InvokeOption) (*GetPrivateDatabaseUserResult, error)
    func GetPrivateDatabaseUserOutput(ctx *Context, args *GetPrivateDatabaseUserOutputArgs, opts ...InvokeOption) GetPrivateDatabaseUserResultOutput

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

    public static class GetPrivateDatabaseUser 
    {
        public static Task<GetPrivateDatabaseUserResult> InvokeAsync(GetPrivateDatabaseUserArgs args, InvokeOptions? opts = null)
        public static Output<GetPrivateDatabaseUserResult> Invoke(GetPrivateDatabaseUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPrivateDatabaseUserResult> getPrivateDatabaseUser(GetPrivateDatabaseUserArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:Hosting/getPrivateDatabaseUser:getPrivateDatabaseUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ServiceName string
    The internal name of your private database
    UserName string
    User name
    ServiceName string
    The internal name of your private database
    UserName string
    User name
    serviceName String
    The internal name of your private database
    userName String
    User name
    serviceName string
    The internal name of your private database
    userName string
    User name
    service_name str
    The internal name of your private database
    user_name str
    User name
    serviceName String
    The internal name of your private database
    userName String
    User name

    getPrivateDatabaseUser Result

    The following output properties are available:

    CreationDate string
    Creation date of the database
    Databases List<GetPrivateDatabaseUserDatabase>
    Users granted to this database
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceName string
    UserName string
    CreationDate string
    Creation date of the database
    Databases []GetPrivateDatabaseUserDatabase
    Users granted to this database
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceName string
    UserName string
    creationDate String
    Creation date of the database
    databases List<GetPrivateDatabaseUserDatabase>
    Users granted to this database
    id String
    The provider-assigned unique ID for this managed resource.
    serviceName String
    userName String
    creationDate string
    Creation date of the database
    databases GetPrivateDatabaseUserDatabase[]
    Users granted to this database
    id string
    The provider-assigned unique ID for this managed resource.
    serviceName string
    userName string
    creation_date str
    Creation date of the database
    databases Sequence[hosting.GetPrivateDatabaseUserDatabase]
    Users granted to this database
    id str
    The provider-assigned unique ID for this managed resource.
    service_name str
    user_name str
    creationDate String
    Creation date of the database
    databases List<Property Map>
    Users granted to this database
    id String
    The provider-assigned unique ID for this managed resource.
    serviceName String
    userName String

    Supporting Types

    GetPrivateDatabaseUserDatabase

    DatabaseName string
    Database's name linked to this user
    GrantType string
    Grant of this user for this database
    DatabaseName string
    Database's name linked to this user
    GrantType string
    Grant of this user for this database
    databaseName String
    Database's name linked to this user
    grantType String
    Grant of this user for this database
    databaseName string
    Database's name linked to this user
    grantType string
    Grant of this user for this database
    database_name str
    Database's name linked to this user
    grant_type str
    Grant of this user for this database
    databaseName String
    Database's name linked to this user
    grantType String
    Grant of this user for this database

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud