All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.keycloak.authentication.Execution Maven / Gradle / Ivy

There is a newer version: 5.4.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.keycloak.authentication;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.keycloak.Utilities;
import com.pulumi.keycloak.authentication.ExecutionArgs;
import com.pulumi.keycloak.authentication.inputs.ExecutionState;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Allows for creating and managing an authentication execution within Keycloak.
 * 
 * An authentication execution is an action that the user or service may or may not take when authenticating through an authentication
 * flow.
 * 
 * > Due to limitations in the Keycloak API, the ordering of authentication executions within a flow must be specified using `depends_on`. Authentication executions that are created first will appear first within the flow.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.authentication.Flow;
 * import com.pulumi.keycloak.authentication.FlowArgs;
 * import com.pulumi.keycloak.authentication.Execution;
 * import com.pulumi.keycloak.authentication.ExecutionArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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());
 * 
 *         var flow = new Flow("flow", FlowArgs.builder()
 *             .realmId(realm.id())
 *             .alias("my-flow-alias")
 *             .build());
 * 
 *         // first execution
 *         var executionOne = new Execution("executionOne", ExecutionArgs.builder()
 *             .realmId(realm.id())
 *             .parentFlowAlias(flow.alias())
 *             .authenticator("auth-cookie")
 *             .requirement("ALTERNATIVE")
 *             .build());
 * 
 *         // second execution
 *         var executionTwo = new Execution("executionTwo", ExecutionArgs.builder()
 *             .realmId(realm.id())
 *             .parentFlowAlias(flow.alias())
 *             .authenticator("identity-provider-redirector")
 *             .requirement("ALTERNATIVE")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(executionOne)
 *                 .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Authentication executions can be imported using the formats: `{{realmId}}/{{parentFlowAlias}}/{{authenticationExecutionId}}`. * * Example: * * bash * * ```sh * $ pulumi import keycloak:authentication/execution:Execution execution_one my-realm/my-flow-alias/30559fcf-6fb8-45ea-8c46-2b86f46ebc17 * ``` * */ @ResourceType(type="keycloak:authentication/execution:Execution") public class Execution extends com.pulumi.resources.CustomResource { /** * The name of the authenticator. This can be found by experimenting with the GUI and looking at HTTP requests within the network tab of your browser's development tools. * */ @Export(name="authenticator", refs={String.class}, tree="[0]") private Output authenticator; /** * @return The name of the authenticator. This can be found by experimenting with the GUI and looking at HTTP requests within the network tab of your browser's development tools. * */ public Output authenticator() { return this.authenticator; } /** * The alias of the flow this execution is attached to. * */ @Export(name="parentFlowAlias", refs={String.class}, tree="[0]") private Output parentFlowAlias; /** * @return The alias of the flow this execution is attached to. * */ public Output parentFlowAlias() { return this.parentFlowAlias; } /** * The realm the authentication execution exists in. * */ @Export(name="realmId", refs={String.class}, tree="[0]") private Output realmId; /** * @return The realm the authentication execution exists in. * */ public Output realmId() { return this.realmId; } /** * The requirement setting, which can be one of `REQUIRED`, `ALTERNATIVE`, `OPTIONAL`, `CONDITIONAL`, or `DISABLED`. Defaults to `DISABLED`. * */ @Export(name="requirement", refs={String.class}, tree="[0]") private Output requirement; /** * @return The requirement setting, which can be one of `REQUIRED`, `ALTERNATIVE`, `OPTIONAL`, `CONDITIONAL`, or `DISABLED`. Defaults to `DISABLED`. * */ public Output> requirement() { return Codegen.optional(this.requirement); } /** * * @param name The _unique_ name of the resulting resource. */ public Execution(java.lang.String name) { this(name, ExecutionArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Execution(java.lang.String name, ExecutionArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Execution(java.lang.String name, ExecutionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("keycloak:authentication/execution:Execution", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Execution(java.lang.String name, Output id, @Nullable ExecutionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("keycloak:authentication/execution:Execution", name, state, makeResourceOptions(options, id), false); } private static ExecutionArgs makeArgs(ExecutionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ExecutionArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static Execution get(java.lang.String name, Output id, @Nullable ExecutionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Execution(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy