auth0.ConnectionClient
Explore with Pulumi AI
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("my_conn", {
name: "My-Auth0-Connection",
strategy: "auth0",
});
const myClient = new auth0.Client("my_client", {name: "My-Auth0-Client"});
// 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("my_conn_client_assoc", {
connectionId: myConn.id,
clientId: myClient.id,
});
import pulumi
import pulumi_auth0 as auth0
my_conn = auth0.Connection("my_conn",
name="My-Auth0-Connection",
strategy="auth0")
my_client = auth0.Client("my_client", name="My-Auth0-Client")
# 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("my_conn_client_assoc",
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, "my_conn", &auth0.ConnectionArgs{
Name: pulumi.String("My-Auth0-Connection"),
Strategy: pulumi.String("auth0"),
})
if err != nil {
return err
}
myClient, err := auth0.NewClient(ctx, "my_client", &auth0.ClientArgs{
Name: pulumi.String("My-Auth0-Client"),
})
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, "my_conn_client_assoc", &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("my_conn", new()
{
Name = "My-Auth0-Connection",
Strategy = "auth0",
});
var myClient = new Auth0.Client("my_client", new()
{
Name = "My-Auth0-Client",
});
// 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("my_conn_client_assoc", 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.ClientArgs;
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()
.name("My-Auth0-Connection")
.strategy("auth0")
.build());
var myClient = new Client("myClient", ClientArgs.builder()
.name("My-Auth0-Client")
.build());
// One connection to one client association.
// To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource.
var myConnClientAssoc = new ConnectionClient("myConnClientAssoc", ConnectionClientArgs.builder()
.connectionId(myConn.id())
.clientId(myClient.id())
.build());
}
}
resources:
myConn:
type: auth0:Connection
name: my_conn
properties:
name: My-Auth0-Connection
strategy: auth0
myClient:
type: auth0:Client
name: my_client
properties:
name: My-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
name: my_conn_client_assoc
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.
Constructor 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ConnectionClient resource accepts the following input properties:
- Client
Id string - ID of the client for which the connection is enabled.
- Connection
Id string - ID of the connection on which to enable the client.
- Client
Id string - ID of the client for which the connection is enabled.
- Connection
Id string - ID of the connection on which to enable the client.
- client
Id String - ID of the client for which the connection is enabled.
- connection
Id String - ID of the connection on which to enable the client.
- client
Id string - ID of the client for which the connection is enabled.
- connection
Id 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.
- client
Id String - ID of the client for which the connection is enabled.
- connection
Id 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:
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.
- Client
Id string - ID of the client for which the connection is enabled.
- Connection
Id 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 string - ID of the client for which the connection is enabled.
- Connection
Id 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 String - ID of the client for which the connection is enabled.
- connection
Id 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 string - ID of the client for which the connection is enabled.
- connection
Id 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.
- client
Id String - ID of the client for which the connection is enabled.
- connection
Id 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.