auth0.ConnectionClients
Explore with Pulumi AI
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("my_conn", {
name: "My-Auth0-Connection",
strategy: "auth0",
});
const myFirstClient = new auth0.Client("my_first_client", {name: "My-First-Auth0-Client"});
const mySecondClient = new auth0.Client("my_second_client", {name: "My-Second-Auth0-Client"});
// 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("my_conn_clients_assoc", {
connectionId: myConn.id,
enabledClients: [
myFirstClient.id,
mySecondClient.id,
],
});
import pulumi
import pulumi_auth0 as auth0
my_conn = auth0.Connection("my_conn",
name="My-Auth0-Connection",
strategy="auth0")
my_first_client = auth0.Client("my_first_client", name="My-First-Auth0-Client")
my_second_client = auth0.Client("my_second_client", name="My-Second-Auth0-Client")
# 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("my_conn_clients_assoc",
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, "my_conn", &auth0.ConnectionArgs{
Name: pulumi.String("My-Auth0-Connection"),
Strategy: pulumi.String("auth0"),
})
if err != nil {
return err
}
myFirstClient, err := auth0.NewClient(ctx, "my_first_client", &auth0.ClientArgs{
Name: pulumi.String("My-First-Auth0-Client"),
})
if err != nil {
return err
}
mySecondClient, err := auth0.NewClient(ctx, "my_second_client", &auth0.ClientArgs{
Name: pulumi.String("My-Second-Auth0-Client"),
})
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, "my_conn_clients_assoc", &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("my_conn", new()
{
Name = "My-Auth0-Connection",
Strategy = "auth0",
});
var myFirstClient = new Auth0.Client("my_first_client", new()
{
Name = "My-First-Auth0-Client",
});
var mySecondClient = new Auth0.Client("my_second_client", new()
{
Name = "My-Second-Auth0-Client",
});
// 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("my_conn_clients_assoc", 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.ClientArgs;
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()
.name("My-Auth0-Connection")
.strategy("auth0")
.build());
var myFirstClient = new Client("myFirstClient", ClientArgs.builder()
.name("My-First-Auth0-Client")
.build());
var mySecondClient = new Client("mySecondClient", ClientArgs.builder()
.name("My-Second-Auth0-Client")
.build());
// One connection to many clients association.
// To prevent issues, avoid using this resource together with the `auth0_connection_client` resource.
var myConnClientsAssoc = new ConnectionClients("myConnClientsAssoc", ConnectionClientsArgs.builder()
.connectionId(myConn.id())
.enabledClients(
myFirstClient.id(),
mySecondClient.id())
.build());
}
}
resources:
myConn:
type: auth0:Connection
name: my_conn
properties:
name: My-Auth0-Connection
strategy: auth0
myFirstClient:
type: auth0:Client
name: my_first_client
properties:
name: My-First-Auth0-Client
mySecondClient:
type: auth0:Client
name: my_second_client
properties:
name: My-Second-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
name: my_conn_clients_assoc
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.
Constructor 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ConnectionClients resource accepts the following input properties:
- Connection
Id string - ID of the connection on which to enable the client.
- Enabled
Clients List<string> - IDs of the clients for which the connection is enabled.
- Connection
Id string - ID of the connection on which to enable the client.
- Enabled
Clients []string - IDs of the clients for which the connection is enabled.
- connection
Id String - ID of the connection on which to enable the client.
- enabled
Clients List<String> - IDs of the clients for which the connection is enabled.
- connection
Id string - ID of the connection on which to enable the client.
- enabled
Clients 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.
- connection
Id String - ID of the connection on which to enable the client.
- enabled
Clients 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:
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.
- Connection
Id string - ID of the connection on which to enable the client.
- Enabled
Clients 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.
- Connection
Id string - ID of the connection on which to enable the client.
- Enabled
Clients []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 String - ID of the connection on which to enable the client.
- enabled
Clients 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.
- connection
Id string - ID of the connection on which to enable the client.
- enabled
Clients 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.
- connection
Id String - ID of the connection on which to enable the client.
- enabled
Clients 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.