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

com.pulumi.azurenative.sql.ServerKeyArgs 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 ServerKeyArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServerKeyArgs Empty = new ServerKeyArgs();

    /**
     * The name of the server key to be operated on (updated or created). The key name is required to be in the format of 'vault_key_version'. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: YourVaultName_YourKeyName_YourKeyVersion
     * 
     */
    @Import(name="keyName")
    private @Nullable Output keyName;

    /**
     * @return The name of the server key to be operated on (updated or created). The key name is required to be in the format of 'vault_key_version'. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: YourVaultName_YourKeyName_YourKeyVersion
     * 
     */
    public Optional> keyName() {
        return Optional.ofNullable(this.keyName);
    }

    /**
     * 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 server key type like 'ServiceManaged', 'AzureKeyVault'.
     * 
     */
    @Import(name="serverKeyType", required=true)
    private Output> serverKeyType;

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

    /**
     * The name of the server.
     * 
     */
    @Import(name="serverName", required=true)
    private Output serverName;

    /**
     * @return The name of the server.
     * 
     */
    public Output serverName() {
        return this.serverName;
    }

    /**
     * The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'
     * 
     */
    @Import(name="uri")
    private @Nullable Output uri;

    /**
     * @return The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'
     * 
     */
    public Optional> uri() {
        return Optional.ofNullable(this.uri);
    }

    private ServerKeyArgs() {}

    private ServerKeyArgs(ServerKeyArgs $) {
        this.keyName = $.keyName;
        this.resourceGroupName = $.resourceGroupName;
        this.serverKeyType = $.serverKeyType;
        this.serverName = $.serverName;
        this.uri = $.uri;
    }

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

    public static final class Builder {
        private ServerKeyArgs $;

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

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

        /**
         * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be in the format of 'vault_key_version'. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: YourVaultName_YourKeyName_YourKeyVersion
         * 
         * @return builder
         * 
         */
        public Builder keyName(@Nullable Output keyName) {
            $.keyName = keyName;
            return this;
        }

        /**
         * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be in the format of 'vault_key_version'. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: YourVaultName_YourKeyName_YourKeyVersion
         * 
         * @return builder
         * 
         */
        public Builder keyName(String keyName) {
            return keyName(Output.of(keyName));
        }

        /**
         * @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 server key type like 'ServiceManaged', 'AzureKeyVault'.
         * 
         * @return builder
         * 
         */
        public Builder serverKeyType(Output> serverKeyType) {
            $.serverKeyType = serverKeyType;
            return this;
        }

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

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

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

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

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

        /**
         * @param uri The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'
         * 
         * @return builder
         * 
         */
        public Builder uri(@Nullable Output uri) {
            $.uri = uri;
            return this;
        }

        /**
         * @param uri The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'
         * 
         * @return builder
         * 
         */
        public Builder uri(String uri) {
            return uri(Output.of(uri));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy