// *** 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.hpc;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.hpc.CacheArgs;
import com.pulumi.azure.hpc.inputs.CacheState;
import com.pulumi.azure.hpc.outputs.CacheDefaultAccessPolicy;
import com.pulumi.azure.hpc.outputs.CacheDirectoryActiveDirectory;
import com.pulumi.azure.hpc.outputs.CacheDirectoryFlatFile;
import com.pulumi.azure.hpc.outputs.CacheDirectoryLdap;
import com.pulumi.azure.hpc.outputs.CacheDns;
import com.pulumi.azure.hpc.outputs.CacheIdentity;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a HPC Cache.
 * 
 * &gt; **Note:** By request of the service team the provider no longer automatically registering the `Microsoft.StorageCache` Resource Provider for this resource. To register it you can run `az provider register --namespace &#39;Microsoft.StorageCache&#39;`.
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.hpc.Cache;
 * import com.pulumi.azure.hpc.CacheArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleVirtualNetwork = new VirtualNetwork(&#34;exampleVirtualNetwork&#34;, VirtualNetworkArgs.builder()        
 *             .addressSpaces(&#34;10.0.0.0/16&#34;)
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .build());
 * 
 *         var exampleSubnet = new Subnet(&#34;exampleSubnet&#34;, SubnetArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes(&#34;10.0.1.0/24&#34;)
 *             .build());
 * 
 *         var exampleCache = new Cache(&#34;exampleCache&#34;, CacheArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .cacheSizeInGb(3072)
 *             .subnetId(exampleSubnet.id())
 *             .skuName(&#34;Standard_2G&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * HPC Caches can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:hpc/cache:Cache example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.StorageCache/caches/cacheName
 * ```
 * 
 */
@ResourceType(type="azure:hpc/cache:Cache")
public class Cache extends com.pulumi.resources.CustomResource {
    /**
     * Specifies whether the HPC Cache automatically rotates Encryption Key to the latest version.
     * 
     */
    @Export(name="automaticallyRotateKeyToLatestEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> automaticallyRotateKeyToLatestEnabled;

    /**
     * @return Specifies whether the HPC Cache automatically rotates Encryption Key to the latest version.
     * 
     */
    public Output<Optional<Boolean>> automaticallyRotateKeyToLatestEnabled() {
        return Codegen.optional(this.automaticallyRotateKeyToLatestEnabled);
    }
    /**
     * The size of the HPC Cache, in GB. Possible values are `3072`, `6144`, `12288`, `21623`, `24576`, `43246`, `49152` and `86491`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The `21623`, `43246` and `86491` sizes are restricted to read only resources.
     * 
     */
    @Export(name="cacheSizeInGb", refs={Integer.class}, tree="[0]")
    private Output<Integer> cacheSizeInGb;

    /**
     * @return The size of the HPC Cache, in GB. Possible values are `3072`, `6144`, `12288`, `21623`, `24576`, `43246`, `49152` and `86491`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The `21623`, `43246` and `86491` sizes are restricted to read only resources.
     * 
     */
    public Output<Integer> cacheSizeInGb() {
        return this.cacheSizeInGb;
    }
    /**
     * A `default_access_policy` block as defined below.
     * 
     */
    @Export(name="defaultAccessPolicy", refs={CacheDefaultAccessPolicy.class}, tree="[0]")
    private Output<CacheDefaultAccessPolicy> defaultAccessPolicy;

    /**
     * @return A `default_access_policy` block as defined below.
     * 
     */
    public Output<CacheDefaultAccessPolicy> defaultAccessPolicy() {
        return this.defaultAccessPolicy;
    }
    /**
     * A `directory_active_directory` block as defined below.
     * 
     */
    @Export(name="directoryActiveDirectory", refs={CacheDirectoryActiveDirectory.class}, tree="[0]")
    private Output</* @Nullable */ CacheDirectoryActiveDirectory> directoryActiveDirectory;

    /**
     * @return A `directory_active_directory` block as defined below.
     * 
     */
    public Output<Optional<CacheDirectoryActiveDirectory>> directoryActiveDirectory() {
        return Codegen.optional(this.directoryActiveDirectory);
    }
    /**
     * A `directory_flat_file` block as defined below.
     * 
     */
    @Export(name="directoryFlatFile", refs={CacheDirectoryFlatFile.class}, tree="[0]")
    private Output</* @Nullable */ CacheDirectoryFlatFile> directoryFlatFile;

    /**
     * @return A `directory_flat_file` block as defined below.
     * 
     */
    public Output<Optional<CacheDirectoryFlatFile>> directoryFlatFile() {
        return Codegen.optional(this.directoryFlatFile);
    }
    /**
     * A `directory_ldap` block as defined below.
     * 
     * &gt; **Note:** Only one of `directory_active_directory`, `directory_flat_file` and `directory_ldap` can be set.
     * 
     */
    @Export(name="directoryLdap", refs={CacheDirectoryLdap.class}, tree="[0]")
    private Output</* @Nullable */ CacheDirectoryLdap> directoryLdap;

    /**
     * @return A `directory_ldap` block as defined below.
     * 
     * &gt; **Note:** Only one of `directory_active_directory`, `directory_flat_file` and `directory_ldap` can be set.
     * 
     */
    public Output<Optional<CacheDirectoryLdap>> directoryLdap() {
        return Codegen.optional(this.directoryLdap);
    }
    /**
     * A `dns` block as defined below.
     * 
     */
    @Export(name="dns", refs={CacheDns.class}, tree="[0]")
    private Output</* @Nullable */ CacheDns> dns;

    /**
     * @return A `dns` block as defined below.
     * 
     */
    public Output<Optional<CacheDns>> dns() {
        return Codegen.optional(this.dns);
    }
    /**
     * An `identity` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="identity", refs={CacheIdentity.class}, tree="[0]")
    private Output</* @Nullable */ CacheIdentity> identity;

    /**
     * @return An `identity` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<CacheIdentity>> identity() {
        return Codegen.optional(this.identity);
    }
    /**
     * The ID of the Key Vault Key which should be used to encrypt the data in this HPC Cache.
     * 
     */
    @Export(name="keyVaultKeyId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> keyVaultKeyId;

    /**
     * @return The ID of the Key Vault Key which should be used to encrypt the data in this HPC Cache.
     * 
     */
    public Output<Optional<String>> keyVaultKeyId() {
        return Codegen.optional(this.keyVaultKeyId);
    }
    /**
     * Specifies the supported Azure Region where the HPC Cache should be created. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

    /**
     * @return Specifies the supported Azure Region where the HPC Cache should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * A list of IP Addresses where the HPC Cache can be mounted.
     * 
     */
    @Export(name="mountAddresses", refs={List.class,String.class}, tree="[0,1]")
    private Output<List<String>> mountAddresses;

    /**
     * @return A list of IP Addresses where the HPC Cache can be mounted.
     * 
     */
    public Output<List<String>> mountAddresses() {
        return this.mountAddresses;
    }
    /**
     * The IPv4 maximum transmission unit configured for the subnet of the HPC Cache. Possible values range from 576 - 1500. Defaults to `1500`.
     * 
     */
    @Export(name="mtu", refs={Integer.class}, tree="[0]")
    private Output</* @Nullable */ Integer> mtu;

    /**
     * @return The IPv4 maximum transmission unit configured for the subnet of the HPC Cache. Possible values range from 576 - 1500. Defaults to `1500`.
     * 
     */
    public Output<Optional<Integer>> mtu() {
        return Codegen.optional(this.mtu);
    }
    /**
     * The name of the HPC Cache. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name of the HPC Cache. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The NTP server IP Address or FQDN for the HPC Cache. Defaults to `time.windows.com`.
     * 
     */
    @Export(name="ntpServer", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> ntpServer;

    /**
     * @return The NTP server IP Address or FQDN for the HPC Cache. Defaults to `time.windows.com`.
     * 
     */
    public Output<Optional<String>> ntpServer() {
        return Codegen.optional(this.ntpServer);
    }
    /**
     * The name of the Resource Group in which to create the HPC Cache. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group in which to create the HPC Cache. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * The SKU of HPC Cache to use. Possible values are (ReadWrite) - `Standard_2G`, `Standard_4G` `Standard_8G` or (ReadOnly) - `Standard_L4_5G`, `Standard_L9G`, and `Standard_L16G`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The read-only SKUs have restricted cache sizes. `Standard_L4_5G` must be set to `21623`. `Standard_L9G` to `43246` and `Standard_L16G` to `86491`.
     * 
     */
    @Export(name="skuName", refs={String.class}, tree="[0]")
    private Output<String> skuName;

    /**
     * @return The SKU of HPC Cache to use. Possible values are (ReadWrite) - `Standard_2G`, `Standard_4G` `Standard_8G` or (ReadOnly) - `Standard_L4_5G`, `Standard_L9G`, and `Standard_L16G`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The read-only SKUs have restricted cache sizes. `Standard_L4_5G` must be set to `21623`. `Standard_L9G` to `43246` and `Standard_L16G` to `86491`.
     * 
     */
    public Output<String> skuName() {
        return this.skuName;
    }
    /**
     * The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="subnetId", refs={String.class}, tree="[0]")
    private Output<String> subnetId;

    /**
     * @return The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> subnetId() {
        return this.subnetId;
    }
    /**
     * A mapping of tags to assign to the HPC Cache.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the HPC Cache.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public Cache(String name) {
        this(name, CacheArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public Cache(String name, CacheArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public Cache(String name, CacheArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:hpc/cache:Cache", name, args == null ? CacheArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private Cache(String name, Output<String> id, @Nullable CacheState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:hpc/cache:Cache", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static Cache get(String name, Output<String> id, @Nullable CacheState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new Cache(name, id, state, options);
    }
}
