編輯

共用方式為


New-AzRedisEnterpriseCache

Creates a Redis Enterprise cache.

Syntax

New-AzRedisEnterpriseCache
   -ClusterName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -Location <String>
   -Sku <SkuName>
   [-Capacity <Int32>]
   [-MinimumTlsVersion <TlsVersion>]
   [-Zone <String[]>]
   [-Tag <Hashtable>]
   [-Module <IModule[]>]
   [-ClientProtocol <Protocol>]
   [-Port <Int32>]
   [-EvictionPolicy <EvictionPolicy>]
   [-GroupNickname <String>]
   [-LinkedDatabase <ILinkedDatabase[]>]
   [-ClusteringPolicy <ClusteringPolicy>]
   [-CustomerManagedKeyEncryptionKeyUrl <String>]
   [-IdentityType <ManagedServiceIdentityType>]
   [-IdentityUserAssignedIdentity <Hashtable>]
   [-KeyEncryptionKeyIdentityType <CmkIdentityType>]
   [-KeyEncryptionKeyIdentityUserAssignedIdentityResourceId <String>]
   [-AofPersistenceEnabled]
   [-AofPersistenceFrequency <AofFrequency>]
   [-RdbPersistenceEnabled]
   [-RdbPersistenceFrequency <RdbFrequency>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzRedisEnterpriseCache
   -ClusterName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -Location <String>
   -Sku <SkuName>
   [-Capacity <Int32>]
   [-MinimumTlsVersion <TlsVersion>]
   [-Zone <String[]>]
   [-Tag <Hashtable>]
   [-CustomerManagedKeyEncryptionKeyUrl <String>]
   [-IdentityType <ManagedServiceIdentityType>]
   [-IdentityUserAssignedIdentity <Hashtable>]
   [-KeyEncryptionKeyIdentityType <CmkIdentityType>]
   [-KeyEncryptionKeyIdentityUserAssignedIdentityResourceId <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-NoDatabase]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster with an associated database.

Examples

Example 1: Create a Redis Enterprise cache

New-AzRedisEnterpriseCache -Name "MyCache" -ResourceGroupName "MyGroup" -Location "West US" -Sku "Enterprise_E10"

Location Name    Type                            Zone Database
-------- ----    ----                            ---- --------
West US  MyCache Microsoft.Cache/redisEnterprise      {default}

This command creates a Redis Enterprise cache named MyCache with an associated database named default.

Example 2: Create a Redis Enterprise cache using some optional parameters

New-AzRedisEnterpriseCache -Name "MyCache" -ResourceGroupName "MyGroup" -Location "East US" -Sku "Enterprise_E20" -Capacity 4 -MinimumTlsVersion "1.2" -Zone "1","2","3" -Tag @{"tag1" = "value1"} -Module "{name:RedisBloom, args:`"ERROR_RATE 0.00 INITIAL_SIZE 400`"}","{name:RedisTimeSeries, args:`"RETENTION_POLICY 20`"}","{name:RediSearch}" -ClientProtocol "Plaintext" -EvictionPolicy "NoEviction" -ClusteringPolicy "EnterpriseCluster" -AofPersistenceEnabled -AofPersistenceFrequency "1s"

Location Name    Type                            Zone      Database
-------- ----    ----                            ----      --------
East US  MyCache Microsoft.Cache/redisEnterprise {1, 2, 3} {default}

This command creates a Redis Enterprise cache named MyCache with an associated database named default, using some optional parameters.

Example 3: Advanced - Create a Redis Enterprise cache cluster without an associated database

New-AzRedisEnterpriseCache -Name "MyCache" -ResourceGroupName "MyGroup" -Location "East US" -Sku "EnterpriseFlash_F300" -NoDatabase

Location Name    Type                            Zone Database
-------- ----    ----                            ---- --------
East US  MyCache Microsoft.Cache/redisEnterprise      {}

Warning: This command creates a Redis Enterprise cache cluster named MyCache without any associated database to hold data.

Example 4: Create a Redis Enterprise cache with a georeplicated database

New-AzRedisEnterpriseCache -Name "MyCache" -ResourceGroupName "MyGroup" -Location "West US" -Sku "Enterprise_E10" -ClientProtocol "Encrypted" -EvictionPolicy "NoEviction" -ClusteringPolicy "EnterpriseCluster" -GroupNickname "GroupNickname" -LinkedDatabase '{id:"/subscriptions/6b9ac7d2-7f6d-4de4-962c-43fda44bc3f2/resourceGroups/MyGroup/providers/Microsoft.Cache/redisEnterprise/MyCache/databases/default"}'

Location Name      Type                            Zone Database
-------- ----      ----                            ---- --------
West US  MyCache   Microsoft.Cache/redisEnterprise      {default}

This command creates a cache name MyCache with a georeplicated database named default

Parameters

-AofPersistenceEnabled

[Preview] Sets whether AOF persistence is enabled. After enabling AOF persistence, you will be unable to disable it. Support for disabling AOF persistence after enabling will be added at a later date.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AofPersistenceFrequency

[Preview] Sets the frequency at which data is written to disk if AOF persistence is enabled. Allowed values: 1s, always

Type:AofFrequency
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

Run the command as a job

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Capacity

The size of the Redis Enterprise cluster - defaults to 2 or 3 depending on SKU. Allowed values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs.

Type:Int32
Aliases:SkuCapacity
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ClientProtocol

Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols - default is Encrypted Allowed values: Encrypted, Plaintext

Type:Protocol
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ClusteringPolicy

Clustering policy - default is OSSCluster Specified at create time. Allowed values: EnterpriseCluster, OSSCluster

Type:ClusteringPolicy
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ClusterName

The name of the Redis Enterprise cluster.

Type:String
Aliases:Name
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CustomerManagedKeyEncryptionKeyUrl

Key encryption key Url versioned only. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78"

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EvictionPolicy

Redis eviction policy - default is VolatileLRU Allowed values: AllKeysLFU, AllKeysLRU, AllKeysRandom, VolatileLRU, VolatileLFU, VolatileTTL, VolatileRandom, NoEviction

Type:EvictionPolicy
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GroupNickname

Name for the group of linked database resources

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

Type:ManagedServiceIdentityType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IdentityUserAssignedIdentity

The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KeyEncryptionKeyIdentityType

Only userAssignedIdentity is supported in this API version; other types may be supported in the future

Type:CmkIdentityType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KeyEncryptionKeyIdentityUserAssignedIdentityResourceId

User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/<sub uuid>/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LinkedDatabase

List of database resources to link with this database To construct, see NOTES section for GEOREPLICATIONLINKEDDATABASE properties and create a hash table. To construct, see NOTES section for LINKEDDATABASE properties and create a hash table.

Type:ILinkedDatabase[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

The geo-location where the resource lives.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MinimumTlsVersion

The minimum TLS version for the cluster to support - default is 1.2 Allowed values: 1.0, 1.1, 1.2

Type:TlsVersion
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Module

Optional set of redis modules to enable in this database - modules can only be added at create time. To construct, see NOTES section for MODULE properties and create a hash table.

Type:IModule[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-NoDatabase

Advanced - Do not automatically create a default database. Warning: The cache will not be usable until you create a database.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Port

TCP port of the database endpoint - defaults to an available port Specified at create time.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RdbPersistenceEnabled

[Preview] Sets whether RDB persistence is enabled. After enabling RDB persistence, you will be unable to disable it. Support for disabling RDB persistence after enabling will be added at a later date.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RdbPersistenceFrequency

[Preview] Sets the frequency at which a snapshot of the database is created if RDB persistence is enabled. Allowed values: 1h, 6h, 12h

Type:RdbFrequency
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Sku

The type of Redis Enterprise cluster to deploy. Allowed values: Enterprise_E10, Enterprise_E20, Enterprise_E50, Enterprise_E100, EnterpriseFlash_F300, EnterpriseFlash_F700, EnterpriseFlash_F1500

Type:SkuName
Aliases:SkuName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The ID of the target subscription.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tag

Cluster resource tags.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Zone

The Availability Zones where this cluster will be deployed.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

ICluster