Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,56 @@ def cli_remove_identity(cmd, resource_group_name, namespace_name, system_assigne
"user_assigned_identities": eventhubsnm['identity']['userAssignedIdentities']
})
return Update(cli_ctx=cmd.cli_ctx)(command_args=command_args)


def approve_private_endpoint_connection(cmd, resource_group_name, namespace_name,
private_endpoint_connection_name, description=None):

from azure.cli.command_modules.eventhubs.aaz.latest.eventhubs.namespace.private_endpoint_connection import Update
from azure.cli.command_modules.eventhubs.aaz.latest.eventhubs.namespace.private_endpoint_connection import Show

private_endpoint_connection = Show(cli_ctx=cmd.cli_ctx)(command_args={
"resource_group": resource_group_name,
"namespace_name": namespace_name,
"private_endpoint_connection_name": private_endpoint_connection_name
})
if private_endpoint_connection["privateLinkServiceConnectionState"]["status"] != "Approved":
command_args_dict = {
"resource_group": resource_group_name,
"namespace_name": namespace_name,
"private_endpoint_connection_name": private_endpoint_connection_name,
"description": description,
"status": "Approved"
}
return Update(cli_ctx=cmd.cli_ctx)(command_args=command_args_dict)

return Show(cli_ctx=cmd.cli_ctx)(command_args={
"resource_group": resource_group_name,
"namespace_name": namespace_name,
"private_endpoint_connection_name": private_endpoint_connection_name,
})


def reject_private_endpoint_connection(cmd, resource_group_name, namespace_name, private_endpoint_connection_name,
description=None):
from azure.cli.command_modules.eventhubs.aaz.latest.eventhubs.namespace.private_endpoint_connection import Update
command_args_dict = {
"resource_group": resource_group_name,
"namespace_name": namespace_name,
"private_endpoint_connection_name": private_endpoint_connection_name,
"description": description,
"status": "Rejected"
}
return Update(cli_ctx=cmd.cli_ctx)(command_args=command_args_dict)


def delete_private_endpoint_connection(cmd, resource_group_name, namespace_name, private_endpoint_connection_name,
description=None):
from azure.cli.command_modules.eventhubs.aaz.latest.eventhubs.namespace.private_endpoint_connection import Delete
command_args_dict = {
"resource_group": resource_group_name,
"namespace_name": namespace_name,
"private_endpoint_connection_name": private_endpoint_connection_name,
"description": description
}
return Delete(cli_ctx=cmd.cli_ctx)(command_args=command_args_dict)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"eventhubs",
)
class __CMDGroup(AAZCommandGroup):
"""sss
"""eventhubs
"""
pass

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"eventhubs namespace private-endpoint-connection",
)
class __CMDGroup(AAZCommandGroup):
"""Manage eventhubs namespace private endpoint connection.
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._create import *
from ._delete import *
from ._list import *
from ._show import *
from ._update import *
from ._wait import *
Loading