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

com.pulumi.consul.inputs.ProviderAuthJwtArgs Maven / Gradle / Ivy

There is a newer version: 3.13.0-alpha.1732771629
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.consul.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ProviderAuthJwtArgs extends com.pulumi.resources.ResourceArgs {

    public static final ProviderAuthJwtArgs Empty = new ProviderAuthJwtArgs();

    /**
     * The name of the auth method to use for login.
     * 
     */
    @Import(name="authMethod", required=true)
    private Output authMethod;

    /**
     * @return The name of the auth method to use for login.
     * 
     */
    public Output authMethod() {
        return this.authMethod;
    }

    /**
     * The bearer token to present to the auth method during login for authentication purposes. For the Kubernetes auth method this is a [Service Account Token (JWT)](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens).
     * 
     */
    @Import(name="bearerToken")
    private @Nullable Output bearerToken;

    /**
     * @return The bearer token to present to the auth method during login for authentication purposes. For the Kubernetes auth method this is a [Service Account Token (JWT)](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens).
     * 
     */
    public Optional> bearerToken() {
        return Optional.ofNullable(this.bearerToken);
    }

    /**
     * Specifies arbitrary KV metadata linked to the token. Can be useful to track origins.
     * 
     */
    @Import(name="meta")
    private @Nullable Output> meta;

    /**
     * @return Specifies arbitrary KV metadata linked to the token. Can be useful to track origins.
     * 
     */
    public Optional>> meta() {
        return Optional.ofNullable(this.meta);
    }

    @Import(name="useTerraformCloudWorkloadIdentity")
    private @Nullable Output useTerraformCloudWorkloadIdentity;

    public Optional> useTerraformCloudWorkloadIdentity() {
        return Optional.ofNullable(this.useTerraformCloudWorkloadIdentity);
    }

    private ProviderAuthJwtArgs() {}

    private ProviderAuthJwtArgs(ProviderAuthJwtArgs $) {
        this.authMethod = $.authMethod;
        this.bearerToken = $.bearerToken;
        this.meta = $.meta;
        this.useTerraformCloudWorkloadIdentity = $.useTerraformCloudWorkloadIdentity;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ProviderAuthJwtArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ProviderAuthJwtArgs $;

        public Builder() {
            $ = new ProviderAuthJwtArgs();
        }

        public Builder(ProviderAuthJwtArgs defaults) {
            $ = new ProviderAuthJwtArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param authMethod The name of the auth method to use for login.
         * 
         * @return builder
         * 
         */
        public Builder authMethod(Output authMethod) {
            $.authMethod = authMethod;
            return this;
        }

        /**
         * @param authMethod The name of the auth method to use for login.
         * 
         * @return builder
         * 
         */
        public Builder authMethod(String authMethod) {
            return authMethod(Output.of(authMethod));
        }

        /**
         * @param bearerToken The bearer token to present to the auth method during login for authentication purposes. For the Kubernetes auth method this is a [Service Account Token (JWT)](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens).
         * 
         * @return builder
         * 
         */
        public Builder bearerToken(@Nullable Output bearerToken) {
            $.bearerToken = bearerToken;
            return this;
        }

        /**
         * @param bearerToken The bearer token to present to the auth method during login for authentication purposes. For the Kubernetes auth method this is a [Service Account Token (JWT)](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens).
         * 
         * @return builder
         * 
         */
        public Builder bearerToken(String bearerToken) {
            return bearerToken(Output.of(bearerToken));
        }

        /**
         * @param meta Specifies arbitrary KV metadata linked to the token. Can be useful to track origins.
         * 
         * @return builder
         * 
         */
        public Builder meta(@Nullable Output> meta) {
            $.meta = meta;
            return this;
        }

        /**
         * @param meta Specifies arbitrary KV metadata linked to the token. Can be useful to track origins.
         * 
         * @return builder
         * 
         */
        public Builder meta(Map meta) {
            return meta(Output.of(meta));
        }

        public Builder useTerraformCloudWorkloadIdentity(@Nullable Output useTerraformCloudWorkloadIdentity) {
            $.useTerraformCloudWorkloadIdentity = useTerraformCloudWorkloadIdentity;
            return this;
        }

        public Builder useTerraformCloudWorkloadIdentity(Boolean useTerraformCloudWorkloadIdentity) {
            return useTerraformCloudWorkloadIdentity(Output.of(useTerraformCloudWorkloadIdentity));
        }

        public ProviderAuthJwtArgs build() {
            if ($.authMethod == null) {
                throw new MissingRequiredPropertyException("ProviderAuthJwtArgs", "authMethod");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy