Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def load_arguments_eh(self, _):
help='This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile\' access rules.')
c.argument('alternate_name', help='Alternate name specified when alias and namespace names are same.')
c.argument('max_replication_lag_duration_in_seconds', type=int, options_list=['--max-replication-lag-duration-in-seconds', '--max-lag'], help='The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas')

c.argument('ip_address_type', help='The IP address type for the namespace. Determines whether the namespace supports IPv4 only or both IPv4 and IPv6 (dualstack). Allowed values: DualStack, IPv4.')
with self.argument_context('eventhubs namespace create') as c:
c.argument('cluster_arm_id', options_list=['--cluster-arm-id'], help='Cluster ARM ID of the Namespace')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"eventhubs",
)
class __CMDGroup(AAZCommandGroup):
"""eventhubs
"""Manage Event Hub
"""
pass


__all__ = ["__CMDGroup"]
__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class AvailableRegion(AAZCommand):
"""

_aaz_info = {
"version": "2023-01-01-preview",
"version": "2026-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/availableclusterregions", "2023-01-01-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/availableclusterregions", "2026-01-01"],
]
}

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

_aaz_info = {
"version": "2023-01-01-preview",
"version": "2026-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2023-01-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-01-01"],
]
}

Expand Down Expand Up @@ -61,7 +61,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
_args_schema.location = AAZResourceLocationArg(
arg_group="Parameters",
help="Resource location.",
required=True,
fmt=AAZResourceLocationArgFormat(
resource_group_arg="resource_group",
),
Expand All @@ -78,16 +77,32 @@ def _build_arguments_schema(cls, *args, **kwargs):
# define Arg Group "Properties"

_args_schema = cls._args_schema
_args_schema.provisioning_state = AAZStrArg(
options=["--provisioning-state"],
_args_schema.platform_capabilities = AAZObjectArg(
options=["--platform-capabilities"],
arg_group="Properties",
help="Provisioning state of the Cluster.",
)
_args_schema.supports_scaling = AAZBoolArg(
options=["--supports-scaling"],
arg_group="Properties",
help="A value that indicates whether Scaling is Supported.",
)
_args_schema.zone_redundant = AAZBoolArg(
options=["--zone-redundant"],
arg_group="Properties",
help="A value that indicates whether the cluster is zone redundant.",
)

platform_capabilities = cls._args_schema.platform_capabilities
platform_capabilities.confidential_compute = AAZObjectArg(
options=["confidential-compute"],
)

confidential_compute = cls._args_schema.platform_capabilities.confidential_compute
confidential_compute.mode = AAZStrArg(
options=["mode"],
help="Setting to Enable or Disable Confidential Compute",
enum={"Disabled": "Disabled", "Enabled": "Enabled"},
)

# define Arg Group "Sku"

Expand Down Expand Up @@ -139,7 +154,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
Expand All @@ -148,7 +163,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)

Expand Down Expand Up @@ -191,7 +206,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-01-01-preview",
"api-version", "2026-01-01",
required=True,
),
}
Expand All @@ -216,15 +231,24 @@ def content(self):
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("sku", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")

properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("provisioningState", AAZStrType, ".provisioning_state")
properties.set_prop("platformCapabilities", AAZObjectType, ".platform_capabilities")
properties.set_prop("supportsScaling", AAZBoolType, ".supports_scaling")
properties.set_prop("zoneRedundant", AAZBoolType, ".zone_redundant")

platform_capabilities = _builder.get(".properties.platformCapabilities")
if platform_capabilities is not None:
platform_capabilities.set_prop("confidentialCompute", AAZObjectType, ".confidential_compute")

confidential_compute = _builder.get(".properties.platformCapabilities.confidentialCompute")
if confidential_compute is not None:
confidential_compute.set_prop("mode", AAZStrType, ".mode")

sku = _builder.get(".sku")
if sku is not None:
Expand Down Expand Up @@ -284,8 +308,12 @@ def _build_schema_on_200_201(cls):
serialized_name="metricId",
flags={"read_only": True},
)
properties.platform_capabilities = AAZObjectType(
serialized_name="platformCapabilities",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.status = AAZStrType(
flags={"read_only": True},
Expand All @@ -297,6 +325,17 @@ def _build_schema_on_200_201(cls):
serialized_name="updatedAt",
flags={"read_only": True},
)
properties.zone_redundant = AAZBoolType(
serialized_name="zoneRedundant",
)

platform_capabilities = cls._schema_on_200_201.properties.platform_capabilities
platform_capabilities.confidential_compute = AAZObjectType(
serialized_name="confidentialCompute",
)

confidential_compute = cls._schema_on_200_201.properties.platform_capabilities.confidential_compute
confidential_compute.mode = AAZStrType()

sku = cls._schema_on_200_201.sku
sku.capacity = AAZIntType()
Expand Down Expand Up @@ -334,4 +373,4 @@ class _CreateHelper:
"""Helper class for Create"""


__all__ = ["Create"]
__all__ = ["Create"]
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2023-01-01-preview",
"version": "2026-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2023-01-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-01-01"],
]
}

Expand Down Expand Up @@ -83,7 +83,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
Expand All @@ -92,7 +92,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
Expand All @@ -101,7 +101,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)

Expand Down Expand Up @@ -144,7 +144,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-01-01-preview",
"api-version", "2026-01-01",
required=True,
),
}
Expand Down
Loading
Loading