CacheArgs

data class CacheArgs(val cacheName: Output<String>? = null, val cacheSizeGB: Output<Int>? = null, val directoryServicesSettings: Output<CacheDirectorySettingsArgs>? = null, val encryptionSettings: Output<CacheEncryptionSettingsArgs>? = null, val identity: Output<CacheIdentityArgs>? = null, val location: Output<String>? = null, val networkSettings: Output<CacheNetworkSettingsArgs>? = null, val provisioningState: Output<Either<String, ProvisioningStateType>>? = null, val resourceGroupName: Output<String>? = null, val securitySettings: Output<CacheSecuritySettingsArgs>? = null, val sku: Output<CacheSkuArgs>? = null, val subnet: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<CacheArgs>

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

Constructors

Link copied to clipboard
constructor(cacheName: Output<String>? = null, cacheSizeGB: Output<Int>? = null, directoryServicesSettings: Output<CacheDirectorySettingsArgs>? = null, encryptionSettings: Output<CacheEncryptionSettingsArgs>? = null, identity: Output<CacheIdentityArgs>? = null, location: Output<String>? = null, networkSettings: Output<CacheNetworkSettingsArgs>? = null, provisioningState: Output<Either<String, ProvisioningStateType>>? = null, resourceGroupName: Output<String>? = null, securitySettings: Output<CacheSecuritySettingsArgs>? = null, sku: Output<CacheSkuArgs>? = null, subnet: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val cacheName: Output<String>? = null

Name of Cache. Length of name must not be greater than 80 and chars must be from the -0-9a-zA-Z_ char class.

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

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
val identity: Output<CacheIdentityArgs>? = null

The identity of the cache, if configured.

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

Region name string.

Link copied to clipboard

Specifies network settings of the cache.

Link copied to clipboard
val provisioningState: Output<Either<String, ProvisioningStateType>>? = null

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 resourceGroupName: Output<String>? = null

Target resource group.

Link copied to clipboard

Specifies security settings of the cache.

Link copied to clipboard
val sku: Output<CacheSkuArgs>? = null

SKU for the Cache.

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

Subnet used for the Cache.

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

Resource tags.

Functions

Link copied to clipboard
open override fun toJava(): CacheArgs