Keycloak v5.3.5 published on Wednesday, Oct 16, 2024 by Pulumi
keycloak.getAuthenticationFlow
Explore with Pulumi AI
This data source can be used to fetch the ID of an authentication flow within Keycloak.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as keycloak from "@pulumi/keycloak";
const realm = new keycloak.Realm("realm", {
realm: "my-realm",
enabled: true,
});
const browserAuthCookie = keycloak.getAuthenticationFlowOutput({
realmId: realm.id,
alias: "browser",
});
import pulumi
import pulumi_keycloak as keycloak
realm = keycloak.Realm("realm",
realm="my-realm",
enabled=True)
browser_auth_cookie = keycloak.get_authentication_flow_output(realm_id=realm.id,
alias="browser")
package main
import (
"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
realm, err := keycloak.NewRealm(ctx, "realm", &keycloak.RealmArgs{
Realm: pulumi.String("my-realm"),
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
_ = keycloak.GetAuthenticationFlowOutput(ctx, keycloak.GetAuthenticationFlowOutputArgs{
RealmId: realm.ID(),
Alias: pulumi.String("browser"),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Keycloak = Pulumi.Keycloak;
return await Deployment.RunAsync(() =>
{
var realm = new Keycloak.Realm("realm", new()
{
RealmName = "my-realm",
Enabled = true,
});
var browserAuthCookie = Keycloak.GetAuthenticationFlow.Invoke(new()
{
RealmId = realm.Id,
Alias = "browser",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.keycloak.Realm;
import com.pulumi.keycloak.RealmArgs;
import com.pulumi.keycloak.KeycloakFunctions;
import com.pulumi.keycloak.inputs.GetAuthenticationFlowArgs;
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 realm = new Realm("realm", RealmArgs.builder()
.realm("my-realm")
.enabled(true)
.build());
final var browserAuthCookie = KeycloakFunctions.getAuthenticationFlow(GetAuthenticationFlowArgs.builder()
.realmId(realm.id())
.alias("browser")
.build());
}
}
resources:
realm:
type: keycloak:Realm
properties:
realm: my-realm
enabled: true
variables:
browserAuthCookie:
fn::invoke:
Function: keycloak:getAuthenticationFlow
Arguments:
realmId: ${realm.id}
alias: browser
Using getAuthenticationFlow
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 getAuthenticationFlow(args: GetAuthenticationFlowArgs, opts?: InvokeOptions): Promise<GetAuthenticationFlowResult>
function getAuthenticationFlowOutput(args: GetAuthenticationFlowOutputArgs, opts?: InvokeOptions): Output<GetAuthenticationFlowResult>
def get_authentication_flow(alias: Optional[str] = None,
realm_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAuthenticationFlowResult
def get_authentication_flow_output(alias: Optional[pulumi.Input[str]] = None,
realm_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAuthenticationFlowResult]
func GetAuthenticationFlow(ctx *Context, args *GetAuthenticationFlowArgs, opts ...InvokeOption) (*GetAuthenticationFlowResult, error)
func GetAuthenticationFlowOutput(ctx *Context, args *GetAuthenticationFlowOutputArgs, opts ...InvokeOption) GetAuthenticationFlowResultOutput
> Note: This function is named GetAuthenticationFlow
in the Go SDK.
public static class GetAuthenticationFlow
{
public static Task<GetAuthenticationFlowResult> InvokeAsync(GetAuthenticationFlowArgs args, InvokeOptions? opts = null)
public static Output<GetAuthenticationFlowResult> Invoke(GetAuthenticationFlowInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAuthenticationFlowResult> getAuthenticationFlow(GetAuthenticationFlowArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: keycloak:index/getAuthenticationFlow:getAuthenticationFlow
arguments:
# arguments dictionary
The following arguments are supported:
getAuthenticationFlow Result
The following output properties are available:
Package Details
- Repository
- Keycloak pulumi/pulumi-keycloak
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
keycloak
Terraform Provider.