1. Packages
  2. Auth0
  3. API Docs
  4. ConnectionClient
Auth0 v3.3.1 published on Thursday, Mar 14, 2024 by Pulumi

auth0.ConnectionClient

Explore with Pulumi AI

auth0 logo
Auth0 v3.3.1 published on Thursday, Mar 14, 2024 by Pulumi

    With this resource, you can enable a single client on a connection.

    !> This resource appends an enabled client to a connection. In contrast, the auth0.ConnectionClients resource manages all the clients enabled for a connection. To avoid potential issues, it is recommended not to use this resource in conjunction with the auth0.ConnectionClients resource when managing enabled clients for the same connection id.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    const myConn = new auth0.Connection("myConn", {strategy: "auth0"});
    const myClient = new auth0.Client("myClient", {});
    // One connection to one client association.
    // To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource.
    const myConnClientAssoc = new auth0.ConnectionClient("myConnClientAssoc", {
        connectionId: myConn.id,
        clientId: myClient.id,
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    my_conn = auth0.Connection("myConn", strategy="auth0")
    my_client = auth0.Client("myClient")
    # One connection to one client association.
    # To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource.
    my_conn_client_assoc = auth0.ConnectionClient("myConnClientAssoc",
        connection_id=my_conn.id,
        client_id=my_client.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myConn, err := auth0.NewConnection(ctx, "myConn", &auth0.ConnectionArgs{
    			Strategy: pulumi.String("auth0"),
    		})
    		if err != nil {
    			return err
    		}
    		myClient, err := auth0.NewClient(ctx, "myClient", nil)
    		if err != nil {
    			return err
    		}
    		// One connection to one client association.
    		// To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource.
    		_, err = auth0.NewConnectionClient(ctx, "myConnClientAssoc", &auth0.ConnectionClientArgs{
    			ConnectionId: myConn.ID(),
    			ClientId:     myClient.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        var myConn = new Auth0.Connection("myConn", new()
        {
            Strategy = "auth0",
        });
    
        var myClient = new Auth0.Client("myClient");
    
        // One connection to one client association.
        // To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource.
        var myConnClientAssoc = new Auth0.ConnectionClient("myConnClientAssoc", new()
        {
            ConnectionId = myConn.Id,
            ClientId = myClient.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.auth0.Connection;
    import com.pulumi.auth0.ConnectionArgs;
    import com.pulumi.auth0.Client;
    import com.pulumi.auth0.ConnectionClient;
    import com.pulumi.auth0.ConnectionClientArgs;
    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) {
            var myConn = new Connection("myConn", ConnectionArgs.builder()        
                .strategy("auth0")
                .build());
    
            var myClient = new Client("myClient");
    
            var myConnClientAssoc = new ConnectionClient("myConnClientAssoc", ConnectionClientArgs.builder()        
                .connectionId(myConn.id())
                .clientId(myClient.id())
                .build());
    
        }
    }
    
    resources:
      myConn:
        type: auth0:Connection
        properties:
          strategy: auth0
      myClient:
        type: auth0:Client
      # One connection to one client association.
      # To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource.
      myConnClientAssoc:
        type: auth0:ConnectionClient
        properties:
          connectionId: ${myConn.id}
          clientId: ${myClient.id}
    

    Create ConnectionClient Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ConnectionClient(name: string, args: ConnectionClientArgs, opts?: CustomResourceOptions);
    @overload
    def ConnectionClient(resource_name: str,
                         args: ConnectionClientArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConnectionClient(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         client_id: Optional[str] = None,
                         connection_id: Optional[str] = None)
    func NewConnectionClient(ctx *Context, name string, args ConnectionClientArgs, opts ...ResourceOption) (*ConnectionClient, error)
    public ConnectionClient(string name, ConnectionClientArgs args, CustomResourceOptions? opts = null)
    public ConnectionClient(String name, ConnectionClientArgs args)
    public ConnectionClient(String name, ConnectionClientArgs args, CustomResourceOptions options)
    
    type: auth0:ConnectionClient
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConnectionClientArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConnectionClientArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConnectionClientArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectionClientArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectionClientArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var connectionClientResource = new Auth0.ConnectionClient("connectionClientResource", new()
    {
        ClientId = "string",
        ConnectionId = "string",
    });
    
    example, err := auth0.NewConnectionClient(ctx, "connectionClientResource", &auth0.ConnectionClientArgs{
    	ClientId:     pulumi.String("string"),
    	ConnectionId: pulumi.String("string"),
    })
    
    var connectionClientResource = new ConnectionClient("connectionClientResource", ConnectionClientArgs.builder()        
        .clientId("string")
        .connectionId("string")
        .build());
    
    connection_client_resource = auth0.ConnectionClient("connectionClientResource",
        client_id="string",
        connection_id="string")
    
    const connectionClientResource = new auth0.ConnectionClient("connectionClientResource", {
        clientId: "string",
        connectionId: "string",
    });
    
    type: auth0:ConnectionClient
    properties:
        clientId: string
        connectionId: string
    

    ConnectionClient Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ConnectionClient resource accepts the following input properties:

    ClientId string
    ID of the client for which the connection is enabled.
    ConnectionId string
    ID of the connection on which to enable the client.
    ClientId string
    ID of the client for which the connection is enabled.
    ConnectionId string
    ID of the connection on which to enable the client.
    clientId String
    ID of the client for which the connection is enabled.
    connectionId String
    ID of the connection on which to enable the client.
    clientId string
    ID of the client for which the connection is enabled.
    connectionId string
    ID of the connection on which to enable the client.
    client_id str
    ID of the client for which the connection is enabled.
    connection_id str
    ID of the connection on which to enable the client.
    clientId String
    ID of the client for which the connection is enabled.
    connectionId String
    ID of the connection on which to enable the client.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ConnectionClient resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the connection on which to enable the client.
    Strategy string
    The strategy of the connection on which to enable the client.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the connection on which to enable the client.
    Strategy string
    The strategy of the connection on which to enable the client.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the connection on which to enable the client.
    strategy String
    The strategy of the connection on which to enable the client.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the connection on which to enable the client.
    strategy string
    The strategy of the connection on which to enable the client.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the connection on which to enable the client.
    strategy str
    The strategy of the connection on which to enable the client.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the connection on which to enable the client.
    strategy String
    The strategy of the connection on which to enable the client.

    Look up Existing ConnectionClient Resource

    Get an existing ConnectionClient resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ConnectionClientState, opts?: CustomResourceOptions): ConnectionClient
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            client_id: Optional[str] = None,
            connection_id: Optional[str] = None,
            name: Optional[str] = None,
            strategy: Optional[str] = None) -> ConnectionClient
    func GetConnectionClient(ctx *Context, name string, id IDInput, state *ConnectionClientState, opts ...ResourceOption) (*ConnectionClient, error)
    public static ConnectionClient Get(string name, Input<string> id, ConnectionClientState? state, CustomResourceOptions? opts = null)
    public static ConnectionClient get(String name, Output<String> id, ConnectionClientState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClientId string
    ID of the client for which the connection is enabled.
    ConnectionId string
    ID of the connection on which to enable the client.
    Name string
    The name of the connection on which to enable the client.
    Strategy string
    The strategy of the connection on which to enable the client.
    ClientId string
    ID of the client for which the connection is enabled.
    ConnectionId string
    ID of the connection on which to enable the client.
    Name string
    The name of the connection on which to enable the client.
    Strategy string
    The strategy of the connection on which to enable the client.
    clientId String
    ID of the client for which the connection is enabled.
    connectionId String
    ID of the connection on which to enable the client.
    name String
    The name of the connection on which to enable the client.
    strategy String
    The strategy of the connection on which to enable the client.
    clientId string
    ID of the client for which the connection is enabled.
    connectionId string
    ID of the connection on which to enable the client.
    name string
    The name of the connection on which to enable the client.
    strategy string
    The strategy of the connection on which to enable the client.
    client_id str
    ID of the client for which the connection is enabled.
    connection_id str
    ID of the connection on which to enable the client.
    name str
    The name of the connection on which to enable the client.
    strategy str
    The strategy of the connection on which to enable the client.
    clientId String
    ID of the client for which the connection is enabled.
    connectionId String
    ID of the connection on which to enable the client.
    name String
    The name of the connection on which to enable the client.
    strategy String
    The strategy of the connection on which to enable the client.

    Import

    This resource can be imported by specifying the

    connection ID and client ID separated by “::” (note the double colon)

    ::

    Example:

    $ pulumi import auth0:index/connectionClient:ConnectionClient my_conn_client_assoc "con_XXXXX::XXXXXXXX"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo
    Auth0 v3.3.1 published on Thursday, Mar 14, 2024 by Pulumi