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

com.pulumi.azurenative.storagecache.Cache 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.storagecache;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.storagecache.CacheArgs;
import com.pulumi.azurenative.storagecache.outputs.CacheDirectorySettingsResponse;
import com.pulumi.azurenative.storagecache.outputs.CacheEncryptionSettingsResponse;
import com.pulumi.azurenative.storagecache.outputs.CacheHealthResponse;
import com.pulumi.azurenative.storagecache.outputs.CacheIdentityResponse;
import com.pulumi.azurenative.storagecache.outputs.CacheNetworkSettingsResponse;
import com.pulumi.azurenative.storagecache.outputs.CacheResponseSku;
import com.pulumi.azurenative.storagecache.outputs.CacheSecuritySettingsResponse;
import com.pulumi.azurenative.storagecache.outputs.CacheUpgradeSettingsResponse;
import com.pulumi.azurenative.storagecache.outputs.CacheUpgradeStatusResponse;
import com.pulumi.azurenative.storagecache.outputs.PrimingJobResponse;
import com.pulumi.azurenative.storagecache.outputs.StorageTargetSpaceAllocationResponse;
import com.pulumi.azurenative.storagecache.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * A cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md
 * Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2021-03-01.
 * 
 * Other available API versions: 2020-10-01, 2021-03-01, 2023-03-01-preview, 2023-11-01-preview, 2024-03-01.
 * 
 * ## Example Usage
 * ### Caches_CreateOrUpdate_ldap_only
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.storagecache.Cache;
 * import com.pulumi.azurenative.storagecache.CacheArgs;
 * import com.pulumi.azurenative.storagecache.inputs.CacheDirectorySettingsArgs;
 * import com.pulumi.azurenative.storagecache.inputs.CacheUsernameDownloadSettingsArgs;
 * import com.pulumi.azurenative.storagecache.inputs.CacheUsernameDownloadSettingsCredentialsArgs;
 * import com.pulumi.azurenative.storagecache.inputs.CacheEncryptionSettingsArgs;
 * import com.pulumi.azurenative.storagecache.inputs.KeyVaultKeyReferenceArgs;
 * import com.pulumi.azurenative.storagecache.inputs.KeyVaultKeyReferenceSourceVaultArgs;
 * import com.pulumi.azurenative.storagecache.inputs.CacheSecuritySettingsArgs;
 * import com.pulumi.azurenative.storagecache.inputs.CacheSkuArgs;
 * import com.pulumi.azurenative.storagecache.inputs.CacheUpgradeSettingsArgs;
 * 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 cache = new Cache("cache", CacheArgs.builder()
 *             .cacheName("sc1")
 *             .cacheSizeGB(3072)
 *             .directoryServicesSettings(CacheDirectorySettingsArgs.builder()
 *                 .usernameDownload(CacheUsernameDownloadSettingsArgs.builder()
 *                     .credentials(CacheUsernameDownloadSettingsCredentialsArgs.builder()
 *                         .bindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local")
 *                         .bindPassword("")
 *                         .build())
 *                     .extendedGroups(true)
 *                     .ldapBaseDN("dc=contosoad,dc=contoso,dc=local")
 *                     .ldapServer("192.0.2.12")
 *                     .usernameSource("LDAP")
 *                     .build())
 *                 .build())
 *             .encryptionSettings(CacheEncryptionSettingsArgs.builder()
 *                 .keyEncryptionKey(KeyVaultKeyReferenceArgs.builder()
 *                     .keyUrl("https://keyvault-cmk.vault.azure.net/keys/key2048/test")
 *                     .sourceVault(KeyVaultKeyReferenceSourceVaultArgs.builder()
 *                         .id("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .location("westus")
 *             .resourceGroupName("scgroup")
 *             .securitySettings(CacheSecuritySettingsArgs.builder()
 *                 .accessPolicies(NfsAccessPolicyArgs.builder()
 *                     .accessRules(NfsAccessRuleArgs.builder()
 *                         .access("rw")
 *                         .rootSquash(false)
 *                         .scope("default")
 *                         .submountAccess(true)
 *                         .suid(false)
 *                         .build())
 *                     .name("default")
 *                     .build())
 *                 .build())
 *             .sku(CacheSkuArgs.builder()
 *                 .name("Standard_2G")
 *                 .build())
 *             .subnet("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1")
 *             .tags(Map.of("Dept", "Contoso"))
 *             .upgradeSettings(CacheUpgradeSettingsArgs.builder()
 *                 .scheduledTime("2022-04-26T18:25:43.511Z")
 *                 .upgradeScheduleEnabled(true)
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:storagecache:Cache sc1 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName} * ``` * */ @ResourceType(type="azure-native:storagecache:Cache") public class Cache extends com.pulumi.resources.CustomResource { /** * The size of this Cache, in GB. * */ @Export(name="cacheSizeGB", refs={Integer.class}, tree="[0]") private Output cacheSizeGB; /** * @return The size of this Cache, in GB. * */ public Output> cacheSizeGB() { return Codegen.optional(this.cacheSizeGB); } /** * Specifies Directory Services settings of the cache. * */ @Export(name="directoryServicesSettings", refs={CacheDirectorySettingsResponse.class}, tree="[0]") private Output directoryServicesSettings; /** * @return Specifies Directory Services settings of the cache. * */ public Output> directoryServicesSettings() { return Codegen.optional(this.directoryServicesSettings); } /** * Specifies encryption settings of the cache. * */ @Export(name="encryptionSettings", refs={CacheEncryptionSettingsResponse.class}, tree="[0]") private Output encryptionSettings; /** * @return Specifies encryption settings of the cache. * */ public Output> encryptionSettings() { return Codegen.optional(this.encryptionSettings); } /** * Health of the cache. * */ @Export(name="health", refs={CacheHealthResponse.class}, tree="[0]") private Output health; /** * @return Health of the cache. * */ public Output health() { return this.health; } /** * The identity of the cache, if configured. * */ @Export(name="identity", refs={CacheIdentityResponse.class}, tree="[0]") private Output identity; /** * @return The identity of the cache, if configured. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * Region name string. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Region name string. * */ public Output> location() { return Codegen.optional(this.location); } /** * Array of IPv4 addresses that can be used by clients mounting this cache. * */ @Export(name="mountAddresses", refs={List.class,String.class}, tree="[0,1]") private Output> mountAddresses; /** * @return Array of IPv4 addresses that can be used by clients mounting this cache. * */ public Output> mountAddresses() { return this.mountAddresses; } /** * Name of cache. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Name of cache. * */ public Output name() { return this.name; } /** * Specifies network settings of the cache. * */ @Export(name="networkSettings", refs={CacheNetworkSettingsResponse.class}, tree="[0]") private Output networkSettings; /** * @return Specifies network settings of the cache. * */ public Output> networkSettings() { return Codegen.optional(this.networkSettings); } /** * Specifies the priming jobs defined in the cache. * */ @Export(name="primingJobs", refs={List.class,PrimingJobResponse.class}, tree="[0,1]") private Output> primingJobs; /** * @return Specifies the priming jobs defined in the cache. * */ public Output> primingJobs() { return this.primingJobs; } /** * ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property * */ public Output provisioningState() { return this.provisioningState; } /** * Specifies security settings of the cache. * */ @Export(name="securitySettings", refs={CacheSecuritySettingsResponse.class}, tree="[0]") private Output securitySettings; /** * @return Specifies security settings of the cache. * */ public Output> securitySettings() { return Codegen.optional(this.securitySettings); } /** * SKU for the cache. * */ @Export(name="sku", refs={CacheResponseSku.class}, tree="[0]") private Output sku; /** * @return SKU for the cache. * */ public Output> sku() { return Codegen.optional(this.sku); } /** * Specifies the space allocation percentage for each storage target in the cache. * */ @Export(name="spaceAllocation", refs={List.class,StorageTargetSpaceAllocationResponse.class}, tree="[0,1]") private Output> spaceAllocation; /** * @return Specifies the space allocation percentage for each storage target in the cache. * */ public Output> spaceAllocation() { return this.spaceAllocation; } /** * Subnet used for the cache. * */ @Export(name="subnet", refs={String.class}, tree="[0]") private Output subnet; /** * @return Subnet used for the cache. * */ public Output> subnet() { return Codegen.optional(this.subnet); } /** * The system meta data relating to this resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return The system meta data relating to this resource. * */ public Output systemData() { return this.systemData; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Type of the cache; Microsoft.StorageCache/Cache * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Type of the cache; Microsoft.StorageCache/Cache * */ public Output type() { return this.type; } /** * Upgrade settings of the cache. * */ @Export(name="upgradeSettings", refs={CacheUpgradeSettingsResponse.class}, tree="[0]") private Output upgradeSettings; /** * @return Upgrade settings of the cache. * */ public Output> upgradeSettings() { return Codegen.optional(this.upgradeSettings); } /** * Upgrade status of the cache. * */ @Export(name="upgradeStatus", refs={CacheUpgradeStatusResponse.class}, tree="[0]") private Output upgradeStatus; /** * @return Upgrade status of the cache. * */ public Output upgradeStatus() { return this.upgradeStatus; } /** * Availability zones for resources. This field should only contain a single element in the array. * */ @Export(name="zones", refs={List.class,String.class}, tree="[0,1]") private Output> zones; /** * @return Availability zones for resources. This field should only contain a single element in the array. * */ public Output>> zones() { return Codegen.optional(this.zones); } /** * * @param name The _unique_ name of the resulting resource. */ public Cache(java.lang.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(java.lang.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(java.lang.String name, CacheArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:storagecache:Cache", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Cache(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:storagecache:Cache", name, null, makeResourceOptions(options, id), false); } private static CacheArgs makeArgs(CacheArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? CacheArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:storagecache/v20190801preview:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20191101:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20200301:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20201001:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20210301:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20210501:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20210901:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20220101:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20220501:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20230101:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20230301preview:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20230501:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20231101preview:Cache").build()), Output.of(Alias.builder().type("azure-native:storagecache/v20240301:Cache").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static Cache get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Cache(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy