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

ovh.Hosting.getPrivateDatabaseUserGrant

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 grant.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const userGrant = ovh.Hosting.getPrivateDatabaseUserGrant({
        databaseName: "XXXXXX",
        serviceName: "XXXXXX",
        userName: "XXXXXX",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    user_grant = ovh.Hosting.get_private_database_user_grant(database_name="XXXXXX",
        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.GetPrivateDatabaseUserGrant(ctx, &hosting.GetPrivateDatabaseUserGrantArgs{
    			DatabaseName: "XXXXXX",
    			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 userGrant = Ovh.Hosting.GetPrivateDatabaseUserGrant.Invoke(new()
        {
            DatabaseName = "XXXXXX",
            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.GetPrivateDatabaseUserGrantArgs;
    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 userGrant = HostingFunctions.getPrivateDatabaseUserGrant(GetPrivateDatabaseUserGrantArgs.builder()
                .databaseName("XXXXXX")
                .serviceName("XXXXXX")
                .userName("XXXXXX")
                .build());
    
        }
    }
    
    variables:
      userGrant:
        fn::invoke:
          Function: ovh:Hosting:getPrivateDatabaseUserGrant
          Arguments:
            databaseName: XXXXXX
            serviceName: XXXXXX
            userName: XXXXXX
    

    Using getPrivateDatabaseUserGrant

    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 getPrivateDatabaseUserGrant(args: GetPrivateDatabaseUserGrantArgs, opts?: InvokeOptions): Promise<GetPrivateDatabaseUserGrantResult>
    function getPrivateDatabaseUserGrantOutput(args: GetPrivateDatabaseUserGrantOutputArgs, opts?: InvokeOptions): Output<GetPrivateDatabaseUserGrantResult>
    def get_private_database_user_grant(database_name: Optional[str] = None,
                                        service_name: Optional[str] = None,
                                        user_name: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetPrivateDatabaseUserGrantResult
    def get_private_database_user_grant_output(database_name: Optional[pulumi.Input[str]] = None,
                                        service_name: Optional[pulumi.Input[str]] = None,
                                        user_name: Optional[pulumi.Input[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetPrivateDatabaseUserGrantResult]
    func GetPrivateDatabaseUserGrant(ctx *Context, args *GetPrivateDatabaseUserGrantArgs, opts ...InvokeOption) (*GetPrivateDatabaseUserGrantResult, error)
    func GetPrivateDatabaseUserGrantOutput(ctx *Context, args *GetPrivateDatabaseUserGrantOutputArgs, opts ...InvokeOption) GetPrivateDatabaseUserGrantResultOutput

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

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

    The following arguments are supported:

    DatabaseName string
    The database name on which grant the user
    ServiceName string
    The internal name of your private database
    UserName string
    The user name
    DatabaseName string
    The database name on which grant the user
    ServiceName string
    The internal name of your private database
    UserName string
    The user name
    databaseName String
    The database name on which grant the user
    serviceName String
    The internal name of your private database
    userName String
    The user name
    databaseName string
    The database name on which grant the user
    serviceName string
    The internal name of your private database
    userName string
    The user name
    database_name str
    The database name on which grant the user
    service_name str
    The internal name of your private database
    user_name str
    The user name
    databaseName String
    The database name on which grant the user
    serviceName String
    The internal name of your private database
    userName String
    The user name

    getPrivateDatabaseUserGrant Result

    The following output properties are available:

    CreationDate string
    Creation date of the database
    DatabaseName string
    Grant string
    Grant name
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceName string
    UserName string
    CreationDate string
    Creation date of the database
    DatabaseName string
    Grant string
    Grant name
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceName string
    UserName string
    creationDate String
    Creation date of the database
    databaseName String
    grant String
    Grant name
    id String
    The provider-assigned unique ID for this managed resource.
    serviceName String
    userName String
    creationDate string
    Creation date of the database
    databaseName string
    grant string
    Grant name
    id string
    The provider-assigned unique ID for this managed resource.
    serviceName string
    userName string
    creation_date str
    Creation date of the database
    database_name str
    grant str
    Grant name
    id str
    The provider-assigned unique ID for this managed resource.
    service_name str
    user_name str
    creationDate String
    Creation date of the database
    databaseName String
    grant String
    Grant name
    id String
    The provider-assigned unique ID for this managed resource.
    serviceName String
    userName String

    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