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

com.pulumi.azurenative.sql.ManagedInstanceKeyArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.azurenative.sql;

import com.pulumi.azurenative.sql.enums.ServerKeyType;
import com.pulumi.core.Either;
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 ManagedInstanceKeyArgs extends com.pulumi.resources.ResourceArgs {

    public static final ManagedInstanceKeyArgs Empty = new ManagedInstanceKeyArgs();

    /**
     * The name of the managed instance key to be operated on (updated or created).
     * 
     */
    @Import(name="keyName")
    private @Nullable Output keyName;

    /**
     * @return The name of the managed instance key to be operated on (updated or created).
     * 
     */
    public Optional> keyName() {
        return Optional.ofNullable(this.keyName);
    }

    /**
     * The name of the managed instance.
     * 
     */
    @Import(name="managedInstanceName", required=true)
    private Output managedInstanceName;

    /**
     * @return The name of the managed instance.
     * 
     */
    public Output managedInstanceName() {
        return this.managedInstanceName;
    }

    /**
     * The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The key type like 'ServiceManaged', 'AzureKeyVault'.
     * 
     */
    @Import(name="serverKeyType", required=true)
    private Output> serverKeyType;

    /**
     * @return The key type like 'ServiceManaged', 'AzureKeyVault'.
     * 
     */
    public Output> serverKeyType() {
        return this.serverKeyType;
    }

    /**
     * The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
     * 
     */
    @Import(name="uri")
    private @Nullable Output uri;

    /**
     * @return The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
     * 
     */
    public Optional> uri() {
        return Optional.ofNullable(this.uri);
    }

    private ManagedInstanceKeyArgs() {}

    private ManagedInstanceKeyArgs(ManagedInstanceKeyArgs $) {
        this.keyName = $.keyName;
        this.managedInstanceName = $.managedInstanceName;
        this.resourceGroupName = $.resourceGroupName;
        this.serverKeyType = $.serverKeyType;
        this.uri = $.uri;
    }

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

    public static final class Builder {
        private ManagedInstanceKeyArgs $;

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

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

        /**
         * @param keyName The name of the managed instance key to be operated on (updated or created).
         * 
         * @return builder
         * 
         */
        public Builder keyName(@Nullable Output keyName) {
            $.keyName = keyName;
            return this;
        }

        /**
         * @param keyName The name of the managed instance key to be operated on (updated or created).
         * 
         * @return builder
         * 
         */
        public Builder keyName(String keyName) {
            return keyName(Output.of(keyName));
        }

        /**
         * @param managedInstanceName The name of the managed instance.
         * 
         * @return builder
         * 
         */
        public Builder managedInstanceName(Output managedInstanceName) {
            $.managedInstanceName = managedInstanceName;
            return this;
        }

        /**
         * @param managedInstanceName The name of the managed instance.
         * 
         * @return builder
         * 
         */
        public Builder managedInstanceName(String managedInstanceName) {
            return managedInstanceName(Output.of(managedInstanceName));
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param serverKeyType The key type like 'ServiceManaged', 'AzureKeyVault'.
         * 
         * @return builder
         * 
         */
        public Builder serverKeyType(Output> serverKeyType) {
            $.serverKeyType = serverKeyType;
            return this;
        }

        /**
         * @param serverKeyType The key type like 'ServiceManaged', 'AzureKeyVault'.
         * 
         * @return builder
         * 
         */
        public Builder serverKeyType(Either serverKeyType) {
            return serverKeyType(Output.of(serverKeyType));
        }

        /**
         * @param serverKeyType The key type like 'ServiceManaged', 'AzureKeyVault'.
         * 
         * @return builder
         * 
         */
        public Builder serverKeyType(String serverKeyType) {
            return serverKeyType(Either.ofLeft(serverKeyType));
        }

        /**
         * @param serverKeyType The key type like 'ServiceManaged', 'AzureKeyVault'.
         * 
         * @return builder
         * 
         */
        public Builder serverKeyType(ServerKeyType serverKeyType) {
            return serverKeyType(Either.ofRight(serverKeyType));
        }

        /**
         * @param uri The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
         * 
         * @return builder
         * 
         */
        public Builder uri(@Nullable Output uri) {
            $.uri = uri;
            return this;
        }

        /**
         * @param uri The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
         * 
         * @return builder
         * 
         */
        public Builder uri(String uri) {
            return uri(Output.of(uri));
        }

        public ManagedInstanceKeyArgs build() {
            if ($.managedInstanceName == null) {
                throw new MissingRequiredPropertyException("ManagedInstanceKeyArgs", "managedInstanceName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ManagedInstanceKeyArgs", "resourceGroupName");
            }
            if ($.serverKeyType == null) {
                throw new MissingRequiredPropertyException("ManagedInstanceKeyArgs", "serverKeyType");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy