Cache

class Cache : KotlinCustomResource

A Cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md API Version: 2021-03-01.

Example Usage

Caches_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var cache = new AzureNative.StorageCache.Cache("cache", new()
{
CacheName = "sc1",
CacheSizeGB = 3072,
DirectoryServicesSettings = new AzureNative.StorageCache.Inputs.CacheDirectorySettingsArgs
{
ActiveDirectory = new AzureNative.StorageCache.Inputs.CacheActiveDirectorySettingsArgs
{
CacheNetBiosName = "contosoSmb",
Credentials = new AzureNative.StorageCache.Inputs.CacheActiveDirectorySettingsCredentialsArgs
{
Password = "<password>",
Username = "consotoAdmin",
},
DomainName = "contosoAd.contoso.local",
DomainNetBiosName = "contosoAd",
PrimaryDnsIpAddress = "192.0.2.10",
SecondaryDnsIpAddress = "192.0.2.11",
},
UsernameDownload = new AzureNative.StorageCache.Inputs.CacheUsernameDownloadSettingsArgs
{
Credentials = new AzureNative.StorageCache.Inputs.CacheUsernameDownloadSettingsCredentialsArgs
{
BindDn = "cn=ldapadmin,dc=contosoad,dc=contoso,dc=local",
BindPassword = "<bindPassword>",
},
ExtendedGroups = true,
LdapBaseDN = "dc=contosoad,dc=contoso,dc=local",
LdapServer = "192.0.2.12",
UsernameSource = "LDAP",
},
},
EncryptionSettings = new AzureNative.StorageCache.Inputs.CacheEncryptionSettingsArgs
{
KeyEncryptionKey = new AzureNative.StorageCache.Inputs.KeyVaultKeyReferenceArgs
{
KeyUrl = "https://keyvault-cmk.vault.azure.net/keys/key2047/test",
SourceVault = new AzureNative.StorageCache.Inputs.KeyVaultKeyReferenceSourceVaultArgs
{
Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk",
},
},
},
Location = "westus",
ResourceGroupName = "scgroup",
SecuritySettings = new AzureNative.StorageCache.Inputs.CacheSecuritySettingsArgs
{
AccessPolicies = new[]
{
new AzureNative.StorageCache.Inputs.NfsAccessPolicyArgs
{
AccessRules = new[]
{
new AzureNative.StorageCache.Inputs.NfsAccessRuleArgs
{
Access = "rw",
RootSquash = false,
Scope = "default",
SubmountAccess = true,
Suid = false,
},
},
Name = "default",
},
},
},
Sku = new AzureNative.StorageCache.Inputs.CacheSkuArgs
{
Name = "Standard_2G",
},
Subnet = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1",
Tags =
{
{ "Dept", "Contoso" },
},
});
});
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 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(Map.ofEntries(
Map.entry("activeDirectory", Map.ofEntries(
Map.entry("cacheNetBiosName", "contosoSmb"),
Map.entry("credentials", Map.ofEntries(
Map.entry("password", "<password>"),
Map.entry("username", "consotoAdmin")
)),
Map.entry("domainName", "contosoAd.contoso.local"),
Map.entry("domainNetBiosName", "contosoAd"),
Map.entry("primaryDnsIpAddress", "192.0.2.10"),
Map.entry("secondaryDnsIpAddress", "192.0.2.11")
)),
Map.entry("usernameDownload", Map.ofEntries(
Map.entry("credentials", Map.ofEntries(
Map.entry("bindDn", "cn=ldapadmin,dc=contosoad,dc=contoso,dc=local"),
Map.entry("bindPassword", "<bindPassword>")
)),
Map.entry("extendedGroups", true),
Map.entry("ldapBaseDN", "dc=contosoad,dc=contoso,dc=local"),
Map.entry("ldapServer", "192.0.2.12"),
Map.entry("usernameSource", "LDAP")
))
))
.encryptionSettings(Map.of("keyEncryptionKey", Map.ofEntries(
Map.entry("keyUrl", "https://keyvault-cmk.vault.azure.net/keys/key2047/test"),
Map.entry("sourceVault", Map.of("id", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"))
)))
.location("westus")
.resourceGroupName("scgroup")
.securitySettings(Map.of("accessPolicies", Map.ofEntries(
Map.entry("accessRules", Map.ofEntries(
Map.entry("access", "rw"),
Map.entry("rootSquash", false),
Map.entry("scope", "default"),
Map.entry("submountAccess", true),
Map.entry("suid", false)
)),
Map.entry("name", "default")
)))
.sku(Map.of("name", "Standard_2G"))
.subnet("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1")
.tags(Map.of("Dept", "Contoso"))
.build());
}
}

Caches_CreateOrUpdate_ldap_only

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var cache = new AzureNative.StorageCache.Cache("cache", new()
{
CacheName = "sc1",
CacheSizeGB = 3072,
DirectoryServicesSettings = new AzureNative.StorageCache.Inputs.CacheDirectorySettingsArgs
{
UsernameDownload = new AzureNative.StorageCache.Inputs.CacheUsernameDownloadSettingsArgs
{
Credentials = new AzureNative.StorageCache.Inputs.CacheUsernameDownloadSettingsCredentialsArgs
{
BindDn = "cn=ldapadmin,dc=contosoad,dc=contoso,dc=local",
BindPassword = "<bindPassword>",
},
ExtendedGroups = true,
LdapBaseDN = "dc=contosoad,dc=contoso,dc=local",
LdapServer = "192.0.2.12",
UsernameSource = "LDAP",
},
},
EncryptionSettings = new AzureNative.StorageCache.Inputs.CacheEncryptionSettingsArgs
{
KeyEncryptionKey = new AzureNative.StorageCache.Inputs.KeyVaultKeyReferenceArgs
{
KeyUrl = "https://keyvault-cmk.vault.azure.net/keys/key2048/test",
SourceVault = new AzureNative.StorageCache.Inputs.KeyVaultKeyReferenceSourceVaultArgs
{
Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk",
},
},
},
Location = "westus",
ResourceGroupName = "scgroup",
SecuritySettings = new AzureNative.StorageCache.Inputs.CacheSecuritySettingsArgs
{
AccessPolicies = new[]
{
new AzureNative.StorageCache.Inputs.NfsAccessPolicyArgs
{
AccessRules = new[]
{
new AzureNative.StorageCache.Inputs.NfsAccessRuleArgs
{
Access = "rw",
RootSquash = false,
Scope = "default",
SubmountAccess = true,
Suid = false,
},
},
Name = "default",
},
},
},
Sku = new AzureNative.StorageCache.Inputs.CacheSkuArgs
{
Name = "Standard_2G",
},
Subnet = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1",
Tags =
{
{ "Dept", "Contoso" },
},
});
});
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 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(Map.of("usernameDownload", Map.ofEntries(
Map.entry("credentials", Map.ofEntries(
Map.entry("bindDn", "cn=ldapadmin,dc=contosoad,dc=contoso,dc=local"),
Map.entry("bindPassword", "<bindPassword>")
)),
Map.entry("extendedGroups", true),
Map.entry("ldapBaseDN", "dc=contosoad,dc=contoso,dc=local"),
Map.entry("ldapServer", "192.0.2.12"),
Map.entry("usernameSource", "LDAP")
)))
.encryptionSettings(Map.of("keyEncryptionKey", Map.ofEntries(
Map.entry("keyUrl", "https://keyvault-cmk.vault.azure.net/keys/key2048/test"),
Map.entry("sourceVault", Map.of("id", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"))
)))
.location("westus")
.resourceGroupName("scgroup")
.securitySettings(Map.of("accessPolicies", Map.ofEntries(
Map.entry("accessRules", Map.ofEntries(
Map.entry("access", "rw"),
Map.entry("rootSquash", false),
Map.entry("scope", "default"),
Map.entry("submountAccess", true),
Map.entry("suid", false)
)),
Map.entry("name", "default")
)))
.sku(Map.of("name", "Standard_2G"))
.subnet("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1")
.tags(Map.of("Dept", "Contoso"))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:storagecache:Cache sc1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1

Properties

Link copied to clipboard
val cacheSizeGB: Output<Int>?

The size of this Cache, in GB.

Link copied to clipboard

Specifies Directory Services settings of the cache.

Link copied to clipboard

Specifies encryption settings of the cache.

Link copied to clipboard

Health of the Cache.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The identity of the cache, if configured.

Link copied to clipboard
val location: Output<String>?

Region name string.

Link copied to clipboard
val mountAddresses: Output<List<String>>

Array of IP addresses that can be used by clients mounting this Cache.

Link copied to clipboard
val name: Output<String>

Name of Cache.

Link copied to clipboard

Specifies network settings of the cache.

Link copied to clipboard

ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Specifies security settings of the cache.

Link copied to clipboard
val sku: Output<CacheResponseSku>?

SKU for the Cache.

Link copied to clipboard
val subnet: Output<String>?

Subnet used for the Cache.

Link copied to clipboard

The system meta data relating to this resource.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Resource tags.

Link copied to clipboard
val type: Output<String>

Type of the Cache; Microsoft.StorageCache/Cache

Link copied to clipboard

Upgrade status of the Cache.

Link copied to clipboard
val urn: Output<String>