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

auth0.ConnectionClients

Explore with Pulumi AI

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

    With this resource, you can manage all of the enabled clients on a connection.

    !> This resource manages all the enabled clients for a connection. In contrast, the auth0.ConnectionClient resource appends an enabled client to a connection. To avoid potential issues, it is recommended not to use this resource in conjunction with the auth0.ConnectionClient 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 myFirstClient = new auth0.Client("myFirstClient", {});
    const mySecondClient = new auth0.Client("mySecondClient", {});
    // One connection to many clients association.
    // To prevent issues, avoid using this resource together with the `auth0_connection_client` resource.
    const myConnClientsAssoc = new auth0.ConnectionClients("myConnClientsAssoc", {
        connectionId: myConn.id,
        enabledClients: [
            myFirstClient.id,
            mySecondClient.id,
        ],
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    my_conn = auth0.Connection("myConn", strategy="auth0")
    my_first_client = auth0.Client("myFirstClient")
    my_second_client = auth0.Client("mySecondClient")
    # One connection to many clients association.
    # To prevent issues, avoid using this resource together with the `auth0_connection_client` resource.
    my_conn_clients_assoc = auth0.ConnectionClients("myConnClientsAssoc",
        connection_id=my_conn.id,
        enabled_clients=[
            my_first_client.id,
            my_second_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
    		}
    		myFirstClient, err := auth0.NewClient(ctx, "myFirstClient", nil)
    		if err != nil {
    			return err
    		}
    		mySecondClient, err := auth0.NewClient(ctx, "mySecondClient", nil)
    		if err != nil {
    			return err
    		}
    		// One connection to many clients association.
    		// To prevent issues, avoid using this resource together with the `auth0_connection_client` resource.
    		_, err = auth0.NewConnectionClients(ctx, "myConnClientsAssoc", &auth0.ConnectionClientsArgs{
    			ConnectionId: myConn.ID(),
    			EnabledClients: pulumi.StringArray{
    				myFirstClient.ID(),
    				mySecondClient.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 myFirstClient = new Auth0.Client("myFirstClient");
    
        var mySecondClient = new Auth0.Client("mySecondClient");
    
        // One connection to many clients association.
        // To prevent issues, avoid using this resource together with the `auth0_connection_client` resource.
        var myConnClientsAssoc = new Auth0.ConnectionClients("myConnClientsAssoc", new()
        {
            ConnectionId = myConn.Id,
            EnabledClients = new[]
            {
                myFirstClient.Id,
                mySecondClient.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.ConnectionClients;
    import com.pulumi.auth0.ConnectionClientsArgs;
    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 myFirstClient = new Client("myFirstClient");
    
            var mySecondClient = new Client("mySecondClient");
    
            var myConnClientsAssoc = new ConnectionClients("myConnClientsAssoc", ConnectionClientsArgs.builder()        
                .connectionId(myConn.id())
                .enabledClients(            
                    myFirstClient.id(),
                    mySecondClient.id())
                .build());
    
        }
    }
    
    resources:
      myConn:
        type: auth0:Connection
        properties:
          strategy: auth0
      myFirstClient:
        type: auth0:Client
      mySecondClient:
        type: auth0:Client
      # One connection to many clients association.
      # To prevent issues, avoid using this resource together with the `auth0_connection_client` resource.
      myConnClientsAssoc:
        type: auth0:ConnectionClients
        properties:
          connectionId: ${myConn.id}
          enabledClients:
            - ${myFirstClient.id}
            - ${mySecondClient.id}
    

    Create ConnectionClients Resource

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

    Constructor syntax

    new ConnectionClients(name: string, args: ConnectionClientsArgs, opts?: CustomResourceOptions);
    @overload
    def ConnectionClients(resource_name: str,
                          args: ConnectionClientsArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConnectionClients(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          connection_id: Optional[str] = None,
                          enabled_clients: Optional[Sequence[str]] = None)
    func NewConnectionClients(ctx *Context, name string, args ConnectionClientsArgs, opts ...ResourceOption) (*ConnectionClients, error)
    public ConnectionClients(string name, ConnectionClientsArgs args, CustomResourceOptions? opts = null)
    public ConnectionClients(String name, ConnectionClientsArgs args)
    public ConnectionClients(String name, ConnectionClientsArgs args, CustomResourceOptions options)
    
    type: auth0:ConnectionClients
    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 ConnectionClientsArgs
    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 ConnectionClientsArgs
    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 ConnectionClientsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectionClientsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectionClientsArgs
    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 connectionClientsResource = new Auth0.ConnectionClients("connectionClientsResource", new()
    {
        ConnectionId = "string",
        EnabledClients = new[]
        {
            "string",
        },
    });
    
    example, err := auth0.NewConnectionClients(ctx, "connectionClientsResource", &auth0.ConnectionClientsArgs{
    	ConnectionId: pulumi.String("string"),
    	EnabledClients: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var connectionClientsResource = new ConnectionClients("connectionClientsResource", ConnectionClientsArgs.builder()        
        .connectionId("string")
        .enabledClients("string")
        .build());
    
    connection_clients_resource = auth0.ConnectionClients("connectionClientsResource",
        connection_id="string",
        enabled_clients=["string"])
    
    const connectionClientsResource = new auth0.ConnectionClients("connectionClientsResource", {
        connectionId: "string",
        enabledClients: ["string"],
    });
    
    type: auth0:ConnectionClients
    properties:
        connectionId: string
        enabledClients:
            - string
    

    ConnectionClients 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 ConnectionClients resource accepts the following input properties:

    ConnectionId string
    ID of the connection on which to enable the client.
    EnabledClients List<string>
    IDs of the clients for which the connection is enabled.
    ConnectionId string
    ID of the connection on which to enable the client.
    EnabledClients []string
    IDs of the clients for which the connection is enabled.
    connectionId String
    ID of the connection on which to enable the client.
    enabledClients List<String>
    IDs of the clients for which the connection is enabled.
    connectionId string
    ID of the connection on which to enable the client.
    enabledClients string[]
    IDs of the clients for which the connection is enabled.
    connection_id str
    ID of the connection on which to enable the client.
    enabled_clients Sequence[str]
    IDs of the clients for which the connection is enabled.
    connectionId String
    ID of the connection on which to enable the client.
    enabledClients List<String>
    IDs of the clients for which the connection is enabled.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ConnectionClients 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 ConnectionClients Resource

    Get an existing ConnectionClients 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?: ConnectionClientsState, opts?: CustomResourceOptions): ConnectionClients
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_id: Optional[str] = None,
            enabled_clients: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            strategy: Optional[str] = None) -> ConnectionClients
    func GetConnectionClients(ctx *Context, name string, id IDInput, state *ConnectionClientsState, opts ...ResourceOption) (*ConnectionClients, error)
    public static ConnectionClients Get(string name, Input<string> id, ConnectionClientsState? state, CustomResourceOptions? opts = null)
    public static ConnectionClients get(String name, Output<String> id, ConnectionClientsState 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:
    ConnectionId string
    ID of the connection on which to enable the client.
    EnabledClients List<string>
    IDs of the clients for which the connection is enabled.
    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.
    ConnectionId string
    ID of the connection on which to enable the client.
    EnabledClients []string
    IDs of the clients for which the connection is enabled.
    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.
    connectionId String
    ID of the connection on which to enable the client.
    enabledClients List<String>
    IDs of the clients for which the connection is enabled.
    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.
    connectionId string
    ID of the connection on which to enable the client.
    enabledClients string[]
    IDs of the clients for which the connection is enabled.
    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.
    connection_id str
    ID of the connection on which to enable the client.
    enabled_clients Sequence[str]
    IDs of the clients for which the connection is enabled.
    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.
    connectionId String
    ID of the connection on which to enable the client.
    enabledClients List<String>
    IDs of the clients for which the connection is enabled.
    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.

    Example:

    $ pulumi import auth0:index/connectionClients:ConnectionClients my_conn_clients_assoc "con_XXXXX"
    

    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