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

com.pulumi.azure.appservice.inputs.ConnectionAuthenticationArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.15.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.azure.appservice.inputs;

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


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

    public static final ConnectionAuthenticationArgs Empty = new ConnectionAuthenticationArgs();

    /**
     * Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`.
     * 
     */
    @Import(name="certificate")
    private @Nullable Output certificate;

    /**
     * @return Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`.
     * 
     */
    public Optional> certificate() {
        return Optional.ofNullable(this.certificate);
    }

    /**
     * Client ID for `userAssignedIdentity` or `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. When `type` is set to `userAssignedIdentity`, `client_id` and `subscription_id` should be either both specified or both not specified.
     * 
     */
    @Import(name="clientId")
    private @Nullable Output clientId;

    /**
     * @return Client ID for `userAssignedIdentity` or `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. When `type` is set to `userAssignedIdentity`, `client_id` and `subscription_id` should be either both specified or both not specified.
     * 
     */
    public Optional> clientId() {
        return Optional.ofNullable(this.clientId);
    }

    /**
     * Username or account name for secret auth. `name` and `secret` should be either both specified or both not specified when `type` is set to `secret`.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Username or account name for secret auth. `name` and `secret` should be either both specified or both not specified when `type` is set to `secret`.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Principal ID for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`.
     * 
     */
    @Import(name="principalId")
    private @Nullable Output principalId;

    /**
     * @return Principal ID for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`.
     * 
     */
    public Optional> principalId() {
        return Optional.ofNullable(this.principalId);
    }

    /**
     * Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`.
     * 
     */
    @Import(name="secret")
    private @Nullable Output secret;

    /**
     * @return Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`.
     * 
     */
    public Optional> secret() {
        return Optional.ofNullable(this.secret);
    }

    /**
     * Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified.
     * 
     */
    @Import(name="subscriptionId")
    private @Nullable Output subscriptionId;

    /**
     * @return Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified.
     * 
     */
    public Optional> subscriptionId() {
        return Optional.ofNullable(this.subscriptionId);
    }

    /**
     * The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created.
     * 
     */
    public Output type() {
        return this.type;
    }

    private ConnectionAuthenticationArgs() {}

    private ConnectionAuthenticationArgs(ConnectionAuthenticationArgs $) {
        this.certificate = $.certificate;
        this.clientId = $.clientId;
        this.name = $.name;
        this.principalId = $.principalId;
        this.secret = $.secret;
        this.subscriptionId = $.subscriptionId;
        this.type = $.type;
    }

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

    public static final class Builder {
        private ConnectionAuthenticationArgs $;

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

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

        /**
         * @param certificate Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`.
         * 
         * @return builder
         * 
         */
        public Builder certificate(@Nullable Output certificate) {
            $.certificate = certificate;
            return this;
        }

        /**
         * @param certificate Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`.
         * 
         * @return builder
         * 
         */
        public Builder certificate(String certificate) {
            return certificate(Output.of(certificate));
        }

        /**
         * @param clientId Client ID for `userAssignedIdentity` or `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. When `type` is set to `userAssignedIdentity`, `client_id` and `subscription_id` should be either both specified or both not specified.
         * 
         * @return builder
         * 
         */
        public Builder clientId(@Nullable Output clientId) {
            $.clientId = clientId;
            return this;
        }

        /**
         * @param clientId Client ID for `userAssignedIdentity` or `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. When `type` is set to `userAssignedIdentity`, `client_id` and `subscription_id` should be either both specified or both not specified.
         * 
         * @return builder
         * 
         */
        public Builder clientId(String clientId) {
            return clientId(Output.of(clientId));
        }

        /**
         * @param name Username or account name for secret auth. `name` and `secret` should be either both specified or both not specified when `type` is set to `secret`.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Username or account name for secret auth. `name` and `secret` should be either both specified or both not specified when `type` is set to `secret`.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param principalId Principal ID for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`.
         * 
         * @return builder
         * 
         */
        public Builder principalId(@Nullable Output principalId) {
            $.principalId = principalId;
            return this;
        }

        /**
         * @param principalId Principal ID for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`.
         * 
         * @return builder
         * 
         */
        public Builder principalId(String principalId) {
            return principalId(Output.of(principalId));
        }

        /**
         * @param secret Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`.
         * 
         * @return builder
         * 
         */
        public Builder secret(@Nullable Output secret) {
            $.secret = secret;
            return this;
        }

        /**
         * @param secret Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`.
         * 
         * @return builder
         * 
         */
        public Builder secret(String secret) {
            return secret(Output.of(secret));
        }

        /**
         * @param subscriptionId Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionId(@Nullable Output subscriptionId) {
            $.subscriptionId = subscriptionId;
            return this;
        }

        /**
         * @param subscriptionId Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionId(String subscriptionId) {
            return subscriptionId(Output.of(subscriptionId));
        }

        /**
         * @param type The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy