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

ovh.Me.getAPIOAuth2Client

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 existing OAuth2 service account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const myOauth2Client = ovh.Me.getAPIOAuth2Client({
        clientId: "5f8969a993ec8b4b",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    my_oauth2_client = ovh.Me.get_apio_auth2_client(client_id="5f8969a993ec8b4b")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Me"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Me.GetAPIOAuth2Client(ctx, &me.GetAPIOAuth2ClientArgs{
    			ClientId: "5f8969a993ec8b4b",
    		}, 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 myOauth2Client = Ovh.Me.GetAPIOAuth2Client.Invoke(new()
        {
            ClientId = "5f8969a993ec8b4b",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Me.MeFunctions;
    import com.pulumi.ovh.Me.inputs.GetAPIOAuth2ClientArgs;
    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 myOauth2Client = MeFunctions.getAPIOAuth2Client(GetAPIOAuth2ClientArgs.builder()
                .clientId("5f8969a993ec8b4b")
                .build());
    
        }
    }
    
    variables:
      myOauth2Client:
        fn::invoke:
          Function: ovh:Me:getAPIOAuth2Client
          Arguments:
            clientId: 5f8969a993ec8b4b
    

    Using getAPIOAuth2Client

    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 getAPIOAuth2Client(args: GetAPIOAuth2ClientArgs, opts?: InvokeOptions): Promise<GetAPIOAuth2ClientResult>
    function getAPIOAuth2ClientOutput(args: GetAPIOAuth2ClientOutputArgs, opts?: InvokeOptions): Output<GetAPIOAuth2ClientResult>
    def get_apio_auth2_client(client_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetAPIOAuth2ClientResult
    def get_apio_auth2_client_output(client_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetAPIOAuth2ClientResult]
    func GetAPIOAuth2Client(ctx *Context, args *GetAPIOAuth2ClientArgs, opts ...InvokeOption) (*GetAPIOAuth2ClientResult, error)
    func GetAPIOAuth2ClientOutput(ctx *Context, args *GetAPIOAuth2ClientOutputArgs, opts ...InvokeOption) GetAPIOAuth2ClientResultOutput

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

    public static class GetAPIOAuth2Client 
    {
        public static Task<GetAPIOAuth2ClientResult> InvokeAsync(GetAPIOAuth2ClientArgs args, InvokeOptions? opts = null)
        public static Output<GetAPIOAuth2ClientResult> Invoke(GetAPIOAuth2ClientInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAPIOAuth2ClientResult> getAPIOAuth2Client(GetAPIOAuth2ClientArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:Me/getAPIOAuth2Client:getAPIOAuth2Client
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClientId string
    Client ID of an existing OAuth2 service account.
    ClientId string
    Client ID of an existing OAuth2 service account.
    clientId String
    Client ID of an existing OAuth2 service account.
    clientId string
    Client ID of an existing OAuth2 service account.
    client_id str
    Client ID of an existing OAuth2 service account.
    clientId String
    Client ID of an existing OAuth2 service account.

    getAPIOAuth2Client Result

    The following output properties are available:

    CallbackUrls List<string>
    List of callback urls when configuring the AUTHORIZATION_CODE flow.
    ClientId string
    Client ID of the created service account.
    Description string
    OAuth2 client description.
    Flow string
    The OAuth2 flow to use. AUTHORIZATION_CODE or CLIENT_CREDENTIALS are supported at the moment.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identity string
    Name string
    OAuth2 client name.
    CallbackUrls []string
    List of callback urls when configuring the AUTHORIZATION_CODE flow.
    ClientId string
    Client ID of the created service account.
    Description string
    OAuth2 client description.
    Flow string
    The OAuth2 flow to use. AUTHORIZATION_CODE or CLIENT_CREDENTIALS are supported at the moment.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identity string
    Name string
    OAuth2 client name.
    callbackUrls List<String>
    List of callback urls when configuring the AUTHORIZATION_CODE flow.
    clientId String
    Client ID of the created service account.
    description String
    OAuth2 client description.
    flow String
    The OAuth2 flow to use. AUTHORIZATION_CODE or CLIENT_CREDENTIALS are supported at the moment.
    id String
    The provider-assigned unique ID for this managed resource.
    identity String
    name String
    OAuth2 client name.
    callbackUrls string[]
    List of callback urls when configuring the AUTHORIZATION_CODE flow.
    clientId string
    Client ID of the created service account.
    description string
    OAuth2 client description.
    flow string
    The OAuth2 flow to use. AUTHORIZATION_CODE or CLIENT_CREDENTIALS are supported at the moment.
    id string
    The provider-assigned unique ID for this managed resource.
    identity string
    name string
    OAuth2 client name.
    callback_urls Sequence[str]
    List of callback urls when configuring the AUTHORIZATION_CODE flow.
    client_id str
    Client ID of the created service account.
    description str
    OAuth2 client description.
    flow str
    The OAuth2 flow to use. AUTHORIZATION_CODE or CLIENT_CREDENTIALS are supported at the moment.
    id str
    The provider-assigned unique ID for this managed resource.
    identity str
    name str
    OAuth2 client name.
    callbackUrls List<String>
    List of callback urls when configuring the AUTHORIZATION_CODE flow.
    clientId String
    Client ID of the created service account.
    description String
    OAuth2 client description.
    flow String
    The OAuth2 flow to use. AUTHORIZATION_CODE or CLIENT_CREDENTIALS are supported at the moment.
    id String
    The provider-assigned unique ID for this managed resource.
    identity String
    name String
    OAuth2 client name.

    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