New-AzStorageCache
Create or update a cache.
Syntax
Default (Default)
New-AzStorageCache
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-CacheSizeGb <Int32>]
[-DirectoryServicesSetting <ICacheDirectorySettings>]
[-EncryptionSettingRotationToLatestKeyVersionEnabled]
[-IdentityType <CacheIdentityType>]
[-IdentityUserAssignedIdentity <Hashtable>]
[-KeyEncryptionKeyUrl <String>]
[-Location <String>]
[-NetworkSettingDnsSearchDomain <String>]
[-NetworkSettingDnsServer <String[]>]
[-NetworkSettingMtu <Int32>]
[-NetworkSettingNtpServer <String>]
[-SecuritySettingAccessPolicy <INfsAccessPolicy[]>]
[-SkuName <String>]
[-SourceVaultId <String>]
[-Subnet <String>]
[-Tag <Hashtable>]
[-UpgradeSettingScheduledTime <DateTime>]
[-UpgradeSettingUpgradeScheduleEnabled]
[-Zone <String[]>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Create or update a cache.
Examples
Example 1: Create or update a cache.
New-AzStorageCache -Name azps-storagecache -ResourceGroupName azps_test_gp_storagecache -Location eastus -CacheSizeGb "3072" -Subnet "/subscriptions/{subId}/resourceGroups/azps_test_gp_storagecache_2/providers/Microsoft.Network/virtualNetworks/azps-virtual-network/subnets/default" -SkuName "Standard_2G" -Zone 1
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps-storagecache azps_test_gp_storagecache
Create or update a cache.
Example 2: Create or update a cache.
New-AzStorageCache -Name azps-storagecache -ResourceGroupName azps_test_gp_storagecache -IdentityType 'UserAssigned' -IdentityUserAssignedIdentity @{"/subscriptions/{subId}/resourcegroups/azps_test_gp_storagecache/providers/Microsoft.ManagedIdentity/userAssignedIdentities/azps-management-identity" = @{}} -KeyEncryptionKeyUrl "https://azps-keyvault.vault.azure.net/keys/azps-kv/4cc795e46f114ce2a65b82b312964e0e" -SourceVaultId "/subscriptions/{subId}/resourceGroups/azps_test_gp_storagecache/providers/Microsoft.KeyVault/vaults/azps-keyvault" -Location eastus -CacheSizeGb "3072" -Subnet "/subscriptions/{subId}/resourceGroups/azps_test_gp_storagecache/providers/Microsoft.Network/virtualNetworks/azps-virtual-network/subnets/default" -SkuName "Standard_2G" -Zone 1
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps-storagecache azps_test_gp_storagecache
Create or update a cache.
Parameters
-AsJob
Run the command as a job
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CacheSizeGb
The size of this Cache, in GB.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DirectoryServicesSetting
Specifies Directory Services settings of the cache.
To construct, see NOTES section for DIRECTORYSERVICESSETTING properties and create a hash table.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EncryptionSettingRotationToLatestKeyVersionEnabled
Specifies whether the service will automatically rotate to the newest version of the key in the key vault.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IdentityType
The type of identity used for the cache
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IdentityUserAssignedIdentity
A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KeyEncryptionKeyUrl
The URL referencing a key encryption key in key vault.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Location
Region name string.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Name of cache.
Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: CacheName
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkSettingDnsSearchDomain
DNS search domain
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkSettingDnsServer
DNS servers for the cache to use.
It will be set from the network configuration if no value is provided.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkSettingMtu
The IPv4 maximum transmission unit configured for the subnet.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkSettingNtpServer
NTP server IP Address or FQDN for the cache to use.
The default is time.windows.com.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NoWait
Run the command asynchronously
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SecuritySettingAccessPolicy
NFS access policies defined for this cache.
To construct, see NOTES section for SECURITYSETTINGACCESSPOLICY properties and create a hash table.
Parameter properties
Type: INfsAccessPolicy [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SkuName
SKU name for this cache.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SourceVaultId
Resource Id.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Subnet
Subnet used for the cache.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The ID of the target subscription.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
Resource tags.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-UpgradeSettingScheduledTime
When upgradeScheduleEnabled is true, this field holds the user-chosen upgrade time.
At the user-chosen time, the firmware update will automatically be installed on the cache.
Parameter properties
Type: DateTime
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-UpgradeSettingUpgradeScheduleEnabled
True if the user chooses to select an installation time between now and firmwareUpdateDeadline.
Else the firmware will automatically be installed after firmwareUpdateDeadline if not triggered earlier via the upgrade operation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Zone
Availability zones for resources.
This field should only contain a single element in the array.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs