Skip to content

2025-05-01-preview api changes #8710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/redisenterprise/azext_redisenterprise/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def load_arguments(self, _):
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('clustering_policy', arg_type=get_enum_type(['EnterpriseCluster', 'OSSCluster']), help='Clustering policy - default '
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',
'VolatileLRU', 'VolatileLFU', 'VolatileTTL',
Expand Down Expand Up @@ -162,7 +162,7 @@ def load_arguments(self, _):
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('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']), help='Clustering '
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',
'VolatileLRU', 'VolatileLFU', 'VolatileTTL',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ._create import *
from ._delete import *
from ._list import *
from ._list_skus_for_scaling import *
from ._show import *
from ._update import *
from ._wait import *
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class Create(AAZCommand):
"""

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

Expand All @@ -47,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="The name of the RedisEnterprise cluster.",
required=True,
fmt=AAZStrArgFormat(
pattern="^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$",
pattern="^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$",
),
)
_args_schema.resource_group = AAZResourceGroupNameArg(
Expand All @@ -66,18 +66,33 @@ def _build_arguments_schema(cls, *args, **kwargs):
# define Arg Group "Identity"

_args_schema = cls._args_schema
_args_schema.mi_system_assigned = AAZStrArg(
options=["--system-assigned", "--mi-system-assigned"],
arg_group="Identity",
help="Set the system managed identity.",
blank="True",
)
_args_schema.identity_type = AAZStrArg(
options=["--identity-type"],
arg_group="Identity",
help="Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).",
enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned, UserAssigned": "SystemAssigned, UserAssigned", "UserAssigned": "UserAssigned"},
)
_args_schema.mi_user_assigned = AAZListArg(
options=["--user-assigned", "--mi-user-assigned"],
arg_group="Identity",
help="Set the user managed identities.",
blank=[],
)
_args_schema.user_assigned_identities = AAZDictArg(
options=["--assigned-identities", "--user-assigned-identities"],
arg_group="Identity",
help="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.",
)

mi_user_assigned = cls._args_schema.mi_user_assigned
mi_user_assigned.Element = AAZStrArg()

user_assigned_identities = cls._args_schema.user_assigned_identities
user_assigned_identities.Element = AAZObjectArg(
blank={},
Expand All @@ -95,7 +110,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
_args_schema.user_assigned_identity_resource_id = AAZStrArg(
options=["--identity-resource-id", "--user-assigned-identity-resource-id"],
arg_group="KeyEncryptionKeyIdentity",
help="User assigned identity to use for accessing key encryption key Url. Ex: `/subscriptions/<sub uuid>/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId`.",
help="User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/<sub uuid>/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId.",
)

# define Arg Group "Parameters"
Expand Down Expand Up @@ -133,7 +148,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["--high-availability"],
arg_group="Properties",
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.",
is_preview=True,
enum={"Disabled": "Disabled", "Enabled": "Enabled"},
)
_args_schema.minimum_tls_version = AAZStrArg(
Expand Down Expand Up @@ -241,7 +255,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
"api-version", "2025-05-01-preview",
required=True,
),
}
Expand All @@ -266,7 +280,7 @@ def content(self):
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("identity", AAZObjectType)
_builder.set_prop("identity", AAZIdentityObjectType)
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("sku", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
Expand All @@ -277,11 +291,17 @@ def content(self):
if identity is not None:
identity.set_prop("type", AAZStrType, ".identity_type", typ_kwargs={"flags": {"required": True}})
identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities")
identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={"flags": {"action": "create"}})
identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={"flags": {"action": "create"}})

user_assigned_identities = _builder.get(".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(AAZObjectType, ".")

user_assigned = _builder.get(".identity.userAssigned")
if user_assigned is not None:
user_assigned.set_elements(AAZStrType, ".")

properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("encryption", AAZObjectType)
Expand Down Expand Up @@ -338,7 +358,10 @@ def _build_schema_on_200_201(cls):
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.identity = AAZObjectType()
_schema_on_200_201.identity = AAZIdentityObjectType()
_schema_on_200_201.kind = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.location = AAZStrType(
flags={"required": 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": "2024-09-01-preview",
"version": "2025-05-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}", "2024-09-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cache/redisenterprise/{}", "2025-05-01-preview"],
]
}

Expand All @@ -49,7 +49,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
required=True,
id_part="name",
fmt=AAZStrArgFormat(
pattern="^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$",
pattern="^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$",
),
)
_args_schema.resource_group = AAZResourceGroupNameArg(
Expand Down Expand Up @@ -143,7 +143,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
"api-version", "2025-05-01-preview",
required=True,
),
}
Expand Down
Loading
Loading