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

com.pulumi.azure.appservice.outputs.ConnectionAuthentication 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.10.0-alpha.1731737215
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.outputs;

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

@CustomType
public final class ConnectionAuthentication {
    /**
     * @return Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`.
     * 
     */
    private @Nullable String certificate;
    /**
     * @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.
     * 
     */
    private @Nullable String clientId;
    /**
     * @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`.
     * 
     */
    private @Nullable String name;
    /**
     * @return Principal ID for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`.
     * 
     */
    private @Nullable String principalId;
    /**
     * @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`.
     * 
     */
    private @Nullable String secret;
    /**
     * @return Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified.
     * 
     */
    private @Nullable String subscriptionId;
    /**
     * @return The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created.
     * 
     */
    private String type;

    private ConnectionAuthentication() {}
    /**
     * @return Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`.
     * 
     */
    public Optional certificate() {
        return Optional.ofNullable(this.certificate);
    }
    /**
     * @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);
    }
    /**
     * @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);
    }
    /**
     * @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);
    }
    /**
     * @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);
    }
    /**
     * @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);
    }
    /**
     * @return The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created.
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(ConnectionAuthentication defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String certificate;
        private @Nullable String clientId;
        private @Nullable String name;
        private @Nullable String principalId;
        private @Nullable String secret;
        private @Nullable String subscriptionId;
        private String type;
        public Builder() {}
        public Builder(ConnectionAuthentication defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.certificate = defaults.certificate;
    	      this.clientId = defaults.clientId;
    	      this.name = defaults.name;
    	      this.principalId = defaults.principalId;
    	      this.secret = defaults.secret;
    	      this.subscriptionId = defaults.subscriptionId;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder certificate(@Nullable String certificate) {

            this.certificate = certificate;
            return this;
        }
        @CustomType.Setter
        public Builder clientId(@Nullable String clientId) {

            this.clientId = clientId;
            return this;
        }
        @CustomType.Setter
        public Builder name(@Nullable String name) {

            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder principalId(@Nullable String principalId) {

            this.principalId = principalId;
            return this;
        }
        @CustomType.Setter
        public Builder secret(@Nullable String secret) {

            this.secret = secret;
            return this;
        }
        @CustomType.Setter
        public Builder subscriptionId(@Nullable String subscriptionId) {

            this.subscriptionId = subscriptionId;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("ConnectionAuthentication", "type");
            }
            this.type = type;
            return this;
        }
        public ConnectionAuthentication build() {
            final var _resultValue = new ConnectionAuthentication();
            _resultValue.certificate = certificate;
            _resultValue.clientId = clientId;
            _resultValue.name = name;
            _resultValue.principalId = principalId;
            _resultValue.secret = secret;
            _resultValue.subscriptionId = subscriptionId;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy