Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/redisenterprise/azext_redisenterprise/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def load_arguments(self, _):
c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('high_availability', arg_type=get_enum_type(['Disabled', 'Enabled']), options_list=['--high-availability'], help='Enabled by default. If highAvailability is disabled, the data set is not replicated. This affects the availability SLA, and increases the risk of data loss.')
c.argument('public_network_access', arg_type=get_enum_type(['Disabled', 'Enabled']), options_list=['--public-network-access'], help='Whether or not public network traffic can access the Redis cluster. Only Enabled or Disabled can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set.')
c.argument('sku', arg_type=get_enum_type(['Balanced_B0', 'Balanced_B1', 'Balanced_B10', 'Balanced_B100', 'Balanced_B1000', 'Balanced_B150', 'Balanced_B20', 'Balanced_B250', 'Balanced_B3', 'Balanced_B350', 'Balanced_B5', 'Balanced_B50', 'Balanced_B500', 'Balanced_B700', 'ComputeOptimized_X10', 'ComputeOptimized_X100', 'ComputeOptimized_X150', 'ComputeOptimized_X20', 'ComputeOptimized_X250', 'ComputeOptimized_X3', 'ComputeOptimized_X350', 'ComputeOptimized_X5', 'ComputeOptimized_X50', 'ComputeOptimized_X500', 'ComputeOptimized_X700', 'EnterpriseFlash_F1500', 'EnterpriseFlash_F300', 'EnterpriseFlash_F700', 'Enterprise_E1', 'Enterprise_E10', 'Enterprise_E100', 'Enterprise_E20', 'Enterprise_E200', 'Enterprise_E400', 'Enterprise_E5', 'Enterprise_E50', 'FlashOptimized_A1000', 'FlashOptimized_A1500', 'FlashOptimized_A2000', 'FlashOptimized_A250', 'FlashOptimized_A4500', 'FlashOptimized_A500', 'FlashOptimized_A700', 'MemoryOptimized_M10', 'MemoryOptimized_M100', 'MemoryOptimized_M1000', 'MemoryOptimized_M150', 'MemoryOptimized_M1500', 'MemoryOptimized_M20', 'MemoryOptimized_M2000', 'MemoryOptimized_M250', 'MemoryOptimized_M350', 'MemoryOptimized_M50', 'MemoryOptimized_M500', 'MemoryOptimized_M700']), help='The type of RedisEnterprise cluster '
'to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)')
c.argument('capacity', type=int, help='The size of the RedisEnterprise cluster. Defaults to 2 or 3 or not applicable depending on SKU.'
Expand Down Expand Up @@ -80,7 +81,7 @@ def load_arguments(self, _):
'can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.')
c.argument('port', type=int, help='TCP port of the database endpoint. Specified at create time. Defaults to an '
'available port.')
c.argument('access_keys_authentication', options_list=['--access-keys-auth', '--access-keys-authentication'], arg_type=get_enum_type(['Enabled', 'Disabled']), help='Access database using keys - default is enabled. This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created.')
c.argument('access_keys_authentication', options_list=['--access-keys-auth', '--access-keys-authentication'], arg_type=get_enum_type(['Enabled', 'Disabled']), help='Access database using keys - default is disabled. This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created.')
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The help text states 'default is disabled', but this contradicts the behavior in database/_create.py where the default is explicitly set to 'Disabled' (line 97). While the code and documentation are technically aligned, the phrasing could be clearer - consider 'Defaults to Disabled' instead of 'default is disabled' for better readability.

Suggested change
c.argument('access_keys_authentication', options_list=['--access-keys-auth', '--access-keys-authentication'], arg_type=get_enum_type(['Enabled', 'Disabled']), help='Access database using keys - default is disabled. This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created.')
c.argument('access_keys_authentication', options_list=['--access-keys-auth', '--access-keys-authentication'], arg_type=get_enum_type(['Enabled', 'Disabled']), help='Access database using keys. Defaults to Disabled. This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created.')

Copilot uses AI. Check for mistakes.
c.argument('clustering_policy', arg_type=get_enum_type(['EnterpriseCluster', 'OSSCluster', 'NoCluster']), help='Clustering policy - default '
'is OSSCluster. Specified at create time.')
c.argument('eviction_policy', arg_type=get_enum_type(['AllKeysLFU', 'AllKeysLRU', 'AllKeysRandom',
Expand All @@ -103,6 +104,7 @@ def load_arguments(self, _):
c.argument('cluster_name', options_list=['--cluster-name', '--name', '-n'], type=str, help='The name of the '
'RedisEnterprise cluster.', id_part='name')
c.argument('high_availability', arg_type=get_enum_type(['Disabled', 'Enabled']), options_list=['--high-availability'], help='Enabled by default. If highAvailability is disabled, the data set is not replicated. This affects the availability SLA, and increases the risk of data loss.')
c.argument('public_network_access', arg_type=get_enum_type(['Disabled', 'Enabled']), options_list=['--public-network-access'], help='Whether or not public network traffic can access the Redis cluster. Only Enabled or Disabled can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set.')
c.argument('sku', arg_type=get_enum_type(['Balanced_B0', 'Balanced_B1', 'Balanced_B10', 'Balanced_B100', 'Balanced_B1000', 'Balanced_B150', 'Balanced_B20', 'Balanced_B250', 'Balanced_B3', 'Balanced_B350', 'Balanced_B5', 'Balanced_B50', 'Balanced_B500', 'Balanced_B700', 'ComputeOptimized_X10', 'ComputeOptimized_X100', 'ComputeOptimized_X150', 'ComputeOptimized_X20', 'ComputeOptimized_X250', 'ComputeOptimized_X3', 'ComputeOptimized_X350', 'ComputeOptimized_X5', 'ComputeOptimized_X50', 'ComputeOptimized_X500', 'ComputeOptimized_X700', 'EnterpriseFlash_F1500', 'EnterpriseFlash_F300', 'EnterpriseFlash_F700', 'Enterprise_E1', 'Enterprise_E10', 'Enterprise_E100', 'Enterprise_E20', 'Enterprise_E200', 'Enterprise_E400', 'Enterprise_E5', 'Enterprise_E50', 'FlashOptimized_A1000', 'FlashOptimized_A1500', 'FlashOptimized_A2000', 'FlashOptimized_A250', 'FlashOptimized_A4500', 'FlashOptimized_A500', 'FlashOptimized_A700', 'MemoryOptimized_M10', 'MemoryOptimized_M100', 'MemoryOptimized_M1000', 'MemoryOptimized_M150', 'MemoryOptimized_M1500', 'MemoryOptimized_M20', 'MemoryOptimized_M2000', 'MemoryOptimized_M250', 'MemoryOptimized_M350', 'MemoryOptimized_M50', 'MemoryOptimized_M500', 'MemoryOptimized_M700']), help='The type of RedisEnterprise cluster '
'to deploy. Possible values: (Balanced_B1, ComputeOptimized_X10, MemoryOptimized_M10, Enterprise_E10, EnterpriseFlash_F300 etc.)')
c.argument('capacity', type=int, help='The size of the RedisEnterprise cluster. Defaults to 2 or 3 or not applicable depending on SKU.'
Expand Down Expand Up @@ -159,7 +161,7 @@ def load_arguments(self, _):
c.argument('client_protocol', arg_type=get_enum_type(['Encrypted', 'Plaintext']), help='Specifies whether '
'redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is '
'TLS-encrypted.')
c.argument('access_keys_authentication', options_list=['--access-keys-auth', '--access-keys-authentication'], arg_type=get_enum_type(['Enabled', 'Disabled']), help='Access database using keys - default is enabled. This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created.')
c.argument('access_keys_authentication', options_list=['--access-keys-auth', '--access-keys-authentication'], arg_type=get_enum_type(['Enabled', 'Disabled']), help='Access database using keys - default is disabled. This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created.')
c.argument('port', type=int, help='TCP port of the database endpoint. Specified at create time. Defaults to an '
'available port.')
c.argument('clustering_policy', arg_type=get_enum_type(['EnterpriseCluster', 'OSSCluster', 'NoCluster']), help='Clustering '
Expand All @@ -183,7 +185,7 @@ def load_arguments(self, _):
c.argument('client_protocol', arg_type=get_enum_type(['Encrypted', 'Plaintext']), help='Specifies whether '
'redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is '
'TLS-encrypted.')
c.argument('access_keys_authentication', options_list=['--access-keys-auth', '--access-keys-authentication'], arg_type=get_enum_type(['Enabled', 'Disabled']), help='Access database using keys - default is enabled. This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created.')
c.argument('access_keys_authentication', options_list=['--access-keys-auth', '--access-keys-authentication'], arg_type=get_enum_type(['Enabled', 'Disabled']), help='Access database using keys - default is disabled. This property can be Enabled/Disabled to allow or deny access with the current access keys. Can be updated even after database is created.')
c.argument('eviction_policy', arg_type=get_enum_type(['AllKeysLFU', 'AllKeysLRU', 'AllKeysRandom',
'VolatileLRU', 'VolatileLFU', 'VolatileTTL',
'VolatileRandom', 'NoEviction']), help='Redis eviction '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2025-05-01-preview",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}", "2025-05-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}", "2025-07-01"],
]
}

Expand Down Expand Up @@ -156,6 +156,13 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="The minimum TLS version for the cluster to support, e.g. '1.2'",
enum={"1.0": "1.0", "1.1": "1.1", "1.2": "1.2"},
)
_args_schema.public_network_access = AAZStrArg(
options=["--public-network-access"],
arg_group="Properties",
help="Whether or not public network traffic can access the Redis cluster. Only 'Enabled' or 'Disabled' can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set.",
nullable=True,
enum={"Disabled": "Disabled", "Enabled": "Enabled"},
)

# define Arg Group "Sku"

Expand Down Expand Up @@ -255,7 +262,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2025-05-01-preview",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down Expand Up @@ -307,6 +314,7 @@ def content(self):
properties.set_prop("encryption", AAZObjectType)
properties.set_prop("highAvailability", AAZStrType, ".high_availability")
properties.set_prop("minimumTlsVersion", AAZStrType, ".minimum_tls_version")
properties.set_prop("publicNetworkAccess", AAZStrType, ".public_network_access", typ_kwargs={"flags": {"required": True}, "nullable": True})

encryption = _builder.get(".properties.encryption")
if encryption is not None:
Expand Down Expand Up @@ -429,6 +437,11 @@ def _build_schema_on_200_201(cls):
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.public_network_access = AAZStrType(
serialized_name="publicNetworkAccess",
flags={"required": True},
nullable=True,
)
properties.redis_version = AAZStrType(
serialized_name="redisVersion",
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2025-05-01-preview",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}", "2025-05-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}", "2025-07-01"],
]
}

Expand Down Expand Up @@ -143,7 +143,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2025-05-01-preview",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2025-05-01-preview",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.cache/redisenterprise", "2025-05-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise", "2025-05-01-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.cache/redisenterprise", "2025-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise", "2025-07-01"],
]
}

Expand Down Expand Up @@ -109,7 +109,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2025-05-01-preview",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down Expand Up @@ -226,6 +226,11 @@ def _build_schema_on_200(cls):
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.public_network_access = AAZStrType(
serialized_name="publicNetworkAccess",
flags={"required": True},
nullable=True,
)
properties.redis_version = AAZStrType(
serialized_name="redisVersion",
flags={"read_only": True},
Expand Down Expand Up @@ -360,7 +365,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2025-05-01-preview",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down Expand Up @@ -477,6 +482,11 @@ def _build_schema_on_200(cls):
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.public_network_access = AAZStrType(
serialized_name="publicNetworkAccess",
flags={"required": True},
nullable=True,
)
properties.redis_version = AAZStrType(
serialized_name="redisVersion",
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ListSkusForScaling(AAZCommand):
"""

_aaz_info = {
"version": "2025-05-01-preview",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}/listskusforscaling", "2025-05-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}/listskusforscaling", "2025-07-01"],
]
}

Expand Down Expand Up @@ -123,7 +123,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2025-05-01-preview",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2025-05-01-preview",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}", "2025-05-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}", "2025-07-01"],
]
}

Expand Down Expand Up @@ -120,7 +120,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2025-05-01-preview",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down Expand Up @@ -227,6 +227,11 @@ def _build_schema_on_200(cls):
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.public_network_access = AAZStrType(
serialized_name="publicNetworkAccess",
flags={"required": True},
nullable=True,
)
properties.redis_version = AAZStrType(
serialized_name="redisVersion",
flags={"read_only": True},
Expand Down
Loading
Loading