diff --git a/src/powerbiprivatelinks/HISTORY.rst b/src/powerbiprivatelinks/HISTORY.rst
new file mode 100644
index 00000000000..1c139576ba0
--- /dev/null
+++ b/src/powerbiprivatelinks/HISTORY.rst
@@ -0,0 +1,8 @@
+.. :changelog:
+
+Release History
+===============
+
+0.1.0
+++++++
+* Initial release.
diff --git a/src/powerbiprivatelinks/README.md b/src/powerbiprivatelinks/README.md
new file mode 100644
index 00000000000..fa9eec35dfc
--- /dev/null
+++ b/src/powerbiprivatelinks/README.md
@@ -0,0 +1,54 @@
+# Azure CLI powerbiprivatelinks Extension #
+This is the extension for powerbiprivatelinks
+
+### How to use ###
+Install this extension using the below CLI command
+```
+az extension add --name powerbiprivatelinks
+```
+
+### Included Features ###
+#### powerbiprivatelinks private-link-service-for-power-bi ####
+##### Create #####
+```
+az powerbiprivatelinks private-link-service-for-power-bi create \
+ --connection-details group-id="tenant" id="10001" link-identifier="1253" member-name="tenant" private-ip-address="10.0.1.4" \
+ --remote-private-endpoint-id "/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName" \
+ --private-link-service-connections name="myPrivateEndpointConnection" group-ids="tenant" request-message="opt msg" \
+ --private-link-service-proxies "[{\\"groupConnectivityInformation\\":[{\\"customerVisibleFqdns\\":[\\"91cb8a3f79e644bea2dedce59f8c0107-api.analysis.windows.net\\"],\\"groupId\\":\\"tenant\\",\\"internalFqdn\\":\\"91cb8a3f79e644bea2dedce59f8c0107-api.analysis.windows.net\\",\\"memberName\\":\\"tenant\\",\\"privateLinkServiceArmRegion\\":\\"\\"}],\\"id\\":\\"/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName/privateLinkServiceProxies/azureResourceName-proxy.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\",\\"remotePrivateEndpointConnection\\":{\\"id\\":\\"/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/azureResourceName/privateEndpointConnections/myPrivateEndpointName.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\"},\\"remotePrivateLinkServiceConnectionState\\":{\\"description\\":\\"please approve\\",\\"actionsRequired\\":\\"None\\",\\"status\\":\\"Pending\\"}}]"
+```
+##### List #####
+```
+az powerbiprivatelinks private-link-service-for-power-bi list
+```
+##### List-available-operation #####
+```
+az powerbiprivatelinks private-link-service-for-power-bi list-available-operation
+```
+##### List-private-link-resource #####
+```
+az powerbiprivatelinks private-link-service-for-power-bi list-private-link-resource
+```
+##### Show-private-endpoint-connection #####
+```
+az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection
+```
+##### Show-private-endpoint-connection-proxy #####
+```
+az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection-proxy
+```
+##### Show-private-link-service-resource-operation-result #####
+```
+az powerbiprivatelinks private-link-service-for-power-bi show-private-link-service-resource-operation-result
+```
+##### Validate-private-endpoint-connection-proxy #####
+```
+az powerbiprivatelinks private-link-service-for-power-bi validate-private-endpoint-connection-proxy \
+ --remote-private-endpoint-id "/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName" \
+ --private-link-service-connections name="myPrivateEndpointConnection" group-ids="tenant" request-message="opt msg" \
+ --private-link-service-proxies "[{\\"groupConnectivityInformation\\":[],\\"id\\":\\"/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName/privateLinkServiceProxies/azureResourceName-proxy.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\"}]"
+```
+##### Delete #####
+```
+az powerbiprivatelinks private-link-service-for-power-bi delete
+```
\ No newline at end of file
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/__init__.py
new file mode 100644
index 00000000000..9da9ff5ab26
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/__init__.py
@@ -0,0 +1,50 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from azure.cli.core import AzCommandsLoader
+from azext_powerbiprivatelinks.generated._help import helps # pylint: disable=unused-import
+try:
+ from azext_powerbiprivatelinks.manual._help import helps # pylint: disable=reimported
+except ImportError:
+ pass
+
+
+class PowerBIPrivateLinkServiceManagementClientCommandsLoader(AzCommandsLoader):
+
+ def __init__(self, cli_ctx=None):
+ from azure.cli.core.commands import CliCommandType
+ from azext_powerbiprivatelinks.generated._client_factory import cf_powerbiprivatelinks_cl
+ powerbiprivatelinks_custom = CliCommandType(
+ operations_tmpl='azext_powerbiprivatelinks.custom#{}',
+ client_factory=cf_powerbiprivatelinks_cl)
+ parent = super(PowerBIPrivateLinkServiceManagementClientCommandsLoader, self)
+ parent.__init__(cli_ctx=cli_ctx, custom_command_type=powerbiprivatelinks_custom)
+
+ def load_command_table(self, args):
+ from azext_powerbiprivatelinks.generated.commands import load_command_table
+ load_command_table(self, args)
+ try:
+ from azext_powerbiprivatelinks.manual.commands import load_command_table as load_command_table_manual
+ load_command_table_manual(self, args)
+ except ImportError:
+ pass
+ return self.command_table
+
+ def load_arguments(self, command):
+ from azext_powerbiprivatelinks.generated._params import load_arguments
+ load_arguments(self, command)
+ try:
+ from azext_powerbiprivatelinks.manual._params import load_arguments as load_arguments_manual
+ load_arguments_manual(self, command)
+ except ImportError:
+ pass
+
+
+COMMAND_LOADER_CLS = PowerBIPrivateLinkServiceManagementClientCommandsLoader
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/action.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/action.py
new file mode 100644
index 00000000000..d95d53bf711
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/action.py
@@ -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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+# pylint: disable=wildcard-import
+# pylint: disable=unused-wildcard-import
+
+from .generated.action import * # noqa: F403
+try:
+ from .manual.action import * # noqa: F403
+except ImportError:
+ pass
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/azext_metadata.json b/src/powerbiprivatelinks/azext_powerbiprivatelinks/azext_metadata.json
new file mode 100644
index 00000000000..cfc30c747c7
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/azext_metadata.json
@@ -0,0 +1,4 @@
+{
+ "azext.isExperimental": true,
+ "azext.minCliCoreVersion": "2.15.0"
+}
\ No newline at end of file
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/custom.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/custom.py
new file mode 100644
index 00000000000..dbe9d5f9742
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/custom.py
@@ -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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+# pylint: disable=wildcard-import
+# pylint: disable=unused-wildcard-import
+
+from .generated.custom import * # noqa: F403
+try:
+ from .manual.custom import * # noqa: F403
+except ImportError:
+ pass
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/__init__.py
new file mode 100644
index 00000000000..c9cfdc73e77
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/__init__.py
@@ -0,0 +1,12 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_client_factory.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_client_factory.py
new file mode 100644
index 00000000000..d2c2b35ab4e
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_client_factory.py
@@ -0,0 +1,20 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+
+def cf_powerbiprivatelinks_cl(cli_ctx, *_):
+ from azure.cli.core.commands.client_factory import get_mgmt_service_client
+ from azext_powerbiprivatelinks.vendored_sdks.powerbiprivatelinks import PowerBIPrivateLinkServiceManagementClient
+ return get_mgmt_service_client(cli_ctx,
+ PowerBIPrivateLinkServiceManagementClient)
+
+
+def cf_private_link_service_for_power_bi(cli_ctx, *_):
+ return cf_powerbiprivatelinks_cl(cli_ctx).private_link_services_for_power_bi
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_help.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_help.py
new file mode 100644
index 00000000000..6ad9d426c29
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_help.py
@@ -0,0 +1,221 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+# pylint: disable=too-many-lines
+
+from knack.help_files import helps
+
+
+helps['powerbiprivatelinks private-link-service-for-power-bi'] = """
+ type: group
+ short-summary: Manage private link service for power bi with powerbiprivatelinks
+"""
+
+helps['powerbiprivatelinks private-link-service-for-power-bi list'] = """
+ type: command
+ short-summary: "Gets all the private link resources for the given Azure resource. And Gets all the private link \
+resources for the given resource group. And Gets all the private link resources for the given subscription id."
+ examples:
+ - name: List private link resources in a Azure resource
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi list
+ - name: List private link resources in a resource group
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi list
+ - name: List private link resources in a subscription
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi list
+"""
+
+helps['powerbiprivatelinks private-link-service-for-power-bi create'] = """
+ type: command
+ short-summary: "Creates or updates private endpoint connection proxy for Power BI by private endpoint name. And \
+Updates the status of Private Endpoint Connection object. Used to approve or reject a connection. And Creates or \
+updates a Private Link Service Resource for Power BI."
+ parameters:
+ - name: --manual-private-link-service-connections
+ short-summary: "Specifies the private link service connections of the private endpoint."
+ long-summary: |
+ Usage: --manual-private-link-service-connections name=XX group-ids=XX request-message=XX
+
+ name: Specifies the name of the private link service connection.
+ group-ids: Specifies the group ids of the private link service connection.
+ request-message: Specifies the request message of the private link service connection.
+
+ Multiple actions can be specified by using more than one --manual-private-link-service-connections \
+argument.
+ - name: --private-link-service-connections
+ short-summary: "Specifies the private link service connections of the private endpoint."
+ long-summary: |
+ Usage: --private-link-service-connections name=XX group-ids=XX request-message=XX
+
+ name: Specifies the name of the private link service connection.
+ group-ids: Specifies the group ids of the private link service connection.
+ request-message: Specifies the request message of the private link service connection.
+
+ Multiple actions can be specified by using more than one --private-link-service-connections argument.
+ - name: --connection-details
+ short-summary: "Specifies the connection details of the private endpoint."
+ long-summary: |
+ Usage: --connection-details id=XX member-name=XX private-ip-address=XX link-identifier=XX group-id=XX
+
+ id: Specifies the type of the connection detail.
+ member-name: Specifies the member name of the connection detail.
+ private-ip-address: Specifies the private ip address of the connection detail.
+ link-identifier: Specifies the link id of the connection detail.
+ group-id: Specifies the group id of the connection detail.
+
+ Multiple actions can be specified by using more than one --connection-details argument.
+ - name: --private-link-service-connection-state
+ short-summary: "Specifies the connection state."
+ long-summary: |
+ Usage: --private-link-service-connection-state status=XX description=XX actions-required=XX
+
+ status: Specifies the connection status.
+ description: Specifies the connection status description.
+ actions-required: Specifies the actions required.
+ examples:
+ - name: Creates or updates private endpoint connection proxy
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi create --connection-details group-id="tenant" \
+id="10001" link-identifier="1253" member-name="tenant" private-ip-address="10.0.1.4" --remote-private-endpoint-id \
+"/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.Network/privateEn\
+dpoints/myPrivateEndpointName" --private-link-service-connections name="myPrivateEndpointConnection" \
+group-ids="tenant" request-message="opt msg" --private-link-service-proxies "[{\\"groupConnectivityInformation\\":[{\\"\
+customerVisibleFqdns\\":[\\"91cb8a3f79e644bea2dedce59f8c0107-api.analysis.windows.net\\"],\\"groupId\\":\\"tenant\\",\\\
+"internalFqdn\\":\\"91cb8a3f79e644bea2dedce59f8c0107-api.analysis.windows.net\\",\\"memberName\\":\\"tenant\\",\\"priva\
+teLinkServiceArmRegion\\":\\"\\"}],\\"id\\":\\"/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resou\
+rceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName/privateLinkServiceProxies/azureResourceName\
+-proxy.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\",\\"remotePrivateEndpointConnection\\":{\\"id\\":\\"/subscriptions/a00208\
+69-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/a\
+zureResourceName/privateEndpointConnections/myPrivateEndpointName.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\"},\\"remotePri\
+vateLinkServiceConnectionState\\":{\\"description\\":\\"please approve\\",\\"actionsRequired\\":\\"None\\",\\"status\\"\
+:\\"Pending\\"}}]"
+ - name: Updates status of private endpoint connection
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi create --id "/subscriptions/a0020869-4d28-422a-\
+89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName" \
+--private-link-service-connection-state description="" actions-required="None" status="Approved "
+ - name: Creates or updates private link service resource
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi create --location "global" --tenant-id \
+"ac2bc297-8a3e-46f3-972d-87c2b4ae6e2f" --tags tag1="value1" tag2="value2"
+"""
+
+helps['powerbiprivatelinks private-link-service-for-power-bi delete'] = """
+ type: command
+ short-summary: "Deletes a private endpoint connection proxy for Power BI by private endpoint name. And Deletes a \
+private endpoint connection for Power BI by private endpoint name. And Deletes a Private Link Service Resource for \
+Power BI."
+ examples:
+ - name: Deletes a private endpoint connection proxy
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi delete
+ - name: Deletes private endpoint connection
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi delete
+ - name: Deletes private link service resource
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi delete
+"""
+
+helps['powerbiprivatelinks private-link-service-for-power-bi list-available-operation'] = """
+ type: command
+ short-summary: "Indicates which operations can be performed by the Power BI Resource Provider."
+ examples:
+ - name: List private link resources in a subscription
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi list-available-operation
+"""
+
+helps['powerbiprivatelinks private-link-service-for-power-bi list-private-link-resource'] = """
+ type: command
+ short-summary: "Gets Private Link Resources for Power BI by resource group and resource name."
+ examples:
+ - name: Gets private link resources in a Azure resource
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi list-private-link-resource
+"""
+
+helps['powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection'] = """
+ type: command
+ short-summary: "Gets private endpoint connection for Power BI by private endpoint name."
+ examples:
+ - name: Gets private endpoint connection
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection
+"""
+
+helps['powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection-proxy'] = """
+ type: command
+ short-summary: "Gets private endpoint connection proxy for Power BI by private endpoint name."
+ examples:
+ - name: Gets private endpoint connection proxy
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection-proxy
+"""
+
+helps['powerbiprivatelinks private-link-service-for-power-bi show-private-link-service-resource-operation-result'] = """
+ type: command
+ short-summary: "Gets operation result of Private Link Service Resources for Power BI."
+ examples:
+ - name: Result of operation on private link resources
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi show-private-link-service-resource-operation-re\
+sult
+"""
+
+helps['powerbiprivatelinks private-link-service-for-power-bi validate-private-endpoint-connection-proxy'] = """
+ type: command
+ short-summary: "Validates a private endpoint connection before create or update."
+ parameters:
+ - name: --manual-private-link-service-connections
+ short-summary: "Specifies the private link service connections of the private endpoint."
+ long-summary: |
+ Usage: --manual-private-link-service-connections name=XX group-ids=XX request-message=XX
+
+ name: Specifies the name of the private link service connection.
+ group-ids: Specifies the group ids of the private link service connection.
+ request-message: Specifies the request message of the private link service connection.
+
+ Multiple actions can be specified by using more than one --manual-private-link-service-connections \
+argument.
+ - name: --private-link-service-connections
+ short-summary: "Specifies the private link service connections of the private endpoint."
+ long-summary: |
+ Usage: --private-link-service-connections name=XX group-ids=XX request-message=XX
+
+ name: Specifies the name of the private link service connection.
+ group-ids: Specifies the group ids of the private link service connection.
+ request-message: Specifies the request message of the private link service connection.
+
+ Multiple actions can be specified by using more than one --private-link-service-connections argument.
+ - name: --connection-details
+ short-summary: "Specifies the connection details of the private endpoint."
+ long-summary: |
+ Usage: --connection-details id=XX member-name=XX private-ip-address=XX link-identifier=XX group-id=XX
+
+ id: Specifies the type of the connection detail.
+ member-name: Specifies the member name of the connection detail.
+ private-ip-address: Specifies the private ip address of the connection detail.
+ link-identifier: Specifies the link id of the connection detail.
+ group-id: Specifies the group id of the connection detail.
+
+ Multiple actions can be specified by using more than one --connection-details argument.
+ examples:
+ - name: Validates a private endpoint connection
+ text: |-
+ az powerbiprivatelinks private-link-service-for-power-bi validate-private-endpoint-connection-proxy \
+--remote-private-endpoint-id "/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/provider\
+s/Microsoft.Network/privateEndpoints/myPrivateEndpointName" --private-link-service-connections \
+name="myPrivateEndpointConnection" group-ids="tenant" request-message="opt msg" --private-link-service-proxies \
+"[{\\"groupConnectivityInformation\\":[],\\"id\\":\\"/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups\
+/resourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName/privateLinkServiceProxies/azureResour\
+ceName-proxy.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\"}]"
+"""
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_params.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_params.py
new file mode 100644
index 00000000000..e8928657285
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_params.py
@@ -0,0 +1,75 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+# pylint: disable=line-too-long
+# pylint: disable=too-many-lines
+# pylint: disable=too-many-statements
+
+from azure.cli.core.commands.parameters import (
+ tags_type,
+ get_location_type
+)
+from azure.cli.core.commands.validators import validate_file_or_dict
+from azext_powerbiprivatelinks.action import (
+ AddManualPrivateLinkServiceConnections,
+ AddPrivateLinkServiceConnections,
+ AddConnectionDetails,
+ AddPrivateLinkServiceConnectionState
+)
+
+
+def load_arguments(self, _):
+
+ with self.argument_context('powerbiprivatelinks private-link-service-for-power-bi create') as c:
+ c.argument('client_tenant_id', type=str, help='The client tenant id in header. This is a GUID-formatted string '
+ '(e.g. 00000000-0000-0000-0000-000000000000).')
+ c.argument('id_', options_list=['--id'], type=str, help='Specifies the id of the resource.')
+ c.argument('name', type=str, help='Specifies the name of the resource.')
+ c.argument('type_', options_list=['--type'], type=str, help='Specifies the type of the resource.')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx))
+ c.argument('etag', type=str, help='Specifies the etag of the resource.')
+ c.argument('remote_private_endpoint_id', type=str, help='Specifies the id of the private endpoint.',
+ arg_group='Remote Private Endpoint')
+ c.argument('manual_private_link_service_connections', action=AddManualPrivateLinkServiceConnections, nargs='+',
+ help='Specifies the private link service connections of the private endpoint.', arg_group='Remote '
+ 'Private Endpoint')
+ c.argument('private_link_service_connections', action=AddPrivateLinkServiceConnections, nargs='+',
+ help='Specifies the private link service connections of the private endpoint.', arg_group='Remote '
+ 'Private Endpoint')
+ c.argument('private_link_service_proxies', type=validate_file_or_dict, help='Specifies the private link '
+ 'service proxies of the private endpoint. Expected value: json-string/@json-file.',
+ arg_group='Remote Private Endpoint')
+ c.argument('connection_details', action=AddConnectionDetails, nargs='+', help='Specifies the connection '
+ 'details of the private endpoint.', arg_group='Remote Private Endpoint')
+ c.argument('private_link_service_connection_state', action=AddPrivateLinkServiceConnectionState, nargs='+',
+ help='Specifies the connection state.')
+ c.argument('tags', tags_type)
+ c.argument('tenant_id', type=str, help='Specifies the tenant id of the resource.')
+ c.argument('private_endpoint_connections', type=validate_file_or_dict, help='Specifies the private endpoint '
+ 'connections of the resource. Expected value: json-string/@json-file.')
+
+ with self.argument_context('powerbiprivatelinks private-link-service-for-power-bi validate-private-endpoint-connection-proxy') as c:
+ c.argument('id_', options_list=['--id'], type=str, help='Specifies the id of the resource.')
+ c.argument('name', type=str, help='Specifies the name of the resource.')
+ c.argument('type_', options_list=['--type'], type=str, help='Specifies the type of the resource.')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx))
+ c.argument('etag', type=str, help='Specifies the etag of the resource.')
+ c.argument('remote_private_endpoint_id', type=str, help='Specifies the id of the private endpoint.',
+ arg_group='Remote Private Endpoint')
+ c.argument('manual_private_link_service_connections', action=AddManualPrivateLinkServiceConnections, nargs='+',
+ help='Specifies the private link service connections of the private endpoint.', arg_group='Remote '
+ 'Private Endpoint')
+ c.argument('private_link_service_connections', action=AddPrivateLinkServiceConnections, nargs='+',
+ help='Specifies the private link service connections of the private endpoint.', arg_group='Remote '
+ 'Private Endpoint')
+ c.argument('private_link_service_proxies', type=validate_file_or_dict, help='Specifies the private link '
+ 'service proxies of the private endpoint. Expected value: json-string/@json-file.',
+ arg_group='Remote Private Endpoint')
+ c.argument('connection_details', action=AddConnectionDetails, nargs='+', help='Specifies the connection '
+ 'details of the private endpoint.', arg_group='Remote Private Endpoint')
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_validators.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_validators.py
new file mode 100644
index 00000000000..b33a44c1ebf
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/_validators.py
@@ -0,0 +1,9 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/action.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/action.py
new file mode 100644
index 00000000000..e2e97a5b638
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/action.py
@@ -0,0 +1,134 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+# pylint: disable=protected-access
+
+import argparse
+from collections import defaultdict
+from knack.util import CLIError
+
+
+class AddManualPrivateLinkServiceConnections(argparse._AppendAction):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ super(AddManualPrivateLinkServiceConnections, self).__call__(parser, namespace, action, option_string)
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'name':
+ d['name'] = v[0]
+ elif kl == 'group-ids':
+ d['group_ids'] = v
+ elif kl == 'request-message':
+ d['request_message'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter manual_private_link_service_connections. '
+ 'All possible keys are: name, group-ids, request-message'.format(k))
+ return d
+
+
+class AddPrivateLinkServiceConnections(argparse._AppendAction):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ super(AddPrivateLinkServiceConnections, self).__call__(parser, namespace, action, option_string)
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'name':
+ d['name'] = v[0]
+ elif kl == 'group-ids':
+ d['group_ids'] = v
+ elif kl == 'request-message':
+ d['request_message'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter private_link_service_connections. All '
+ 'possible keys are: name, group-ids, request-message'.format(k))
+ return d
+
+
+class AddConnectionDetails(argparse._AppendAction):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ super(AddConnectionDetails, self).__call__(parser, namespace, action, option_string)
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'id':
+ d['id'] = v[0]
+ elif kl == 'member-name':
+ d['member_name'] = v[0]
+ elif kl == 'private-ip-address':
+ d['private_ip_address'] = v[0]
+ elif kl == 'link-identifier':
+ d['link_identifier'] = v[0]
+ elif kl == 'group-id':
+ d['group_id'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter connection_details. All possible keys '
+ 'are: id, member-name, private-ip-address, link-identifier, group-id'.format(k))
+ return d
+
+
+class AddPrivateLinkServiceConnectionState(argparse.Action):
+ def __call__(self, parser, namespace, values, option_string=None):
+ action = self.get_action(values, option_string)
+ namespace.private_link_service_connection_state = action
+
+ def get_action(self, values, option_string): # pylint: disable=no-self-use
+ try:
+ properties = defaultdict(list)
+ for (k, v) in (x.split('=', 1) for x in values):
+ properties[k].append(v)
+ properties = dict(properties)
+ except ValueError:
+ raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
+ d = {}
+ for k in properties:
+ kl = k.lower()
+ v = properties[k]
+ if kl == 'status':
+ d['status'] = v[0]
+ elif kl == 'description':
+ d['description'] = v[0]
+ elif kl == 'actions-required':
+ d['actions_required'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter private_link_service_connection_state. '
+ 'All possible keys are: status, description, actions-required'.format(k))
+ return d
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/commands.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/commands.py
new file mode 100644
index 00000000000..09661d607df
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/commands.py
@@ -0,0 +1,43 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+# pylint: disable=too-many-statements
+# pylint: disable=too-many-locals
+
+from azure.cli.core.commands import CliCommandType
+
+
+def load_command_table(self, _):
+
+ from azext_powerbiprivatelinks.generated._client_factory import cf_private_link_service_for_power_bi
+ powerbiprivatelinks_private_link_service_for_power_bi = CliCommandType(
+ operations_tmpl='azext_powerbiprivatelinks.vendored_sdks.powerbiprivatelinks.operations._private_link_services_'
+ 'for_power_bi_operations#PrivateLinkServicesForPowerBiOperations.{}',
+ client_factory=cf_private_link_service_for_power_bi)
+ with self.command_group('powerbiprivatelinks private-link-service-for-power-bi',
+ powerbiprivatelinks_private_link_service_for_power_bi,
+ client_factory=cf_private_link_service_for_power_bi) as g:
+ g.custom_command('list', 'powerbiprivatelinks_private_link_service_for_power_bi_list')
+ g.custom_command('create', 'powerbiprivatelinks_private_link_service_for_power_bi_create')
+ g.custom_command('delete', 'powerbiprivatelinks_private_link_service_for_power_bi_delete', confirmation=True)
+ g.custom_command('list-available-operation', 'powerbiprivatelinks_private_link_service_for_power_bi_list_availa'
+ 'ble_operation')
+ g.custom_command('list-private-link-resource', 'powerbiprivatelinks_private_link_service_for_power_bi_list_priv'
+ 'ate_link_resource')
+ g.custom_command('show-private-endpoint-connection', 'powerbiprivatelinks_private_link_service_for_power_bi_sho'
+ 'w_private_endpoint_connection')
+ g.custom_command('show-private-endpoint-connection-proxy', 'powerbiprivatelinks_private_link_service_for_power_'
+ 'bi_show_private_endpoint_connection_proxy')
+ g.custom_command('show-private-link-service-resource-operation-result', 'powerbiprivatelinks_private_link_servi'
+ 'ce_for_power_bi_show_private_link_service_resource_operation_result')
+ g.custom_command('validate-private-endpoint-connection-proxy', 'powerbiprivatelinks_private_link_service_for_po'
+ 'wer_bi_validate_private_endpoint_connection_proxy')
+
+ with self.command_group('powerbiprivatelinks', is_experimental=True):
+ pass
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/custom.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/custom.py
new file mode 100644
index 00000000000..426530ab255
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/generated/custom.py
@@ -0,0 +1,118 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+# pylint: disable=line-too-long
+# pylint: disable=too-many-lines
+
+
+def powerbiprivatelinks_private_link_service_for_power_bi_list(client):
+ if:
+ return client.list_by_resource_name()
+ elif:
+ return client.list_by_resource_group()
+ return client.list_by_subscription_id()
+
+
+def powerbiprivatelinks_private_link_service_for_power_bi_create(client,
+ client_tenant_id=None,
+ id_=None,
+ name=None,
+ type_=None,
+ location=None,
+ etag=None,
+ remote_private_endpoint_id=None,
+ manual_private_link_service_connections=None,
+ private_link_service_connections=None,
+ private_link_service_proxies=None,
+ connection_details=None,
+ private_link_service_connection_state=None,
+ tags=None,
+ tenant_id=None,
+ private_endpoint_connections=None):
+ body = {}
+ body['id'] = id_
+ body['name'] = name
+ body['type'] = type_
+ body['location'] = location
+ body['etag'] = etag
+ body['remote_private_endpoint'] = {}
+ body['remote_private_endpoint']['id'] = remote_private_endpoint_id
+ body['remote_private_endpoint']['manual_private_link_service_connections'] = manual_private_link_service_connections
+ body['remote_private_endpoint']['private_link_service_connections'] = private_link_service_connections
+ body['remote_private_endpoint']['private_link_service_proxies'] = private_link_service_proxies
+ body['remote_private_endpoint']['connection_details'] = connection_details
+ body = {}
+ body['private_link_service_connection_state'] = private_link_service_connection_state
+ body['private_endpoint'] = {}
+ body['private_endpoint']['id'] = id_
+ body = {}
+ body['location'] = location
+ body['tags'] = tags
+ body['tenant_id'] = tenant_id
+ body['private_endpoint_connections'] = private_endpoint_connections
+ if:
+ return client.begin_create_or_update_private_endpoint_connection_proxy(client_tenant_id=client_tenant_id,
+ body=body)
+ elif:
+ return client.create_or_update_private_endpoint_connection_status(body=body)
+ return client.create_or_update_private_link_service(client_tenant_id=client_tenant_id,
+ body=body)
+
+
+def powerbiprivatelinks_private_link_service_for_power_bi_delete(client):
+ return client.begin_delete_private_endpoint_connection_proxy()
+ elif:
+ return client.begin_delete_private_endpoint_connection()
+ return client.delete_private_link_service()
+
+
+def powerbiprivatelinks_private_link_service_for_power_bi_list_available_operation(client):
+ return client.list_available_operations()
+
+
+def powerbiprivatelinks_private_link_service_for_power_bi_list_private_link_resource(client):
+ return client.list_private_link_resources()
+
+
+def powerbiprivatelinks_private_link_service_for_power_bi_show_private_endpoint_connection(client):
+ return client.get_private_endpoint_connection()
+
+
+def powerbiprivatelinks_private_link_service_for_power_bi_show_private_endpoint_connection_proxy(client):
+ return client.get_private_endpoint_connection_proxy()
+
+
+def powerbiprivatelinks_private_link_service_for_power_bi_show_private_link_service_resource_operation_result(client):
+ return client.get_private_link_service_resource_operation_result()
+
+
+def powerbiprivatelinks_private_link_service_for_power_bi_validate_private_endpoint_connection_proxy(client,
+ id_=None,
+ name=None,
+ type_=None,
+ location=None,
+ etag=None,
+ remote_private_endpoint_id=None,
+ manual_private_link_service_connections=None,
+ private_link_service_connections=None,
+ private_link_service_proxies=None,
+ connection_details=None):
+ body = {}
+ body['id'] = id_
+ body['name'] = name
+ body['type'] = type_
+ body['location'] = location
+ body['etag'] = etag
+ body['remote_private_endpoint'] = {}
+ body['remote_private_endpoint']['id'] = remote_private_endpoint_id
+ body['remote_private_endpoint']['manual_private_link_service_connections'] = manual_private_link_service_connections
+ body['remote_private_endpoint']['private_link_service_connections'] = private_link_service_connections
+ body['remote_private_endpoint']['private_link_service_proxies'] = private_link_service_proxies
+ body['remote_private_endpoint']['connection_details'] = connection_details
+ return client.validate_private_endpoint_connection_proxy(body=body)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/manual/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/manual/__init__.py
new file mode 100644
index 00000000000..c9cfdc73e77
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/manual/__init__.py
@@ -0,0 +1,12 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/__init__.py
new file mode 100644
index 00000000000..70488e93851
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/__init__.py
@@ -0,0 +1,116 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+import inspect
+import logging
+import os
+import sys
+import traceback
+import datetime as dt
+
+from azure.core.exceptions import AzureError
+from azure.cli.testsdk.exceptions import CliTestError, CliExecutionError, JMESPathCheckAssertionError
+
+
+logger = logging.getLogger('azure.cli.testsdk')
+logger.addHandler(logging.StreamHandler())
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
+exceptions = []
+test_map = dict()
+SUCCESSED = "successed"
+FAILED = "failed"
+
+
+def try_manual(func):
+ def import_manual_function(origin_func):
+ from importlib import import_module
+ decorated_path = inspect.getfile(origin_func).lower()
+ module_path = __path__[0].lower()
+ if not decorated_path.startswith(module_path):
+ raise Exception("Decorator can only be used in submodules!")
+ manual_path = os.path.join(
+ decorated_path[module_path.rfind(os.path.sep) + 1:])
+ manual_file_path, manual_file_name = os.path.split(manual_path)
+ module_name, _ = os.path.splitext(manual_file_name)
+ manual_module = "..manual." + \
+ ".".join(manual_file_path.split(os.path.sep) + [module_name, ])
+ return getattr(import_module(manual_module, package=__name__), origin_func.__name__)
+
+ def get_func_to_call():
+ func_to_call = func
+ try:
+ func_to_call = import_manual_function(func)
+ logger.info("Found manual override for %s(...)", func.__name__)
+ except (ImportError, AttributeError):
+ pass
+ return func_to_call
+
+ def wrapper(*args, **kwargs):
+ func_to_call = get_func_to_call()
+ logger.info("running %s()...", func.__name__)
+ try:
+ test_map[func.__name__] = dict()
+ test_map[func.__name__]["result"] = SUCCESSED
+ test_map[func.__name__]["error_message"] = ""
+ test_map[func.__name__]["error_stack"] = ""
+ test_map[func.__name__]["error_normalized"] = ""
+ test_map[func.__name__]["start_dt"] = dt.datetime.utcnow()
+ ret = func_to_call(*args, **kwargs)
+ except (AssertionError, AzureError, CliTestError, CliExecutionError, SystemExit,
+ JMESPathCheckAssertionError) as e:
+ use_exception_cache = os.getenv("TEST_EXCEPTION_CACHE")
+ if use_exception_cache is None or use_exception_cache.lower() != "true":
+ raise
+ test_map[func.__name__]["end_dt"] = dt.datetime.utcnow()
+ test_map[func.__name__]["result"] = FAILED
+ test_map[func.__name__]["error_message"] = str(e).replace("\r\n", " ").replace("\n", " ")[:500]
+ test_map[func.__name__]["error_stack"] = traceback.format_exc().replace(
+ "\r\n", " ").replace("\n", " ")[:500]
+ logger.info("--------------------------------------")
+ logger.info("step exception: %s", e)
+ logger.error("--------------------------------------")
+ logger.error("step exception in %s: %s", func.__name__, e)
+ logger.info(traceback.format_exc())
+ exceptions.append((func.__name__, sys.exc_info()))
+ else:
+ test_map[func.__name__]["end_dt"] = dt.datetime.utcnow()
+ return ret
+
+ if inspect.isclass(func):
+ return get_func_to_call()
+ return wrapper
+
+
+def calc_coverage(filename):
+ filename = filename.split(".")[0]
+ coverage_name = filename + "_coverage.md"
+ with open(coverage_name, "w") as f:
+ f.write("|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt|\n")
+ total = len(test_map)
+ covered = 0
+ for k, v in test_map.items():
+ if not k.startswith("step_"):
+ total -= 1
+ continue
+ if v["result"] == SUCCESSED:
+ covered += 1
+ f.write("|{step_name}|{result}|{error_message}|{error_stack}|{error_normalized}|{start_dt}|"
+ "{end_dt}|\n".format(step_name=k, **v))
+ f.write("Coverage: {}/{}\n".format(covered, total))
+ print("Create coverage\n", file=sys.stderr)
+
+
+def raise_if():
+ if exceptions:
+ if len(exceptions) <= 1:
+ raise exceptions[0][1][1]
+ message = "{}\nFollowed with exceptions in other steps:\n".format(str(exceptions[0][1][1]))
+ message += "\n".join(["{}: {}".format(h[0], h[1][1]) for h in exceptions[1:]])
+ raise exceptions[0][1][0](message).with_traceback(exceptions[0][1][2])
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/latest/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/latest/__init__.py
new file mode 100644
index 00000000000..c9cfdc73e77
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/latest/__init__.py
@@ -0,0 +1,12 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/latest/example_steps.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/latest/example_steps.py
new file mode 100644
index 00000000000..c5504e6f28e
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/latest/example_steps.py
@@ -0,0 +1,157 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+
+from .. import try_manual
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/put/Creates or updates private endpoint connection proxy
+@try_manual
+def step_private_link_service_for_power_bi_create(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi create '
+ '--connection-details group-id="tenant" id="10001" link-identifier="1253" member-name="tenant" '
+ 'private-ip-address="10.0.1.4" '
+ '--remote-private-endpoint-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Ne'
+ 'twork/privateEndpoints/myPrivateEndpointName" '
+ '--private-link-service-connections name="myPrivateEndpointConnection" group-ids="tenant" '
+ 'request-message="opt msg" '
+ '--private-link-service-proxies "[{{\\"groupConnectivityInformation\\":[{{\\"customerVisibleFqdns\\":[\\"9'
+ '1cb8a3f79e644bea2dedce59f8c0107-api.analysis.windows.net\\"],\\"groupId\\":\\"tenant\\",\\"internalFqdn\\'
+ '":\\"91cb8a3f79e644bea2dedce59f8c0107-api.analysis.windows.net\\",\\"memberName\\":\\"tenant\\",\\"privat'
+ 'eLinkServiceArmRegion\\":\\"\\"}}],\\"id\\":\\"/subscriptions/{subscription_id}/resourceGroups/{rg}/provi'
+ 'ders/Microsoft.Network/privateEndpoints/myPrivateEndpointName/privateLinkServiceProxies/azureResourceName'
+ '-proxy.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\",\\"remotePrivateEndpointConnection\\":{{\\"id\\":\\"/subsc'
+ 'riptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/'
+ '{myPrivateLinkServicesForPowerBi}/privateEndpointConnections/myPrivateEndpointName.58ffb8de-89ad-41eb-9f8'
+ 'f-de0a7db9d721\\"}},\\"remotePrivateLinkServiceConnectionState\\":{{\\"description\\":\\"please '
+ 'approve\\",\\"actionsRequired\\":\\"None\\",\\"status\\":\\"Pending\\"}}}}]"',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/put/Creates or updates private link service resource
+@try_manual
+def step_private_link_service_for_power_bi_create2(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi create '
+ '--location "global" '
+ '--tenant-id "ac2bc297-8a3e-46f3-972d-87c2b4ae6e2f" '
+ '--tags tag1="value1" tag2="value2"',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/put/Updates status of private endpoint connection
+@try_manual
+def step_private_link_service_for_power_bi_create3(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi create '
+ '--id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Network/privateEndpoints/m'
+ 'yPrivateEndpointName" '
+ '--private-link-service-connection-state description="" actions-required="None" status="Approved "',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/get/Gets private endpoint connection
+@try_manual
+def step_private_link_service(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/get/Gets private endpoint connection proxy
+@try_manual
+def step_private_link_service2(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection-proxy',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/get/Gets private link resources in a Azure resource
+@try_manual
+def step_private_link_service3(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi list-private-link-resource',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/get/List private link resources in a Azure resource
+@try_manual
+def step_private_link_service_for_power_bi_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi list',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/get/List private link resources in a resource group
+@try_manual
+def step_private_link_service_for_power_bi_list2(test, rg, checks=None):
+ return step_private_link_service_for_power_bi_list(test, rg, checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/get/List private link resources in a subscription
+@try_manual
+def step_private_link_service_for_power_bi_list3(test, rg, checks=None):
+ return step_private_link_service_for_power_bi_list(test, rg, checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/get/Result of operation on private link resources
+@try_manual
+def step_private_link_service4(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi show-private-link-service-resource-operation-res'
+ 'ult',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/post/Validates a private endpoint connection
+@try_manual
+def step_private_link_service5(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi validate-private-endpoint-connection-proxy '
+ '--remote-private-endpoint-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Ne'
+ 'twork/privateEndpoints/myPrivateEndpointName" '
+ '--private-link-service-connections name="myPrivateEndpointConnection" group-ids="tenant" '
+ 'request-message="opt msg" '
+ '--private-link-service-proxies "[{{\\"groupConnectivityInformation\\":[],\\"id\\":\\"/subscriptions/{subs'
+ 'cription_id}/resourceGroups/{rg}/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName/priva'
+ 'teLinkServiceProxies/azureResourceName-proxy.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\"}}]"',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/delete/Deletes a private endpoint connection proxy
+@try_manual
+def step_private_link_service_for_power_bi_delete(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az powerbiprivatelinks private-link-service-for-power-bi delete -y',
+ checks=checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/delete/Deletes private endpoint connection
+@try_manual
+def step_private_link_service_for_power_bi_delete2(test, rg, checks=None):
+ return step_private_link_service_for_power_bi_delete(test, rg, checks)
+
+
+# EXAMPLE: /privateLinkServicesForPowerBI/delete/Deletes private link service resource
+@try_manual
+def step_private_link_service_for_power_bi_delete3(test, rg, checks=None):
+ return step_private_link_service_for_power_bi_delete(test, rg, checks)
+
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/latest/test_powerbiprivatelinks_scenario.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/latest/test_powerbiprivatelinks_scenario.py
new file mode 100644
index 00000000000..7c950bbf091
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/tests/latest/test_powerbiprivatelinks_scenario.py
@@ -0,0 +1,92 @@
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import os
+from azure.cli.testsdk import ScenarioTest
+from azure.cli.testsdk import ResourceGroupPreparer
+from .example_steps import step_private_link_service_for_power_bi_create
+from .example_steps import step_private_link_service_for_power_bi_create2
+from .example_steps import step_private_link_service_for_power_bi_create3
+from .example_steps import step_private_link_service
+from .example_steps import step_private_link_service2
+from .example_steps import step_private_link_service3
+from .example_steps import step_private_link_service_for_power_bi_list
+from .example_steps import step_private_link_service_for_power_bi_list2
+from .example_steps import step_private_link_service_for_power_bi_list3
+from .example_steps import step_private_link_service4
+from .example_steps import step_private_link_service5
+from .example_steps import step_private_link_service_for_power_bi_delete
+from .example_steps import step_private_link_service_for_power_bi_delete2
+from .example_steps import step_private_link_service_for_power_bi_delete3
+from .. import (
+ try_manual,
+ raise_if,
+ calc_coverage
+)
+
+
+TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
+
+
+# Env setup_scenario
+@try_manual
+def setup_scenario(test, rg):
+ pass
+
+
+# Env cleanup_scenario
+@try_manual
+def cleanup_scenario(test, rg):
+ pass
+
+
+# Testcase: Scenario
+@try_manual
+def call_scenario(test, rg):
+ setup_scenario(test, rg)
+ step_private_link_service_for_power_bi_create(test, rg, checks=[])
+ step_private_link_service_for_power_bi_create2(test, rg, checks=[])
+ step_private_link_service_for_power_bi_create3(test, rg, checks=[])
+ step_private_link_service(test, rg, checks=[])
+ step_private_link_service2(test, rg, checks=[])
+ step_private_link_service3(test, rg, checks=[])
+ step_private_link_service_for_power_bi_list(test, rg, checks=[])
+ step_private_link_service_for_power_bi_list2(test, rg, checks=[])
+ step_private_link_service_for_power_bi_list3(test, rg, checks=[])
+ step_private_link_service_for_power_bi_list3(test, rg, checks=[])
+ step_private_link_service4(test, rg, checks=[])
+ step_private_link_service5(test, rg, checks=[])
+ step_private_link_service_for_power_bi_delete(test, rg, checks=[])
+ step_private_link_service_for_power_bi_delete2(test, rg, checks=[])
+ step_private_link_service_for_power_bi_delete3(test, rg, checks=[])
+ cleanup_scenario(test, rg)
+
+
+# Test class for Scenario
+@try_manual
+class PowerbiprivatelinksScenarioTest(ScenarioTest):
+
+ def __init__(self, *args, **kwargs):
+ super(PowerbiprivatelinksScenarioTest, self).__init__(*args, **kwargs)
+ self.kwargs.update({
+ 'subscription_id': self.get_subscription_id()
+ })
+
+ self.kwargs.update({
+ 'myPrivateLinkServicesForPowerBi': 'azureResourceName',
+ })
+
+
+ @ResourceGroupPreparer(name_prefix='clitestpowerbiprivatelinks_resourceGroup'[:7], key='rg', parameter_name='rg')
+ def test_powerbiprivatelinks_Scenario(self, rg):
+ call_scenario(self, rg)
+ calc_coverage(__file__)
+ raise_if()
+
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/__init__.py
new file mode 100644
index 00000000000..c9cfdc73e77
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/__init__.py
@@ -0,0 +1,12 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/__init__.py
new file mode 100644
index 00000000000..f758ab37a0e
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/__init__.py
@@ -0,0 +1,16 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._power_bi_private_link_service_management_client import PowerBIPrivateLinkServiceManagementClient
+__all__ = ['PowerBIPrivateLinkServiceManagementClient']
+
+try:
+ from ._patch import patch_sdk # type: ignore
+ patch_sdk()
+except ImportError:
+ pass
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/_configuration.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/_configuration.py
new file mode 100644
index 00000000000..6a76a77997f
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/_configuration.py
@@ -0,0 +1,100 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from typing import TYPE_CHECKING
+
+from azure.core.configuration import Configuration
+from azure.core.pipeline import policies
+from azure.mgmt.core.policies import ARMHttpLoggingPolicy
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any
+
+ from azure.core.credentials import TokenCredential
+
+VERSION = "unknown"
+
+class PowerBIPrivateLinkServiceManagementClientConfiguration(Configuration):
+ """Configuration for PowerBIPrivateLinkServiceManagementClient.
+
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials.TokenCredential
+ :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ :type subscription_id: str
+ :param resource_group_name: The name of the resource group.
+ :type resource_group_name: str
+ :param azure_resource_name: The name of the Azure resource.
+ :type azure_resource_name: str
+ :param private_endpoint_name: The name of the private endpoint.
+ :type private_endpoint_name: str
+ :param private_endpoint_guid: The Guid of the private endpoint. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ :type private_endpoint_guid: str
+ :param operation_id: The id of Azure async operation.
+ :type operation_id: str
+ """
+
+ def __init__(
+ self,
+ credential, # type: "TokenCredential"
+ subscription_id, # type: str
+ resource_group_name, # type: str
+ azure_resource_name, # type: str
+ private_endpoint_name, # type: str
+ private_endpoint_guid, # type: str
+ operation_id, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ if credential is None:
+ raise ValueError("Parameter 'credential' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if resource_group_name is None:
+ raise ValueError("Parameter 'resource_group_name' must not be None.")
+ if azure_resource_name is None:
+ raise ValueError("Parameter 'azure_resource_name' must not be None.")
+ if private_endpoint_name is None:
+ raise ValueError("Parameter 'private_endpoint_name' must not be None.")
+ if private_endpoint_guid is None:
+ raise ValueError("Parameter 'private_endpoint_guid' must not be None.")
+ if operation_id is None:
+ raise ValueError("Parameter 'operation_id' must not be None.")
+ super(PowerBIPrivateLinkServiceManagementClientConfiguration, self).__init__(**kwargs)
+
+ self.credential = credential
+ self.subscription_id = subscription_id
+ self.resource_group_name = resource_group_name
+ self.azure_resource_name = azure_resource_name
+ self.private_endpoint_name = private_endpoint_name
+ self.private_endpoint_guid = private_endpoint_guid
+ self.operation_id = operation_id
+ self.api_version = "2020-06-01"
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
+ kwargs.setdefault('sdk_moniker', 'powerbiprivatelinkservicemanagementclient/{}'.format(VERSION))
+ self._configure(**kwargs)
+
+ def _configure(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
+ self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
+ self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
+ self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
+ self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
+ self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
+ self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
+ self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
+ self.authentication_policy = kwargs.get('authentication_policy')
+ if self.credential and not self.authentication_policy:
+ self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/_power_bi_private_link_service_management_client.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/_power_bi_private_link_service_management_client.py
new file mode 100644
index 00000000000..ca12c8e563a
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/_power_bi_private_link_service_management_client.py
@@ -0,0 +1,84 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from typing import TYPE_CHECKING
+
+from azure.mgmt.core import ARMPipelineClient
+from msrest import Deserializer, Serializer
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any, Optional
+
+ from azure.core.credentials import TokenCredential
+
+from ._configuration import PowerBIPrivateLinkServiceManagementClientConfiguration
+from .operations import PrivateLinkServicesForPowerBiOperations
+from . import models
+
+
+class PowerBIPrivateLinkServiceManagementClient(object):
+ """Client to manage your Power BI Private Link Service resources and connection memebrs.
+
+ :ivar private_link_services_for_power_bi: PrivateLinkServicesForPowerBiOperations operations
+ :vartype private_link_services_for_power_bi: power_bi_private_link_service_management_client.operations.PrivateLinkServicesForPowerBiOperations
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials.TokenCredential
+ :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ :type subscription_id: str
+ :param resource_group_name: The name of the resource group.
+ :type resource_group_name: str
+ :param azure_resource_name: The name of the Azure resource.
+ :type azure_resource_name: str
+ :param private_endpoint_name: The name of the private endpoint.
+ :type private_endpoint_name: str
+ :param private_endpoint_guid: The Guid of the private endpoint. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ :type private_endpoint_guid: str
+ :param operation_id: The id of Azure async operation.
+ :type operation_id: str
+ :param str base_url: Service URL
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ """
+
+ def __init__(
+ self,
+ credential, # type: "TokenCredential"
+ subscription_id, # type: str
+ resource_group_name, # type: str
+ azure_resource_name, # type: str
+ private_endpoint_name, # type: str
+ private_endpoint_guid, # type: str
+ operation_id, # type: str
+ base_url=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ if not base_url:
+ base_url = 'https://management.azure.com'
+ self._config = PowerBIPrivateLinkServiceManagementClientConfiguration(credential, subscription_id, resource_group_name, azure_resource_name, private_endpoint_name, private_endpoint_guid, operation_id, **kwargs)
+ self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
+
+ client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+
+ self.private_link_services_for_power_bi = PrivateLinkServicesForPowerBiOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+
+ def close(self):
+ # type: () -> None
+ self._client.close()
+
+ def __enter__(self):
+ # type: () -> PowerBIPrivateLinkServiceManagementClient
+ self._client.__enter__()
+ return self
+
+ def __exit__(self, *exc_details):
+ # type: (Any) -> None
+ self._client.__exit__(*exc_details)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/__init__.py
new file mode 100644
index 00000000000..aa8e62639c5
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/__init__.py
@@ -0,0 +1,10 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._power_bi_private_link_service_management_client import PowerBIPrivateLinkServiceManagementClient
+__all__ = ['PowerBIPrivateLinkServiceManagementClient']
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/_configuration.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/_configuration.py
new file mode 100644
index 00000000000..c0380a3875d
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/_configuration.py
@@ -0,0 +1,96 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from typing import Any, TYPE_CHECKING
+
+from azure.core.configuration import Configuration
+from azure.core.pipeline import policies
+from azure.mgmt.core.policies import ARMHttpLoggingPolicy
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from azure.core.credentials_async import AsyncTokenCredential
+
+VERSION = "unknown"
+
+class PowerBIPrivateLinkServiceManagementClientConfiguration(Configuration):
+ """Configuration for PowerBIPrivateLinkServiceManagementClient.
+
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials_async.AsyncTokenCredential
+ :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ :type subscription_id: str
+ :param resource_group_name: The name of the resource group.
+ :type resource_group_name: str
+ :param azure_resource_name: The name of the Azure resource.
+ :type azure_resource_name: str
+ :param private_endpoint_name: The name of the private endpoint.
+ :type private_endpoint_name: str
+ :param private_endpoint_guid: The Guid of the private endpoint. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ :type private_endpoint_guid: str
+ :param operation_id: The id of Azure async operation.
+ :type operation_id: str
+ """
+
+ def __init__(
+ self,
+ credential: "AsyncTokenCredential",
+ subscription_id: str,
+ resource_group_name: str,
+ azure_resource_name: str,
+ private_endpoint_name: str,
+ private_endpoint_guid: str,
+ operation_id: str,
+ **kwargs: Any
+ ) -> None:
+ if credential is None:
+ raise ValueError("Parameter 'credential' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if resource_group_name is None:
+ raise ValueError("Parameter 'resource_group_name' must not be None.")
+ if azure_resource_name is None:
+ raise ValueError("Parameter 'azure_resource_name' must not be None.")
+ if private_endpoint_name is None:
+ raise ValueError("Parameter 'private_endpoint_name' must not be None.")
+ if private_endpoint_guid is None:
+ raise ValueError("Parameter 'private_endpoint_guid' must not be None.")
+ if operation_id is None:
+ raise ValueError("Parameter 'operation_id' must not be None.")
+ super(PowerBIPrivateLinkServiceManagementClientConfiguration, self).__init__(**kwargs)
+
+ self.credential = credential
+ self.subscription_id = subscription_id
+ self.resource_group_name = resource_group_name
+ self.azure_resource_name = azure_resource_name
+ self.private_endpoint_name = private_endpoint_name
+ self.private_endpoint_guid = private_endpoint_guid
+ self.operation_id = operation_id
+ self.api_version = "2020-06-01"
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
+ kwargs.setdefault('sdk_moniker', 'powerbiprivatelinkservicemanagementclient/{}'.format(VERSION))
+ self._configure(**kwargs)
+
+ def _configure(
+ self,
+ **kwargs: Any
+ ) -> None:
+ self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
+ self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
+ self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
+ self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
+ self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
+ self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
+ self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
+ self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
+ self.authentication_policy = kwargs.get('authentication_policy')
+ if self.credential and not self.authentication_policy:
+ self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/_power_bi_private_link_service_management_client.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/_power_bi_private_link_service_management_client.py
new file mode 100644
index 00000000000..d34920d7c98
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/_power_bi_private_link_service_management_client.py
@@ -0,0 +1,78 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from typing import Any, Optional, TYPE_CHECKING
+
+from azure.mgmt.core import AsyncARMPipelineClient
+from msrest import Deserializer, Serializer
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from azure.core.credentials_async import AsyncTokenCredential
+
+from ._configuration import PowerBIPrivateLinkServiceManagementClientConfiguration
+from .operations import PrivateLinkServicesForPowerBiOperations
+from .. import models
+
+
+class PowerBIPrivateLinkServiceManagementClient(object):
+ """Client to manage your Power BI Private Link Service resources and connection memebrs.
+
+ :ivar private_link_services_for_power_bi: PrivateLinkServicesForPowerBiOperations operations
+ :vartype private_link_services_for_power_bi: power_bi_private_link_service_management_client.aio.operations.PrivateLinkServicesForPowerBiOperations
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials_async.AsyncTokenCredential
+ :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ :type subscription_id: str
+ :param resource_group_name: The name of the resource group.
+ :type resource_group_name: str
+ :param azure_resource_name: The name of the Azure resource.
+ :type azure_resource_name: str
+ :param private_endpoint_name: The name of the private endpoint.
+ :type private_endpoint_name: str
+ :param private_endpoint_guid: The Guid of the private endpoint. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ :type private_endpoint_guid: str
+ :param operation_id: The id of Azure async operation.
+ :type operation_id: str
+ :param str base_url: Service URL
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ """
+
+ def __init__(
+ self,
+ credential: "AsyncTokenCredential",
+ subscription_id: str,
+ resource_group_name: str,
+ azure_resource_name: str,
+ private_endpoint_name: str,
+ private_endpoint_guid: str,
+ operation_id: str,
+ base_url: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ if not base_url:
+ base_url = 'https://management.azure.com'
+ self._config = PowerBIPrivateLinkServiceManagementClientConfiguration(credential, subscription_id, resource_group_name, azure_resource_name, private_endpoint_name, private_endpoint_guid, operation_id, **kwargs)
+ self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
+
+ client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+
+ self.private_link_services_for_power_bi = PrivateLinkServicesForPowerBiOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+
+ async def close(self) -> None:
+ await self._client.close()
+
+ async def __aenter__(self) -> "PowerBIPrivateLinkServiceManagementClient":
+ await self._client.__aenter__()
+ return self
+
+ async def __aexit__(self, *exc_details) -> None:
+ await self._client.__aexit__(*exc_details)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/operations/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/operations/__init__.py
new file mode 100644
index 00000000000..fe0a53bec36
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/operations/__init__.py
@@ -0,0 +1,13 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._private_link_services_for_power_bi_operations import PrivateLinkServicesForPowerBiOperations
+
+__all__ = [
+ 'PrivateLinkServicesForPowerBiOperations',
+]
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/operations/_private_link_services_for_power_bi_operations.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/operations/_private_link_services_for_power_bi_operations.py
new file mode 100644
index 00000000000..3262c2509d3
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/aio/operations/_private_link_services_for_power_bi_operations.py
@@ -0,0 +1,1068 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union
+import warnings
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
+
+from ... import models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class PrivateLinkServicesForPowerBiOperations:
+ """PrivateLinkServicesForPowerBiOperations async operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~power_bi_private_link_service_management_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer) -> None:
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ def list_available_operations(
+ self,
+ **kwargs
+ ) -> AsyncIterable["models.OperationList"]:
+ """Indicates which operations can be performed by the Power BI Resource Provider.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either OperationList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~power_bi_private_link_service_management_client.models.OperationList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_available_operations.metadata['url'] # type: ignore
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('OperationList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ error = self._deserialize(models.Error, response)
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_available_operations.metadata = {'url': '/providers/Microsoft.PowerBI/operations'} # type: ignore
+
+ async def list_by_subscription_id(
+ self,
+ **kwargs
+ ) -> List["models.TenantResource"]:
+ """Gets all the private link resources for the given subscription id.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: list of TenantResource, or the result of cls(response)
+ :rtype: list[~power_bi_private_link_service_management_client.models.TenantResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[List["models.TenantResource"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_by_subscription_id.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('[TenantResource]', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI'} # type: ignore
+
+ async def get_private_link_service_resource_operation_result(
+ self,
+ **kwargs
+ ) -> "models.AsyncOperationDetail":
+ """Gets operation result of Private Link Service Resources for Power BI.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: AsyncOperationDetail, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.AsyncOperationDetail
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.AsyncOperationDetail"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get_private_link_service_resource_operation_result.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'operationId': self._serialize.url("self._config.operation_id", self._config.operation_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('AsyncOperationDetail', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get_private_link_service_resource_operation_result.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/operationResults/{operationId}'} # type: ignore
+
+ async def list_by_resource_group(
+ self,
+ **kwargs
+ ) -> List["models.TenantResource"]:
+ """Gets all the private link resources for the given resource group.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: list of TenantResource, or the result of cls(response)
+ :rtype: list[~power_bi_private_link_service_management_client.models.TenantResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[List["models.TenantResource"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('[TenantResource]', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI'} # type: ignore
+
+ async def list_by_resource_name(
+ self,
+ **kwargs
+ ) -> List["models.TenantResource"]:
+ """Gets all the private link resources for the given Azure resource.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: list of TenantResource, or the result of cls(response)
+ :rtype: list[~power_bi_private_link_service_management_client.models.TenantResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[List["models.TenantResource"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_by_resource_name.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('[TenantResource]', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_by_resource_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}'} # type: ignore
+
+ async def create_or_update_private_link_service(
+ self,
+ body: "models.TenantResource",
+ client_tenant_id: Optional[str] = None,
+ **kwargs
+ ) -> "models.TenantResource":
+ """Creates or updates a Private Link Service Resource for Power BI.
+
+ :param body: Tenant resource to be created or updated.
+ :type body: ~power_bi_private_link_service_management_client.models.TenantResource
+ :param client_tenant_id: The client tenant id in header. This is a GUID-formatted string (e.g.
+ 00000000-0000-0000-0000-000000000000).
+ :type client_tenant_id: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: TenantResource, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.TenantResource
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.TenantResource"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update_private_link_service.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ if client_tenant_id is not None:
+ header_parameters['x-ms-client-tenant-id'] = self._serialize.header("client_tenant_id", client_tenant_id, 'str')
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(body, 'TenantResource')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('TenantResource', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update_private_link_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}'} # type: ignore
+
+ async def delete_private_link_service(
+ self,
+ **kwargs
+ ) -> None:
+ """Deletes a Private Link Service Resource for Power BI.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+
+ # Construct URL
+ url = self.delete_private_link_service.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete_private_link_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}'} # type: ignore
+
+ def list_private_link_resources(
+ self,
+ **kwargs
+ ) -> AsyncIterable["models.PrivateLinkResources"]:
+ """Gets Private Link Resources for Power BI by resource group and resource name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either PrivateLinkResources or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~power_bi_private_link_service_management_client.models.PrivateLinkResources]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResources"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_private_link_resources.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('PrivateLinkResources', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ error = self._deserialize(models.Error, response)
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateLinkResources'} # type: ignore
+
+ async def get_private_endpoint_connection_proxy(
+ self,
+ **kwargs
+ ) -> "models.PrivateEndpointConnectionProxy":
+ """Synchronous API called by NRP to get private endpoint connection proxy for Power BI by private endpoint name.
+
+ Gets private endpoint connection proxy for Power BI by private endpoint name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PrivateEndpointConnectionProxy, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxy
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionProxy"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get_private_endpoint_connection_proxy.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('PrivateEndpointConnectionProxy', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get_private_endpoint_connection_proxy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ async def _create_or_update_private_endpoint_connection_proxy_initial(
+ self,
+ body: "models.PrivateEndpointConnectionProxy",
+ client_tenant_id: Optional[str] = None,
+ **kwargs
+ ) -> "models.PrivateEndpointConnectionProxyResource":
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionProxyResource"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self._create_or_update_private_endpoint_connection_proxy_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ if client_tenant_id is not None:
+ header_parameters['x-ms-client-tenant-id'] = self._serialize.header("client_tenant_id", client_tenant_id, 'str')
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(body, 'PrivateEndpointConnectionProxy')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+ deserialized = self._deserialize('PrivateEndpointConnectionProxyResource', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+ _create_or_update_private_endpoint_connection_proxy_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ async def begin_create_or_update_private_endpoint_connection_proxy(
+ self,
+ body: "models.PrivateEndpointConnectionProxy",
+ client_tenant_id: Optional[str] = None,
+ **kwargs
+ ) -> AsyncLROPoller["models.PrivateEndpointConnectionProxyResource"]:
+ """Creates or updates private endpoint connection proxy for Power BI by private endpoint name.
+
+ :param body: The PrivateEndpointConnectionProxy to be created or updated.
+ :type body: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxy
+ :param client_tenant_id: The client tenant id in header. This is a GUID-formatted string (e.g.
+ 00000000-0000-0000-0000-000000000000).
+ :type client_tenant_id: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnectionProxyResource or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxyResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionProxyResource"]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = await self._create_or_update_private_endpoint_connection_proxy_initial(
+ body=body,
+ client_tenant_id=client_tenant_id,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ response_headers = {}
+ response = pipeline_response.http_response
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+ deserialized = self._deserialize('PrivateEndpointConnectionProxyResource', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+ return deserialized
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
+ elif polling is False: polling_method = AsyncNoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return AsyncLROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ begin_create_or_update_private_endpoint_connection_proxy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ async def _delete_private_endpoint_connection_proxy_initial(
+ self,
+ **kwargs
+ ) -> None:
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ # Construct URL
+ url = self._delete_private_endpoint_connection_proxy_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_private_endpoint_connection_proxy_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ async def begin_delete_private_endpoint_connection_proxy(
+ self,
+ **kwargs
+ ) -> AsyncLROPoller[None]:
+ """Deletes a private endpoint connection proxy for Power BI by private endpoint name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = await self._delete_private_endpoint_connection_proxy_initial(
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
+ elif polling is False: polling_method = AsyncNoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return AsyncLROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ begin_delete_private_endpoint_connection_proxy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ async def validate_private_endpoint_connection_proxy(
+ self,
+ body: "models.PrivateEndpointConnectionProxy",
+ **kwargs
+ ) -> "models.PrivateEndpointConnectionProxy":
+ """Synchronous API called by NRP to validate a private endpoint before create or update.
+
+ Validates a private endpoint connection before create or update.
+
+ :param body: The PrivateEndpointConnectionProxy to be created or updated.
+ :type body: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxy
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PrivateEndpointConnectionProxy, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxy
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionProxy"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.validate_private_endpoint_connection_proxy.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(body, 'PrivateEndpointConnectionProxy')
+ body_content_kwargs['content'] = body_content
+ request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('PrivateEndpointConnectionProxy', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ validate_private_endpoint_connection_proxy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}/validate'} # type: ignore
+
+ async def get_private_endpoint_connection(
+ self,
+ **kwargs
+ ) -> "models.PrivateEndpointConnection":
+ """Gets private endpoint connection for Power BI by private endpoint name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PrivateEndpointConnection, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnection
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get_private_endpoint_connection.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ async def create_or_update_private_endpoint_connection_status(
+ self,
+ body: "models.PrivateEndpointConnection",
+ **kwargs
+ ) -> "models.PrivateEndpointConnection":
+ """Updates the status of Private Endpoint Connection object. Used to approve or reject a
+ connection.
+
+ :param body: Private endpoint connection to update.
+ :type body: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnection
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PrivateEndpointConnection, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnection
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update_private_endpoint_connection_status.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(body, 'PrivateEndpointConnection')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update_private_endpoint_connection_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ async def _delete_private_endpoint_connection_initial(
+ self,
+ **kwargs
+ ) -> None:
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ accept = "application/json"
+
+ # Construct URL
+ url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ async def begin_delete_private_endpoint_connection(
+ self,
+ **kwargs
+ ) -> AsyncLROPoller[None]:
+ """Asynchronous API to delete a private endpoint connection for Power BI by private endpoint name.
+
+ Deletes a private endpoint connection for Power BI by private endpoint name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = await self._delete_private_endpoint_connection_initial(
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
+ elif polling is False: polling_method = AsyncNoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return AsyncLROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/__init__.py
new file mode 100644
index 00000000000..4777a1cad54
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/__init__.py
@@ -0,0 +1,80 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+try:
+ from ._models_py3 import AsyncOperationDetail
+ from ._models_py3 import ConnectionState
+ from ._models_py3 import Display
+ from ._models_py3 import Error
+ from ._models_py3 import ErrorDetail
+ from ._models_py3 import GroupConnectivityInformation
+ from ._models_py3 import Operation
+ from ._models_py3 import OperationList
+ from ._models_py3 import PrivateEndpoint
+ from ._models_py3 import PrivateEndpointConnection
+ from ._models_py3 import PrivateEndpointConnectionProxy
+ from ._models_py3 import PrivateEndpointConnectionProxyResource
+ from ._models_py3 import PrivateLinkConnectionDetail
+ from ._models_py3 import PrivateLinkResource
+ from ._models_py3 import PrivateLinkResources
+ from ._models_py3 import PrivateLinkServiceConnection
+ from ._models_py3 import PrivateLinkServiceProxy
+ from ._models_py3 import RemotePrivateEndpoint
+ from ._models_py3 import RemotePrivateEndpointConnection
+ from ._models_py3 import TenantResource
+except (SyntaxError, ImportError):
+ from ._models import AsyncOperationDetail # type: ignore
+ from ._models import ConnectionState # type: ignore
+ from ._models import Display # type: ignore
+ from ._models import Error # type: ignore
+ from ._models import ErrorDetail # type: ignore
+ from ._models import GroupConnectivityInformation # type: ignore
+ from ._models import Operation # type: ignore
+ from ._models import OperationList # type: ignore
+ from ._models import PrivateEndpoint # type: ignore
+ from ._models import PrivateEndpointConnection # type: ignore
+ from ._models import PrivateEndpointConnectionProxy # type: ignore
+ from ._models import PrivateEndpointConnectionProxyResource # type: ignore
+ from ._models import PrivateLinkConnectionDetail # type: ignore
+ from ._models import PrivateLinkResource # type: ignore
+ from ._models import PrivateLinkResources # type: ignore
+ from ._models import PrivateLinkServiceConnection # type: ignore
+ from ._models import PrivateLinkServiceProxy # type: ignore
+ from ._models import RemotePrivateEndpoint # type: ignore
+ from ._models import RemotePrivateEndpointConnection # type: ignore
+ from ._models import TenantResource # type: ignore
+
+from ._power_bi_private_link_service_management_client_enums import (
+ ActionsRequired,
+ ConnectionStatus,
+)
+
+__all__ = [
+ 'AsyncOperationDetail',
+ 'ConnectionState',
+ 'Display',
+ 'Error',
+ 'ErrorDetail',
+ 'GroupConnectivityInformation',
+ 'Operation',
+ 'OperationList',
+ 'PrivateEndpoint',
+ 'PrivateEndpointConnection',
+ 'PrivateEndpointConnectionProxy',
+ 'PrivateEndpointConnectionProxyResource',
+ 'PrivateLinkConnectionDetail',
+ 'PrivateLinkResource',
+ 'PrivateLinkResources',
+ 'PrivateLinkServiceConnection',
+ 'PrivateLinkServiceProxy',
+ 'RemotePrivateEndpoint',
+ 'RemotePrivateEndpointConnection',
+ 'TenantResource',
+ 'ActionsRequired',
+ 'ConnectionStatus',
+]
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/_models.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/_models.py
new file mode 100644
index 00000000000..a9013e7d4d3
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/_models.py
@@ -0,0 +1,699 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.core.exceptions import HttpResponseError
+import msrest.serialization
+
+
+class AsyncOperationDetail(msrest.serialization.Model):
+ """AsyncOperationDetail.
+
+ :param id: The operation id.
+ :type id: str
+ :param name: The operation name.
+ :type name: str
+ :param status: The operation status.
+ :type status: str
+ :param start_time: The operation start time.
+ :type start_time: str
+ :param end_time: The operation end time.
+ :type end_time: str
+ :param error: The error.
+ :type error: ~power_bi_private_link_service_management_client.models.Error
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'str'},
+ 'start_time': {'key': 'startTime', 'type': 'str'},
+ 'end_time': {'key': 'endTime', 'type': 'str'},
+ 'error': {'key': 'error', 'type': 'Error'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(AsyncOperationDetail, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+ self.name = kwargs.get('name', None)
+ self.status = kwargs.get('status', None)
+ self.start_time = kwargs.get('start_time', None)
+ self.end_time = kwargs.get('end_time', None)
+ self.error = kwargs.get('error', None)
+
+
+class ConnectionState(msrest.serialization.Model):
+ """ConnectionState.
+
+ :param status: Specifies the connection status. Possible values include: "Pending", "Approved",
+ "Rejected", "Disconnected".
+ :type status: str or ~power_bi_private_link_service_management_client.models.ConnectionStatus
+ :param description: Specifies the connection status description.
+ :type description: str
+ :param actions_required: Specifies the actions required. Possible values include: "None",
+ "Recreate".
+ :type actions_required: str or
+ ~power_bi_private_link_service_management_client.models.ActionsRequired
+ """
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ 'actions_required': {'key': 'actionsRequired', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ConnectionState, self).__init__(**kwargs)
+ self.status = kwargs.get('status', None)
+ self.description = kwargs.get('description', None)
+ self.actions_required = kwargs.get('actions_required', None)
+
+
+class Display(msrest.serialization.Model):
+ """Display.
+
+ :param provider: The localized friendly form of the resource provider name. This form is also
+ expected to include the publisher/company responsible. Use Title Casing. Begin with "Microsoft"
+ for 1st party services.
+ :type provider: str
+ :param resource: The localized friendly form of the resource type related to this
+ action/operation. This form should match the public documentation for the resource provider.
+ Use Title Casing. For examples, refer to the "name" section.
+ :type resource: str
+ :param operation: The localized friendly name for the operation as shown to the user. This name
+ should be concise (to fit in drop downs), but clear (self-documenting). Use Title Casing and
+ include the entity/resource to which it applies.
+ :type operation: str
+ :param description: The localized friendly description for the operation as shown to the user.
+ This description should be thorough, yet concise. It will be used in tool-tips and detailed
+ views.
+ :type description: str
+ :param origin: The intended executor of the operation; governs the display of the operation in
+ the RBAC UX and the audit logs UX. Default value is 'user,system'.
+ :type origin: str
+ """
+
+ _attribute_map = {
+ 'provider': {'key': 'provider', 'type': 'str'},
+ 'resource': {'key': 'resource', 'type': 'str'},
+ 'operation': {'key': 'operation', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ 'origin': {'key': 'origin', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(Display, self).__init__(**kwargs)
+ self.provider = kwargs.get('provider', None)
+ self.resource = kwargs.get('resource', None)
+ self.operation = kwargs.get('operation', None)
+ self.description = kwargs.get('description', None)
+ self.origin = kwargs.get('origin', None)
+
+
+class Error(msrest.serialization.Model):
+ """Error.
+
+ :param code: Specifies the error code.
+ :type code: str
+ :param message: Specifies the error message.
+ :type message: str
+ :param target: Specifies the error target.
+ :type target: str
+ :param details: Specifies the error details.
+ :type details: list[~power_bi_private_link_service_management_client.models.ErrorDetail]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorDetail]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(Error, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.target = kwargs.get('target', None)
+ self.details = kwargs.get('details', None)
+
+
+class ErrorDetail(msrest.serialization.Model):
+ """ErrorDetail.
+
+ :param code: Specifies the error code.
+ :type code: str
+ :param message: Specifies the error message.
+ :type message: str
+ :param target: Specifies the error target.
+ :type target: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ErrorDetail, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.target = kwargs.get('target', None)
+
+
+class GroupConnectivityInformation(msrest.serialization.Model):
+ """GroupConnectivityInformation.
+
+ :param group_id: Specifies the group id of the group connectivity information.
+ :type group_id: str
+ :param member_name: Specifies the member name of the group connectivity information.
+ :type member_name: str
+ :param internal_fqdn: Specifies the internal FQDN of the group connectivity information.
+ :type internal_fqdn: str
+ :param customer_visible_fqdns: Specifies the customer visible FQDNs of the group connectivity
+ information.
+ :type customer_visible_fqdns: list[str]
+ :param private_link_service_arm_region: Specifies the ARM region of the group connectivity
+ information.
+ :type private_link_service_arm_region: str
+ """
+
+ _attribute_map = {
+ 'group_id': {'key': 'groupId', 'type': 'str'},
+ 'member_name': {'key': 'memberName', 'type': 'str'},
+ 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'},
+ 'customer_visible_fqdns': {'key': 'customerVisibleFqdns', 'type': '[str]'},
+ 'private_link_service_arm_region': {'key': 'privateLinkServiceArmRegion', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(GroupConnectivityInformation, self).__init__(**kwargs)
+ self.group_id = kwargs.get('group_id', None)
+ self.member_name = kwargs.get('member_name', None)
+ self.internal_fqdn = kwargs.get('internal_fqdn', None)
+ self.customer_visible_fqdns = kwargs.get('customer_visible_fqdns', None)
+ self.private_link_service_arm_region = kwargs.get('private_link_service_arm_region', None)
+
+
+class Operation(msrest.serialization.Model):
+ """Operation.
+
+ :param name: The name of the operation being performed on this particular object. This name
+ should match the action name that appears in RBAC / the event service.
+ :type name: str
+ :param display: Specifies the display of operation.
+ :type display: ~power_bi_private_link_service_management_client.models.Display
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'display': {'key': 'display', 'type': 'Display'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(Operation, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.display = kwargs.get('display', None)
+
+
+class OperationList(msrest.serialization.Model):
+ """OperationList.
+
+ :param value: Specifies the value of operation list.
+ :type value: list[~power_bi_private_link_service_management_client.models.Operation]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[Operation]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(OperationList, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+
+
+class PrivateEndpoint(msrest.serialization.Model):
+ """PrivateEndpoint.
+
+ :param id: Specifies the id of private endpoint.
+ :type id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PrivateEndpoint, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+
+
+class PrivateEndpointConnection(msrest.serialization.Model):
+ """PrivateEndpointConnection.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Specifies the id of the resource.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param private_endpoint: Specifies the private endpoint.
+ :type private_endpoint: ~power_bi_private_link_service_management_client.models.PrivateEndpoint
+ :param private_link_service_connection_state: Specifies the connection state.
+ :type private_link_service_connection_state:
+ ~power_bi_private_link_service_management_client.models.ConnectionState
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
+ 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'ConnectionState'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PrivateEndpointConnection, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.private_endpoint = kwargs.get('private_endpoint', None)
+ self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None)
+
+
+class PrivateEndpointConnectionProxy(msrest.serialization.Model):
+ """PrivateEndpointConnectionProxy.
+
+ :param id: Specifies the id of the resource.
+ :type id: str
+ :param name: Specifies the name of the resource.
+ :type name: str
+ :param type: Specifies the type of the resource.
+ :type type: str
+ :param location: Specifies the location of the resource.
+ :type location: str
+ :param etag: Specifies the etag of the resource.
+ :type etag: str
+ :param remote_private_endpoint: Specifies the remote private endpoint of the resource.
+ :type remote_private_endpoint:
+ ~power_bi_private_link_service_management_client.models.RemotePrivateEndpoint
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'etag': {'key': 'etag', 'type': 'str'},
+ 'remote_private_endpoint': {'key': 'remotePrivateEndpoint', 'type': 'RemotePrivateEndpoint'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PrivateEndpointConnectionProxy, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+ self.name = kwargs.get('name', None)
+ self.type = kwargs.get('type', None)
+ self.location = kwargs.get('location', None)
+ self.etag = kwargs.get('etag', None)
+ self.remote_private_endpoint = kwargs.get('remote_private_endpoint', None)
+
+
+class PrivateEndpointConnectionProxyResource(msrest.serialization.Model):
+ """PrivateEndpointConnectionProxyResource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Specifies the id of the resource.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param location: Specifies the location of the resource.
+ :type location: str
+ :param etag: Specifies the etag of the resource.
+ :type etag: str
+ :param id_properties_id: Specifies the id of the resource.
+ :type id_properties_id: str
+ :param name_properties_name: Specifies the name of the resource.
+ :type name_properties_name: str
+ :param type_properties_type: Specifies the type of the resource.
+ :type type_properties_type: str
+ :param location_properties_location: Specifies the location of the resource.
+ :type location_properties_location: str
+ :param etag_properties_etag: Specifies the etag of the resource.
+ :type etag_properties_etag: str
+ :param remote_private_endpoint: Specifies the remote private endpoint of the resource.
+ :type remote_private_endpoint:
+ ~power_bi_private_link_service_management_client.models.RemotePrivateEndpoint
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'etag': {'key': 'etag', 'type': 'str'},
+ 'id_properties_id': {'key': 'properties.id', 'type': 'str'},
+ 'name_properties_name': {'key': 'properties.name', 'type': 'str'},
+ 'type_properties_type': {'key': 'properties.type', 'type': 'str'},
+ 'location_properties_location': {'key': 'properties.location', 'type': 'str'},
+ 'etag_properties_etag': {'key': 'properties.etag', 'type': 'str'},
+ 'remote_private_endpoint': {'key': 'properties.remotePrivateEndpoint', 'type': 'RemotePrivateEndpoint'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PrivateEndpointConnectionProxyResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = kwargs.get('location', None)
+ self.etag = kwargs.get('etag', None)
+ self.id_properties_id = kwargs.get('id_properties_id', None)
+ self.name_properties_name = kwargs.get('name_properties_name', None)
+ self.type_properties_type = kwargs.get('type_properties_type', None)
+ self.location_properties_location = kwargs.get('location_properties_location', None)
+ self.etag_properties_etag = kwargs.get('etag_properties_etag', None)
+ self.remote_private_endpoint = kwargs.get('remote_private_endpoint', None)
+
+
+class PrivateLinkConnectionDetail(msrest.serialization.Model):
+ """PrivateLinkConnectionDetail.
+
+ :param id: Specifies the type of the connection detail.
+ :type id: str
+ :param member_name: Specifies the member name of the connection detail.
+ :type member_name: str
+ :param private_ip_address: Specifies the private ip address of the connection detail.
+ :type private_ip_address: str
+ :param link_identifier: Specifies the link id of the connection detail.
+ :type link_identifier: str
+ :param group_id: Specifies the group id of the connection detail.
+ :type group_id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'member_name': {'key': 'memberName', 'type': 'str'},
+ 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'},
+ 'link_identifier': {'key': 'linkIdentifier', 'type': 'str'},
+ 'group_id': {'key': 'groupId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PrivateLinkConnectionDetail, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+ self.member_name = kwargs.get('member_name', None)
+ self.private_ip_address = kwargs.get('private_ip_address', None)
+ self.link_identifier = kwargs.get('link_identifier', None)
+ self.group_id = kwargs.get('group_id', None)
+
+
+class PrivateLinkResource(msrest.serialization.Model):
+ """PrivateLinkResource.
+
+ :param id: Specifies the id of private link resource.
+ :type id: str
+ :param name: Specifies the name of private link resource.
+ :type name: str
+ :param type: Specifies the type of private link resource.
+ :type type: str
+ :param group_id: Specifies the group id of private link resource.
+ :type group_id: str
+ :param required_members: Specifies the required memebrs of private link resource.
+ :type required_members: list[str]
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'group_id': {'key': 'groupId', 'type': 'str'},
+ 'required_members': {'key': 'requiredMembers', 'type': '[str]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PrivateLinkResource, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+ self.name = kwargs.get('name', None)
+ self.type = kwargs.get('type', None)
+ self.group_id = kwargs.get('group_id', None)
+ self.required_members = kwargs.get('required_members', None)
+
+
+class PrivateLinkResources(msrest.serialization.Model):
+ """PrivateLinkResources.
+
+ :param value: Specifies the private link resource.
+ :type value: list[~power_bi_private_link_service_management_client.models.PrivateLinkResource]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[PrivateLinkResource]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PrivateLinkResources, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+
+
+class PrivateLinkServiceConnection(msrest.serialization.Model):
+ """PrivateLinkServiceConnection.
+
+ :param name: Specifies the name of the private link service connection.
+ :type name: str
+ :param group_ids: Specifies the group ids of the private link service connection.
+ :type group_ids: list[str]
+ :param request_message: Specifies the request message of the private link service connection.
+ :type request_message: str
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'group_ids': {'key': 'groupIds', 'type': '[str]'},
+ 'request_message': {'key': 'requestMessage', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PrivateLinkServiceConnection, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.group_ids = kwargs.get('group_ids', None)
+ self.request_message = kwargs.get('request_message', None)
+
+
+class PrivateLinkServiceProxy(msrest.serialization.Model):
+ """PrivateLinkServiceProxy.
+
+ :param id: Specifies the id of the private link service proxy.
+ :type id: str
+ :param group_connectivity_information: Specifies the group connectivity information of the
+ private link service proxy.
+ :type group_connectivity_information:
+ list[~power_bi_private_link_service_management_client.models.GroupConnectivityInformation]
+ :param remote_private_link_service_connection_state: Specifies the connection state of the
+ private link service proxy.
+ :type remote_private_link_service_connection_state:
+ ~power_bi_private_link_service_management_client.models.ConnectionState
+ :param remote_private_endpoint_connection: Specifies the private endpoint connection of the
+ private link service proxy.
+ :type remote_private_endpoint_connection:
+ ~power_bi_private_link_service_management_client.models.RemotePrivateEndpointConnection
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'group_connectivity_information': {'key': 'groupConnectivityInformation', 'type': '[GroupConnectivityInformation]'},
+ 'remote_private_link_service_connection_state': {'key': 'remotePrivateLinkServiceConnectionState', 'type': 'ConnectionState'},
+ 'remote_private_endpoint_connection': {'key': 'remotePrivateEndpointConnection', 'type': 'RemotePrivateEndpointConnection'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PrivateLinkServiceProxy, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+ self.group_connectivity_information = kwargs.get('group_connectivity_information', None)
+ self.remote_private_link_service_connection_state = kwargs.get('remote_private_link_service_connection_state', None)
+ self.remote_private_endpoint_connection = kwargs.get('remote_private_endpoint_connection', None)
+
+
+class RemotePrivateEndpoint(msrest.serialization.Model):
+ """RemotePrivateEndpoint.
+
+ :param id: Specifies the id of the private endpoint.
+ :type id: str
+ :param manual_private_link_service_connections: Specifies the private link service connections
+ of the private endpoint.
+ :type manual_private_link_service_connections:
+ list[~power_bi_private_link_service_management_client.models.PrivateLinkServiceConnection]
+ :param private_link_service_connections: Specifies the private link service connections of the
+ private endpoint.
+ :type private_link_service_connections:
+ list[~power_bi_private_link_service_management_client.models.PrivateLinkServiceConnection]
+ :param private_link_service_proxies: Specifies the private link service proxies of the private
+ endpoint.
+ :type private_link_service_proxies:
+ list[~power_bi_private_link_service_management_client.models.PrivateLinkServiceProxy]
+ :param connection_details: Specifies the connection details of the private endpoint.
+ :type connection_details:
+ list[~power_bi_private_link_service_management_client.models.PrivateLinkConnectionDetail]
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'manual_private_link_service_connections': {'key': 'manualPrivateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'},
+ 'private_link_service_connections': {'key': 'privateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'},
+ 'private_link_service_proxies': {'key': 'privateLinkServiceProxies', 'type': '[PrivateLinkServiceProxy]'},
+ 'connection_details': {'key': 'connectionDetails', 'type': '[PrivateLinkConnectionDetail]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(RemotePrivateEndpoint, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+ self.manual_private_link_service_connections = kwargs.get('manual_private_link_service_connections', None)
+ self.private_link_service_connections = kwargs.get('private_link_service_connections', None)
+ self.private_link_service_proxies = kwargs.get('private_link_service_proxies', None)
+ self.connection_details = kwargs.get('connection_details', None)
+
+
+class RemotePrivateEndpointConnection(msrest.serialization.Model):
+ """RemotePrivateEndpointConnection.
+
+ :param id: Specifies the id of private endpoint connection.
+ :type id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(RemotePrivateEndpointConnection, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+
+
+class TenantResource(msrest.serialization.Model):
+ """TenantResource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Specifies the resource identifier of the resource.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param location: Specifies the location of the resource.
+ :type location: str
+ :param tags: A set of tags. Specifies the tags of the resource.
+ :type tags: dict[str, str]
+ :param tenant_id: Specifies the tenant id of the resource.
+ :type tenant_id: str
+ :param private_endpoint_connections: Specifies the private endpoint connections of the
+ resource.
+ :type private_endpoint_connections:
+ list[~power_bi_private_link_service_management_client.models.PrivateEndpointConnection]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
+ 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(TenantResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
+ self.tenant_id = kwargs.get('tenant_id', None)
+ self.private_endpoint_connections = kwargs.get('private_endpoint_connections', None)
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/_models_py3.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/_models_py3.py
new file mode 100644
index 00000000000..980b4e92f7e
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/_models_py3.py
@@ -0,0 +1,797 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from typing import Dict, List, Optional, Union
+
+from azure.core.exceptions import HttpResponseError
+import msrest.serialization
+
+from ._power_bi_private_link_service_management_client_enums import *
+
+
+class AsyncOperationDetail(msrest.serialization.Model):
+ """AsyncOperationDetail.
+
+ :param id: The operation id.
+ :type id: str
+ :param name: The operation name.
+ :type name: str
+ :param status: The operation status.
+ :type status: str
+ :param start_time: The operation start time.
+ :type start_time: str
+ :param end_time: The operation end time.
+ :type end_time: str
+ :param error: The error.
+ :type error: ~power_bi_private_link_service_management_client.models.Error
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'str'},
+ 'start_time': {'key': 'startTime', 'type': 'str'},
+ 'end_time': {'key': 'endTime', 'type': 'str'},
+ 'error': {'key': 'error', 'type': 'Error'},
+ }
+
+ def __init__(
+ self,
+ *,
+ id: Optional[str] = None,
+ name: Optional[str] = None,
+ status: Optional[str] = None,
+ start_time: Optional[str] = None,
+ end_time: Optional[str] = None,
+ error: Optional["Error"] = None,
+ **kwargs
+ ):
+ super(AsyncOperationDetail, self).__init__(**kwargs)
+ self.id = id
+ self.name = name
+ self.status = status
+ self.start_time = start_time
+ self.end_time = end_time
+ self.error = error
+
+
+class ConnectionState(msrest.serialization.Model):
+ """ConnectionState.
+
+ :param status: Specifies the connection status. Possible values include: "Pending", "Approved",
+ "Rejected", "Disconnected".
+ :type status: str or ~power_bi_private_link_service_management_client.models.ConnectionStatus
+ :param description: Specifies the connection status description.
+ :type description: str
+ :param actions_required: Specifies the actions required. Possible values include: "None",
+ "Recreate".
+ :type actions_required: str or
+ ~power_bi_private_link_service_management_client.models.ActionsRequired
+ """
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ 'actions_required': {'key': 'actionsRequired', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ status: Optional[Union[str, "ConnectionStatus"]] = None,
+ description: Optional[str] = None,
+ actions_required: Optional[Union[str, "ActionsRequired"]] = None,
+ **kwargs
+ ):
+ super(ConnectionState, self).__init__(**kwargs)
+ self.status = status
+ self.description = description
+ self.actions_required = actions_required
+
+
+class Display(msrest.serialization.Model):
+ """Display.
+
+ :param provider: The localized friendly form of the resource provider name. This form is also
+ expected to include the publisher/company responsible. Use Title Casing. Begin with "Microsoft"
+ for 1st party services.
+ :type provider: str
+ :param resource: The localized friendly form of the resource type related to this
+ action/operation. This form should match the public documentation for the resource provider.
+ Use Title Casing. For examples, refer to the "name" section.
+ :type resource: str
+ :param operation: The localized friendly name for the operation as shown to the user. This name
+ should be concise (to fit in drop downs), but clear (self-documenting). Use Title Casing and
+ include the entity/resource to which it applies.
+ :type operation: str
+ :param description: The localized friendly description for the operation as shown to the user.
+ This description should be thorough, yet concise. It will be used in tool-tips and detailed
+ views.
+ :type description: str
+ :param origin: The intended executor of the operation; governs the display of the operation in
+ the RBAC UX and the audit logs UX. Default value is 'user,system'.
+ :type origin: str
+ """
+
+ _attribute_map = {
+ 'provider': {'key': 'provider', 'type': 'str'},
+ 'resource': {'key': 'resource', 'type': 'str'},
+ 'operation': {'key': 'operation', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ 'origin': {'key': 'origin', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ provider: Optional[str] = None,
+ resource: Optional[str] = None,
+ operation: Optional[str] = None,
+ description: Optional[str] = None,
+ origin: Optional[str] = None,
+ **kwargs
+ ):
+ super(Display, self).__init__(**kwargs)
+ self.provider = provider
+ self.resource = resource
+ self.operation = operation
+ self.description = description
+ self.origin = origin
+
+
+class Error(msrest.serialization.Model):
+ """Error.
+
+ :param code: Specifies the error code.
+ :type code: str
+ :param message: Specifies the error message.
+ :type message: str
+ :param target: Specifies the error target.
+ :type target: str
+ :param details: Specifies the error details.
+ :type details: list[~power_bi_private_link_service_management_client.models.ErrorDetail]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorDetail]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ code: Optional[str] = None,
+ message: Optional[str] = None,
+ target: Optional[str] = None,
+ details: Optional[List["ErrorDetail"]] = None,
+ **kwargs
+ ):
+ super(Error, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.target = target
+ self.details = details
+
+
+class ErrorDetail(msrest.serialization.Model):
+ """ErrorDetail.
+
+ :param code: Specifies the error code.
+ :type code: str
+ :param message: Specifies the error message.
+ :type message: str
+ :param target: Specifies the error target.
+ :type target: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ code: Optional[str] = None,
+ message: Optional[str] = None,
+ target: Optional[str] = None,
+ **kwargs
+ ):
+ super(ErrorDetail, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.target = target
+
+
+class GroupConnectivityInformation(msrest.serialization.Model):
+ """GroupConnectivityInformation.
+
+ :param group_id: Specifies the group id of the group connectivity information.
+ :type group_id: str
+ :param member_name: Specifies the member name of the group connectivity information.
+ :type member_name: str
+ :param internal_fqdn: Specifies the internal FQDN of the group connectivity information.
+ :type internal_fqdn: str
+ :param customer_visible_fqdns: Specifies the customer visible FQDNs of the group connectivity
+ information.
+ :type customer_visible_fqdns: list[str]
+ :param private_link_service_arm_region: Specifies the ARM region of the group connectivity
+ information.
+ :type private_link_service_arm_region: str
+ """
+
+ _attribute_map = {
+ 'group_id': {'key': 'groupId', 'type': 'str'},
+ 'member_name': {'key': 'memberName', 'type': 'str'},
+ 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'},
+ 'customer_visible_fqdns': {'key': 'customerVisibleFqdns', 'type': '[str]'},
+ 'private_link_service_arm_region': {'key': 'privateLinkServiceArmRegion', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ group_id: Optional[str] = None,
+ member_name: Optional[str] = None,
+ internal_fqdn: Optional[str] = None,
+ customer_visible_fqdns: Optional[List[str]] = None,
+ private_link_service_arm_region: Optional[str] = None,
+ **kwargs
+ ):
+ super(GroupConnectivityInformation, self).__init__(**kwargs)
+ self.group_id = group_id
+ self.member_name = member_name
+ self.internal_fqdn = internal_fqdn
+ self.customer_visible_fqdns = customer_visible_fqdns
+ self.private_link_service_arm_region = private_link_service_arm_region
+
+
+class Operation(msrest.serialization.Model):
+ """Operation.
+
+ :param name: The name of the operation being performed on this particular object. This name
+ should match the action name that appears in RBAC / the event service.
+ :type name: str
+ :param display: Specifies the display of operation.
+ :type display: ~power_bi_private_link_service_management_client.models.Display
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'display': {'key': 'display', 'type': 'Display'},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ display: Optional["Display"] = None,
+ **kwargs
+ ):
+ super(Operation, self).__init__(**kwargs)
+ self.name = name
+ self.display = display
+
+
+class OperationList(msrest.serialization.Model):
+ """OperationList.
+
+ :param value: Specifies the value of operation list.
+ :type value: list[~power_bi_private_link_service_management_client.models.Operation]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[Operation]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["Operation"]] = None,
+ **kwargs
+ ):
+ super(OperationList, self).__init__(**kwargs)
+ self.value = value
+
+
+class PrivateEndpoint(msrest.serialization.Model):
+ """PrivateEndpoint.
+
+ :param id: Specifies the id of private endpoint.
+ :type id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ id: Optional[str] = None,
+ **kwargs
+ ):
+ super(PrivateEndpoint, self).__init__(**kwargs)
+ self.id = id
+
+
+class PrivateEndpointConnection(msrest.serialization.Model):
+ """PrivateEndpointConnection.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Specifies the id of the resource.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param private_endpoint: Specifies the private endpoint.
+ :type private_endpoint: ~power_bi_private_link_service_management_client.models.PrivateEndpoint
+ :param private_link_service_connection_state: Specifies the connection state.
+ :type private_link_service_connection_state:
+ ~power_bi_private_link_service_management_client.models.ConnectionState
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
+ 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'ConnectionState'},
+ }
+
+ def __init__(
+ self,
+ *,
+ private_endpoint: Optional["PrivateEndpoint"] = None,
+ private_link_service_connection_state: Optional["ConnectionState"] = None,
+ **kwargs
+ ):
+ super(PrivateEndpointConnection, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.private_endpoint = private_endpoint
+ self.private_link_service_connection_state = private_link_service_connection_state
+
+
+class PrivateEndpointConnectionProxy(msrest.serialization.Model):
+ """PrivateEndpointConnectionProxy.
+
+ :param id: Specifies the id of the resource.
+ :type id: str
+ :param name: Specifies the name of the resource.
+ :type name: str
+ :param type: Specifies the type of the resource.
+ :type type: str
+ :param location: Specifies the location of the resource.
+ :type location: str
+ :param etag: Specifies the etag of the resource.
+ :type etag: str
+ :param remote_private_endpoint: Specifies the remote private endpoint of the resource.
+ :type remote_private_endpoint:
+ ~power_bi_private_link_service_management_client.models.RemotePrivateEndpoint
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'etag': {'key': 'etag', 'type': 'str'},
+ 'remote_private_endpoint': {'key': 'remotePrivateEndpoint', 'type': 'RemotePrivateEndpoint'},
+ }
+
+ def __init__(
+ self,
+ *,
+ id: Optional[str] = None,
+ name: Optional[str] = None,
+ type: Optional[str] = None,
+ location: Optional[str] = None,
+ etag: Optional[str] = None,
+ remote_private_endpoint: Optional["RemotePrivateEndpoint"] = None,
+ **kwargs
+ ):
+ super(PrivateEndpointConnectionProxy, self).__init__(**kwargs)
+ self.id = id
+ self.name = name
+ self.type = type
+ self.location = location
+ self.etag = etag
+ self.remote_private_endpoint = remote_private_endpoint
+
+
+class PrivateEndpointConnectionProxyResource(msrest.serialization.Model):
+ """PrivateEndpointConnectionProxyResource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Specifies the id of the resource.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param location: Specifies the location of the resource.
+ :type location: str
+ :param etag: Specifies the etag of the resource.
+ :type etag: str
+ :param id_properties_id: Specifies the id of the resource.
+ :type id_properties_id: str
+ :param name_properties_name: Specifies the name of the resource.
+ :type name_properties_name: str
+ :param type_properties_type: Specifies the type of the resource.
+ :type type_properties_type: str
+ :param location_properties_location: Specifies the location of the resource.
+ :type location_properties_location: str
+ :param etag_properties_etag: Specifies the etag of the resource.
+ :type etag_properties_etag: str
+ :param remote_private_endpoint: Specifies the remote private endpoint of the resource.
+ :type remote_private_endpoint:
+ ~power_bi_private_link_service_management_client.models.RemotePrivateEndpoint
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'etag': {'key': 'etag', 'type': 'str'},
+ 'id_properties_id': {'key': 'properties.id', 'type': 'str'},
+ 'name_properties_name': {'key': 'properties.name', 'type': 'str'},
+ 'type_properties_type': {'key': 'properties.type', 'type': 'str'},
+ 'location_properties_location': {'key': 'properties.location', 'type': 'str'},
+ 'etag_properties_etag': {'key': 'properties.etag', 'type': 'str'},
+ 'remote_private_endpoint': {'key': 'properties.remotePrivateEndpoint', 'type': 'RemotePrivateEndpoint'},
+ }
+
+ def __init__(
+ self,
+ *,
+ location: Optional[str] = None,
+ etag: Optional[str] = None,
+ id_properties_id: Optional[str] = None,
+ name_properties_name: Optional[str] = None,
+ type_properties_type: Optional[str] = None,
+ location_properties_location: Optional[str] = None,
+ etag_properties_etag: Optional[str] = None,
+ remote_private_endpoint: Optional["RemotePrivateEndpoint"] = None,
+ **kwargs
+ ):
+ super(PrivateEndpointConnectionProxyResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = location
+ self.etag = etag
+ self.id_properties_id = id_properties_id
+ self.name_properties_name = name_properties_name
+ self.type_properties_type = type_properties_type
+ self.location_properties_location = location_properties_location
+ self.etag_properties_etag = etag_properties_etag
+ self.remote_private_endpoint = remote_private_endpoint
+
+
+class PrivateLinkConnectionDetail(msrest.serialization.Model):
+ """PrivateLinkConnectionDetail.
+
+ :param id: Specifies the type of the connection detail.
+ :type id: str
+ :param member_name: Specifies the member name of the connection detail.
+ :type member_name: str
+ :param private_ip_address: Specifies the private ip address of the connection detail.
+ :type private_ip_address: str
+ :param link_identifier: Specifies the link id of the connection detail.
+ :type link_identifier: str
+ :param group_id: Specifies the group id of the connection detail.
+ :type group_id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'member_name': {'key': 'memberName', 'type': 'str'},
+ 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'},
+ 'link_identifier': {'key': 'linkIdentifier', 'type': 'str'},
+ 'group_id': {'key': 'groupId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ id: Optional[str] = None,
+ member_name: Optional[str] = None,
+ private_ip_address: Optional[str] = None,
+ link_identifier: Optional[str] = None,
+ group_id: Optional[str] = None,
+ **kwargs
+ ):
+ super(PrivateLinkConnectionDetail, self).__init__(**kwargs)
+ self.id = id
+ self.member_name = member_name
+ self.private_ip_address = private_ip_address
+ self.link_identifier = link_identifier
+ self.group_id = group_id
+
+
+class PrivateLinkResource(msrest.serialization.Model):
+ """PrivateLinkResource.
+
+ :param id: Specifies the id of private link resource.
+ :type id: str
+ :param name: Specifies the name of private link resource.
+ :type name: str
+ :param type: Specifies the type of private link resource.
+ :type type: str
+ :param group_id: Specifies the group id of private link resource.
+ :type group_id: str
+ :param required_members: Specifies the required memebrs of private link resource.
+ :type required_members: list[str]
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'group_id': {'key': 'groupId', 'type': 'str'},
+ 'required_members': {'key': 'requiredMembers', 'type': '[str]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ id: Optional[str] = None,
+ name: Optional[str] = None,
+ type: Optional[str] = None,
+ group_id: Optional[str] = None,
+ required_members: Optional[List[str]] = None,
+ **kwargs
+ ):
+ super(PrivateLinkResource, self).__init__(**kwargs)
+ self.id = id
+ self.name = name
+ self.type = type
+ self.group_id = group_id
+ self.required_members = required_members
+
+
+class PrivateLinkResources(msrest.serialization.Model):
+ """PrivateLinkResources.
+
+ :param value: Specifies the private link resource.
+ :type value: list[~power_bi_private_link_service_management_client.models.PrivateLinkResource]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[PrivateLinkResource]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["PrivateLinkResource"]] = None,
+ **kwargs
+ ):
+ super(PrivateLinkResources, self).__init__(**kwargs)
+ self.value = value
+
+
+class PrivateLinkServiceConnection(msrest.serialization.Model):
+ """PrivateLinkServiceConnection.
+
+ :param name: Specifies the name of the private link service connection.
+ :type name: str
+ :param group_ids: Specifies the group ids of the private link service connection.
+ :type group_ids: list[str]
+ :param request_message: Specifies the request message of the private link service connection.
+ :type request_message: str
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'group_ids': {'key': 'groupIds', 'type': '[str]'},
+ 'request_message': {'key': 'requestMessage', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ group_ids: Optional[List[str]] = None,
+ request_message: Optional[str] = None,
+ **kwargs
+ ):
+ super(PrivateLinkServiceConnection, self).__init__(**kwargs)
+ self.name = name
+ self.group_ids = group_ids
+ self.request_message = request_message
+
+
+class PrivateLinkServiceProxy(msrest.serialization.Model):
+ """PrivateLinkServiceProxy.
+
+ :param id: Specifies the id of the private link service proxy.
+ :type id: str
+ :param group_connectivity_information: Specifies the group connectivity information of the
+ private link service proxy.
+ :type group_connectivity_information:
+ list[~power_bi_private_link_service_management_client.models.GroupConnectivityInformation]
+ :param remote_private_link_service_connection_state: Specifies the connection state of the
+ private link service proxy.
+ :type remote_private_link_service_connection_state:
+ ~power_bi_private_link_service_management_client.models.ConnectionState
+ :param remote_private_endpoint_connection: Specifies the private endpoint connection of the
+ private link service proxy.
+ :type remote_private_endpoint_connection:
+ ~power_bi_private_link_service_management_client.models.RemotePrivateEndpointConnection
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'group_connectivity_information': {'key': 'groupConnectivityInformation', 'type': '[GroupConnectivityInformation]'},
+ 'remote_private_link_service_connection_state': {'key': 'remotePrivateLinkServiceConnectionState', 'type': 'ConnectionState'},
+ 'remote_private_endpoint_connection': {'key': 'remotePrivateEndpointConnection', 'type': 'RemotePrivateEndpointConnection'},
+ }
+
+ def __init__(
+ self,
+ *,
+ id: Optional[str] = None,
+ group_connectivity_information: Optional[List["GroupConnectivityInformation"]] = None,
+ remote_private_link_service_connection_state: Optional["ConnectionState"] = None,
+ remote_private_endpoint_connection: Optional["RemotePrivateEndpointConnection"] = None,
+ **kwargs
+ ):
+ super(PrivateLinkServiceProxy, self).__init__(**kwargs)
+ self.id = id
+ self.group_connectivity_information = group_connectivity_information
+ self.remote_private_link_service_connection_state = remote_private_link_service_connection_state
+ self.remote_private_endpoint_connection = remote_private_endpoint_connection
+
+
+class RemotePrivateEndpoint(msrest.serialization.Model):
+ """RemotePrivateEndpoint.
+
+ :param id: Specifies the id of the private endpoint.
+ :type id: str
+ :param manual_private_link_service_connections: Specifies the private link service connections
+ of the private endpoint.
+ :type manual_private_link_service_connections:
+ list[~power_bi_private_link_service_management_client.models.PrivateLinkServiceConnection]
+ :param private_link_service_connections: Specifies the private link service connections of the
+ private endpoint.
+ :type private_link_service_connections:
+ list[~power_bi_private_link_service_management_client.models.PrivateLinkServiceConnection]
+ :param private_link_service_proxies: Specifies the private link service proxies of the private
+ endpoint.
+ :type private_link_service_proxies:
+ list[~power_bi_private_link_service_management_client.models.PrivateLinkServiceProxy]
+ :param connection_details: Specifies the connection details of the private endpoint.
+ :type connection_details:
+ list[~power_bi_private_link_service_management_client.models.PrivateLinkConnectionDetail]
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'manual_private_link_service_connections': {'key': 'manualPrivateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'},
+ 'private_link_service_connections': {'key': 'privateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'},
+ 'private_link_service_proxies': {'key': 'privateLinkServiceProxies', 'type': '[PrivateLinkServiceProxy]'},
+ 'connection_details': {'key': 'connectionDetails', 'type': '[PrivateLinkConnectionDetail]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ id: Optional[str] = None,
+ manual_private_link_service_connections: Optional[List["PrivateLinkServiceConnection"]] = None,
+ private_link_service_connections: Optional[List["PrivateLinkServiceConnection"]] = None,
+ private_link_service_proxies: Optional[List["PrivateLinkServiceProxy"]] = None,
+ connection_details: Optional[List["PrivateLinkConnectionDetail"]] = None,
+ **kwargs
+ ):
+ super(RemotePrivateEndpoint, self).__init__(**kwargs)
+ self.id = id
+ self.manual_private_link_service_connections = manual_private_link_service_connections
+ self.private_link_service_connections = private_link_service_connections
+ self.private_link_service_proxies = private_link_service_proxies
+ self.connection_details = connection_details
+
+
+class RemotePrivateEndpointConnection(msrest.serialization.Model):
+ """RemotePrivateEndpointConnection.
+
+ :param id: Specifies the id of private endpoint connection.
+ :type id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ id: Optional[str] = None,
+ **kwargs
+ ):
+ super(RemotePrivateEndpointConnection, self).__init__(**kwargs)
+ self.id = id
+
+
+class TenantResource(msrest.serialization.Model):
+ """TenantResource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Specifies the resource identifier of the resource.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param location: Specifies the location of the resource.
+ :type location: str
+ :param tags: A set of tags. Specifies the tags of the resource.
+ :type tags: dict[str, str]
+ :param tenant_id: Specifies the tenant id of the resource.
+ :type tenant_id: str
+ :param private_endpoint_connections: Specifies the private endpoint connections of the
+ resource.
+ :type private_endpoint_connections:
+ list[~power_bi_private_link_service_management_client.models.PrivateEndpointConnection]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
+ 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ location: Optional[str] = None,
+ tags: Optional[Dict[str, str]] = None,
+ tenant_id: Optional[str] = None,
+ private_endpoint_connections: Optional[List["PrivateEndpointConnection"]] = None,
+ **kwargs
+ ):
+ super(TenantResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = location
+ self.tags = tags
+ self.tenant_id = tenant_id
+ self.private_endpoint_connections = private_endpoint_connections
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/_power_bi_private_link_service_management_client_enums.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/_power_bi_private_link_service_management_client_enums.py
new file mode 100644
index 00000000000..1df52583c07
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/models/_power_bi_private_link_service_management_client_enums.py
@@ -0,0 +1,43 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from enum import Enum, EnumMeta
+from six import with_metaclass
+
+class _CaseInsensitiveEnumMeta(EnumMeta):
+ def __getitem__(self, name):
+ return super().__getitem__(name.upper())
+
+ def __getattr__(cls, name):
+ """Return the enum member matching `name`
+ We use __getattr__ instead of descriptors or inserting into the enum
+ class' __dict__ in order to support `name` and `value` being both
+ properties for enum members (which live in the class' __dict__) and
+ enum members themselves.
+ """
+ try:
+ return cls._member_map_[name.upper()]
+ except KeyError:
+ raise AttributeError(name)
+
+
+class ActionsRequired(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """ActionsRequired
+ """
+
+ NONE = "None"
+ RECREATE = "Recreate"
+
+class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """ConnectionStatus
+ """
+
+ PENDING = "Pending"
+ APPROVED = "Approved"
+ REJECTED = "Rejected"
+ DISCONNECTED = "Disconnected"
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/operations/__init__.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/operations/__init__.py
new file mode 100644
index 00000000000..fe0a53bec36
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/operations/__init__.py
@@ -0,0 +1,13 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._private_link_services_for_power_bi_operations import PrivateLinkServicesForPowerBiOperations
+
+__all__ = [
+ 'PrivateLinkServicesForPowerBiOperations',
+]
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/operations/_private_link_services_for_power_bi_operations.py b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/operations/_private_link_services_for_power_bi_operations.py
new file mode 100644
index 00000000000..de3f28cc2e8
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/operations/_private_link_services_for_power_bi_operations.py
@@ -0,0 +1,1090 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# 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 Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import TYPE_CHECKING
+import warnings
+
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import HttpRequest, HttpResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.arm_polling import ARMPolling
+
+from .. import models
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
+
+ T = TypeVar('T')
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+class PrivateLinkServicesForPowerBiOperations(object):
+ """PrivateLinkServicesForPowerBiOperations operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~power_bi_private_link_service_management_client.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ def list_available_operations(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["models.OperationList"]
+ """Indicates which operations can be performed by the Power BI Resource Provider.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either OperationList or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~power_bi_private_link_service_management_client.models.OperationList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_available_operations.metadata['url'] # type: ignore
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize('OperationList', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ error = self._deserialize(models.Error, response)
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list_available_operations.metadata = {'url': '/providers/Microsoft.PowerBI/operations'} # type: ignore
+
+ def list_by_subscription_id(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> List["models.TenantResource"]
+ """Gets all the private link resources for the given subscription id.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: list of TenantResource, or the result of cls(response)
+ :rtype: list[~power_bi_private_link_service_management_client.models.TenantResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[List["models.TenantResource"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_by_subscription_id.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('[TenantResource]', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI'} # type: ignore
+
+ def get_private_link_service_resource_operation_result(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.AsyncOperationDetail"
+ """Gets operation result of Private Link Service Resources for Power BI.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: AsyncOperationDetail, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.AsyncOperationDetail
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.AsyncOperationDetail"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get_private_link_service_resource_operation_result.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'operationId': self._serialize.url("self._config.operation_id", self._config.operation_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('AsyncOperationDetail', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get_private_link_service_resource_operation_result.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/operationResults/{operationId}'} # type: ignore
+
+ def list_by_resource_group(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> List["models.TenantResource"]
+ """Gets all the private link resources for the given resource group.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: list of TenantResource, or the result of cls(response)
+ :rtype: list[~power_bi_private_link_service_management_client.models.TenantResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[List["models.TenantResource"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('[TenantResource]', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI'} # type: ignore
+
+ def list_by_resource_name(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> List["models.TenantResource"]
+ """Gets all the private link resources for the given Azure resource.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: list of TenantResource, or the result of cls(response)
+ :rtype: list[~power_bi_private_link_service_management_client.models.TenantResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[List["models.TenantResource"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_by_resource_name.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('[TenantResource]', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_by_resource_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}'} # type: ignore
+
+ def create_or_update_private_link_service(
+ self,
+ body, # type: "models.TenantResource"
+ client_tenant_id=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.TenantResource"
+ """Creates or updates a Private Link Service Resource for Power BI.
+
+ :param body: Tenant resource to be created or updated.
+ :type body: ~power_bi_private_link_service_management_client.models.TenantResource
+ :param client_tenant_id: The client tenant id in header. This is a GUID-formatted string (e.g.
+ 00000000-0000-0000-0000-000000000000).
+ :type client_tenant_id: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: TenantResource, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.TenantResource
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.TenantResource"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update_private_link_service.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ if client_tenant_id is not None:
+ header_parameters['x-ms-client-tenant-id'] = self._serialize.header("client_tenant_id", client_tenant_id, 'str')
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(body, 'TenantResource')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('TenantResource', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update_private_link_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}'} # type: ignore
+
+ def delete_private_link_service(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ """Deletes a Private Link Service Resource for Power BI.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+
+ # Construct URL
+ url = self.delete_private_link_service.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ delete_private_link_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}'} # type: ignore
+
+ def list_private_link_resources(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["models.PrivateLinkResources"]
+ """Gets Private Link Resources for Power BI by resource group and resource name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either PrivateLinkResources or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~power_bi_private_link_service_management_client.models.PrivateLinkResources]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResources"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2020-06-01"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_private_link_resources.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize('PrivateLinkResources', pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ error = self._deserialize(models.Error, response)
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateLinkResources'} # type: ignore
+
+ def get_private_endpoint_connection_proxy(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.PrivateEndpointConnectionProxy"
+ """Synchronous API called by NRP to get private endpoint connection proxy for Power BI by private endpoint name.
+
+ Gets private endpoint connection proxy for Power BI by private endpoint name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PrivateEndpointConnectionProxy, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxy
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionProxy"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get_private_endpoint_connection_proxy.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('PrivateEndpointConnectionProxy', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get_private_endpoint_connection_proxy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ def _create_or_update_private_endpoint_connection_proxy_initial(
+ self,
+ body, # type: "models.PrivateEndpointConnectionProxy"
+ client_tenant_id=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.PrivateEndpointConnectionProxyResource"
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionProxyResource"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self._create_or_update_private_endpoint_connection_proxy_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ if client_tenant_id is not None:
+ header_parameters['x-ms-client-tenant-id'] = self._serialize.header("client_tenant_id", client_tenant_id, 'str')
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(body, 'PrivateEndpointConnectionProxy')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+ deserialized = self._deserialize('PrivateEndpointConnectionProxyResource', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+ _create_or_update_private_endpoint_connection_proxy_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ def begin_create_or_update_private_endpoint_connection_proxy(
+ self,
+ body, # type: "models.PrivateEndpointConnectionProxy"
+ client_tenant_id=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> LROPoller["models.PrivateEndpointConnectionProxyResource"]
+ """Creates or updates private endpoint connection proxy for Power BI by private endpoint name.
+
+ :param body: The PrivateEndpointConnectionProxy to be created or updated.
+ :type body: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxy
+ :param client_tenant_id: The client tenant id in header. This is a GUID-formatted string (e.g.
+ 00000000-0000-0000-0000-000000000000).
+ :type client_tenant_id: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :return: An instance of LROPoller that returns either PrivateEndpointConnectionProxyResource or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxyResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionProxyResource"]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._create_or_update_private_endpoint_connection_proxy_initial(
+ body=body,
+ client_tenant_id=client_tenant_id,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ response_headers = {}
+ response = pipeline_response.http_response
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+ deserialized = self._deserialize('PrivateEndpointConnectionProxyResource', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+ return deserialized
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ begin_create_or_update_private_endpoint_connection_proxy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ def _delete_private_endpoint_connection_proxy_initial(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ # Construct URL
+ url = self._delete_private_endpoint_connection_proxy_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_private_endpoint_connection_proxy_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ def begin_delete_private_endpoint_connection_proxy(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> LROPoller[None]
+ """Deletes a private endpoint connection proxy for Power BI by private endpoint name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._delete_private_endpoint_connection_proxy_initial(
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ begin_delete_private_endpoint_connection_proxy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ def validate_private_endpoint_connection_proxy(
+ self,
+ body, # type: "models.PrivateEndpointConnectionProxy"
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.PrivateEndpointConnectionProxy"
+ """Synchronous API called by NRP to validate a private endpoint before create or update.
+
+ Validates a private endpoint connection before create or update.
+
+ :param body: The PrivateEndpointConnectionProxy to be created or updated.
+ :type body: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxy
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PrivateEndpointConnectionProxy, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnectionProxy
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionProxy"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.validate_private_endpoint_connection_proxy.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(body, 'PrivateEndpointConnectionProxy')
+ body_content_kwargs['content'] = body_content
+ request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('PrivateEndpointConnectionProxy', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ validate_private_endpoint_connection_proxy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnectionProxies/{privateEndpointName}.{privateEndpointGuid}/validate'} # type: ignore
+
+ def get_private_endpoint_connection(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.PrivateEndpointConnection"
+ """Gets private endpoint connection for Power BI by private endpoint name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PrivateEndpointConnection, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnection
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get_private_endpoint_connection.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ def create_or_update_private_endpoint_connection_status(
+ self,
+ body, # type: "models.PrivateEndpointConnection"
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "models.PrivateEndpointConnection"
+ """Updates the status of Private Endpoint Connection object. Used to approve or reject a
+ connection.
+
+ :param body: Private endpoint connection to update.
+ :type body: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnection
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PrivateEndpointConnection, or the result of cls(response)
+ :rtype: ~power_bi_private_link_service_management_client.models.PrivateEndpointConnection
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.create_or_update_private_endpoint_connection_status.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(body, 'PrivateEndpointConnection')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ create_or_update_private_endpoint_connection_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ def _delete_private_endpoint_connection_initial(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ accept = "application/json"
+
+ # Construct URL
+ url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize(models.Error, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
+
+ def begin_delete_private_endpoint_connection(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> LROPoller[None]
+ """Asynchronous API to delete a private endpoint connection for Power BI by private endpoint name.
+
+ Deletes a private endpoint connection for Power BI by private endpoint name.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._delete_private_endpoint_connection_initial(
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("self._config.resource_group_name", self._config.resource_group_name, 'str'),
+ 'azureResourceName': self._serialize.url("self._config.azure_resource_name", self._config.azure_resource_name, 'str'),
+ 'privateEndpointName': self._serialize.url("self._config.private_endpoint_name", self._config.private_endpoint_name, 'str'),
+ 'privateEndpointGuid': self._serialize.url("self._config.private_endpoint_guid", self._config.private_endpoint_guid, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}.{privateEndpointGuid}'} # type: ignore
diff --git a/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/py.typed b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/py.typed
new file mode 100644
index 00000000000..e5aff4f83af
--- /dev/null
+++ b/src/powerbiprivatelinks/azext_powerbiprivatelinks/vendored_sdks/powerbiprivatelinks/py.typed
@@ -0,0 +1 @@
+# Marker file for PEP 561.
\ No newline at end of file
diff --git a/src/powerbiprivatelinks/report.md b/src/powerbiprivatelinks/report.md
new file mode 100644
index 00000000000..685accb5b49
--- /dev/null
+++ b/src/powerbiprivatelinks/report.md
@@ -0,0 +1,222 @@
+# Azure CLI Module Creation Report
+
+## EXTENSION
+|CLI Extension|Command Groups|
+|---------|------------|
+|az powerbiprivatelinks|[groups](#CommandGroups)
+
+## GROUPS
+### Command groups in `az powerbiprivatelinks` extension
+|CLI Command Group|Group Swagger name|Commands|
+|---------|------------|--------|
+|az powerbiprivatelinks private-link-service-for-power-bi|privateLinkServicesForPowerBI|[commands](#CommandsInprivateLinkServicesForPowerBI)|
+
+## COMMANDS
+### Commands in `az powerbiprivatelinks private-link-service-for-power-bi` group
+|CLI Command|Operation Swagger name|Parameters|Examples|
+|---------|------------|--------|-----------|
+|[az powerbiprivatelinks private-link-service-for-power-bi list](#privateLinkServicesForPowerBIListByResourceName)|ListByResourceName|[Parameters](#ParametersprivateLinkServicesForPowerBIListByResourceName)|[Example](#ExamplesprivateLinkServicesForPowerBIListByResourceName)|
+|[az powerbiprivatelinks private-link-service-for-power-bi list](#privateLinkServicesForPowerBIListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersprivateLinkServicesForPowerBIListByResourceGroup)|[Example](#ExamplesprivateLinkServicesForPowerBIListByResourceGroup)|
+|[az powerbiprivatelinks private-link-service-for-power-bi list](#privateLinkServicesForPowerBIListBySubscriptionId)|ListBySubscriptionId|[Parameters](#ParametersprivateLinkServicesForPowerBIListBySubscriptionId)|[Example](#ExamplesprivateLinkServicesForPowerBIListBySubscriptionId)|
+|[az powerbiprivatelinks private-link-service-for-power-bi create](#privateLinkServicesForPowerBICreateOrUpdatePrivateEndpointConnectionProxy)|CreateOrUpdatePrivateEndpointConnectionProxy|[Parameters](#ParametersprivateLinkServicesForPowerBICreateOrUpdatePrivateEndpointConnectionProxy)|[Example](#ExamplesprivateLinkServicesForPowerBICreateOrUpdatePrivateEndpointConnectionProxy)|
+|[az powerbiprivatelinks private-link-service-for-power-bi create](#privateLinkServicesForPowerBICreateOrUpdatePrivateEndpointConnectionStatus)|CreateOrUpdatePrivateEndpointConnectionStatus|[Parameters](#ParametersprivateLinkServicesForPowerBICreateOrUpdatePrivateEndpointConnectionStatus)|[Example](#ExamplesprivateLinkServicesForPowerBICreateOrUpdatePrivateEndpointConnectionStatus)|
+|[az powerbiprivatelinks private-link-service-for-power-bi create](#privateLinkServicesForPowerBICreateOrUpdatePrivateLinkService)|CreateOrUpdatePrivateLinkService|[Parameters](#ParametersprivateLinkServicesForPowerBICreateOrUpdatePrivateLinkService)|[Example](#ExamplesprivateLinkServicesForPowerBICreateOrUpdatePrivateLinkService)|
+|[az powerbiprivatelinks private-link-service-for-power-bi delete](#privateLinkServicesForPowerBIDeletePrivateEndpointConnectionProxy)|DeletePrivateEndpointConnectionProxy|[Parameters](#ParametersprivateLinkServicesForPowerBIDeletePrivateEndpointConnectionProxy)|[Example](#ExamplesprivateLinkServicesForPowerBIDeletePrivateEndpointConnectionProxy)|
+|[az powerbiprivatelinks private-link-service-for-power-bi delete](#privateLinkServicesForPowerBIDeletePrivateEndpointConnection)|DeletePrivateEndpointConnection|[Parameters](#ParametersprivateLinkServicesForPowerBIDeletePrivateEndpointConnection)|[Example](#ExamplesprivateLinkServicesForPowerBIDeletePrivateEndpointConnection)|
+|[az powerbiprivatelinks private-link-service-for-power-bi delete](#privateLinkServicesForPowerBIDeletePrivateLinkService)|DeletePrivateLinkService|[Parameters](#ParametersprivateLinkServicesForPowerBIDeletePrivateLinkService)|[Example](#ExamplesprivateLinkServicesForPowerBIDeletePrivateLinkService)|
+|[az powerbiprivatelinks private-link-service-for-power-bi list-available-operation](#privateLinkServicesForPowerBIListAvailableOperations)|ListAvailableOperations|[Parameters](#ParametersprivateLinkServicesForPowerBIListAvailableOperations)|[Example](#ExamplesprivateLinkServicesForPowerBIListAvailableOperations)|
+|[az powerbiprivatelinks private-link-service-for-power-bi list-private-link-resource](#privateLinkServicesForPowerBIListPrivateLinkResources)|ListPrivateLinkResources|[Parameters](#ParametersprivateLinkServicesForPowerBIListPrivateLinkResources)|[Example](#ExamplesprivateLinkServicesForPowerBIListPrivateLinkResources)|
+|[az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection](#privateLinkServicesForPowerBIGetPrivateEndpointConnection)|GetPrivateEndpointConnection|[Parameters](#ParametersprivateLinkServicesForPowerBIGetPrivateEndpointConnection)|[Example](#ExamplesprivateLinkServicesForPowerBIGetPrivateEndpointConnection)|
+|[az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection-proxy](#privateLinkServicesForPowerBIGetPrivateEndpointConnectionProxy)|GetPrivateEndpointConnectionProxy|[Parameters](#ParametersprivateLinkServicesForPowerBIGetPrivateEndpointConnectionProxy)|[Example](#ExamplesprivateLinkServicesForPowerBIGetPrivateEndpointConnectionProxy)|
+|[az powerbiprivatelinks private-link-service-for-power-bi show-private-link-service-resource-operation-result](#privateLinkServicesForPowerBIGetPrivateLinkServiceResourceOperationResult)|GetPrivateLinkServiceResourceOperationResult|[Parameters](#ParametersprivateLinkServicesForPowerBIGetPrivateLinkServiceResourceOperationResult)|[Example](#ExamplesprivateLinkServicesForPowerBIGetPrivateLinkServiceResourceOperationResult)|
+|[az powerbiprivatelinks private-link-service-for-power-bi validate-private-endpoint-connection-proxy](#privateLinkServicesForPowerBIValidatePrivateEndpointConnectionProxy)|ValidatePrivateEndpointConnectionProxy|[Parameters](#ParametersprivateLinkServicesForPowerBIValidatePrivateEndpointConnectionProxy)|[Example](#ExamplesprivateLinkServicesForPowerBIValidatePrivateEndpointConnectionProxy)|
+
+
+## COMMAND DETAILS
+
+### group `az powerbiprivatelinks private-link-service-for-power-bi`
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi list`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi list
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi list`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi list
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi list`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi list
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi create`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi create --connection-details group-id="tenant" id="10001" \
+link-identifier="1253" member-name="tenant" private-ip-address="10.0.1.4" --remote-private-endpoint-id \
+"/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.Network/privateEn\
+dpoints/myPrivateEndpointName" --private-link-service-connections name="myPrivateEndpointConnection" \
+group-ids="tenant" request-message="opt msg" --private-link-service-proxies "[{\\"groupConnectivityInformation\\":[{\\"\
+customerVisibleFqdns\\":[\\"91cb8a3f79e644bea2dedce59f8c0107-api.analysis.windows.net\\"],\\"groupId\\":\\"tenant\\",\\\
+"internalFqdn\\":\\"91cb8a3f79e644bea2dedce59f8c0107-api.analysis.windows.net\\",\\"memberName\\":\\"tenant\\",\\"priva\
+teLinkServiceArmRegion\\":\\"\\"}],\\"id\\":\\"/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resou\
+rceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName/privateLinkServiceProxies/azureResourceName\
+-proxy.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\",\\"remotePrivateEndpointConnection\\":{\\"id\\":\\"/subscriptions/a00208\
+69-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/a\
+zureResourceName/privateEndpointConnections/myPrivateEndpointName.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\"},\\"remotePri\
+vateLinkServiceConnectionState\\":{\\"description\\":\\"please approve\\",\\"actionsRequired\\":\\"None\\",\\"status\\"\
+:\\"Pending\\"}}]"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--client-tenant-id**|string|The client tenant id in header. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).|client_tenant_id|ClientTenantId|
+|**--id**|string|Specifies the id of the resource.|id|id|
+|**--name**|string|Specifies the name of the resource.|name|name|
+|**--type**|string|Specifies the type of the resource.|type|type|
+|**--location**|string|Specifies the location of the resource.|location|location|
+|**--etag**|string|Specifies the etag of the resource.|etag|etag|
+|**--remote-private-endpoint-id**|string|Specifies the id of the private endpoint.|remote_private_endpoint_id|id|
+|**--manual-private-link-service-connections**|array|Specifies the private link service connections of the private endpoint.|manual_private_link_service_connections|manualPrivateLinkServiceConnections|
+|**--private-link-service-connections**|array|Specifies the private link service connections of the private endpoint.|private_link_service_connections|privateLinkServiceConnections|
+|**--private-link-service-proxies**|array|Specifies the private link service proxies of the private endpoint.|private_link_service_proxies|privateLinkServiceProxies|
+|**--connection-details**|array|Specifies the connection details of the private endpoint.|connection_details|connectionDetails|
+
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi create`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi create --id "/subscriptions/a0020869-4d28-422a-89f4-c2413130d7\
+3c/resourceGroups/resourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName" \
+--private-link-service-connection-state description="" actions-required="None" status="Approved "
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--private-link-service-connection-state**|object|Specifies the connection state.|private_link_service_connection_state|privateLinkServiceConnectionState|
+
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi create`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi create --location "global" --tenant-id \
+"ac2bc297-8a3e-46f3-972d-87c2b4ae6e2f" --tags tag1="value1" tag2="value2"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--tags**|dictionary|Specifies the tags of the resource.|tags|tags|
+|**--tenant-id**|string|Specifies the tenant id of the resource.|tenant_id|tenantId|
+|**--private-endpoint-connections**|array|Specifies the private endpoint connections of the resource.|private_endpoint_connections|privateEndpointConnections|
+
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi delete`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi delete
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi delete`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi delete
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi delete`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi delete
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi list-available-operation`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi list-available-operation
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi list-private-link-resource`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi list-private-link-resource
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection-proxy`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi show-private-endpoint-connection-proxy
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi show-private-link-service-resource-operation-result`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi show-private-link-service-resource-operation-result
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+#### Command `az powerbiprivatelinks private-link-service-for-power-bi validate-private-endpoint-connection-proxy`
+
+##### Example
+```
+az powerbiprivatelinks private-link-service-for-power-bi validate-private-endpoint-connection-proxy \
+--remote-private-endpoint-id "/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups/resourceGroup/provider\
+s/Microsoft.Network/privateEndpoints/myPrivateEndpointName" --private-link-service-connections \
+name="myPrivateEndpointConnection" group-ids="tenant" request-message="opt msg" --private-link-service-proxies \
+"[{\\"groupConnectivityInformation\\":[],\\"id\\":\\"/subscriptions/a0020869-4d28-422a-89f4-c2413130d73c/resourceGroups\
+/resourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointName/privateLinkServiceProxies/azureResour\
+ceName-proxy.58ffb8de-89ad-41eb-9f8f-de0a7db9d721\\"}]"
+```
+##### Parameters
+|Option|Type|Description|Path (SDK)|Swagger name|
+|------|----|-----------|----------|------------|
+|**--id**|string|Specifies the id of the resource.|id|id|
+|**--name**|string|Specifies the name of the resource.|name|name|
+|**--type**|string|Specifies the type of the resource.|type|type|
+|**--location**|string|Specifies the location of the resource.|location|location|
+|**--etag**|string|Specifies the etag of the resource.|etag|etag|
+|**--remote-private-endpoint-id**|string|Specifies the id of the private endpoint.|remote_private_endpoint_id|id|
+|**--manual-private-link-service-connections**|array|Specifies the private link service connections of the private endpoint.|manual_private_link_service_connections|manualPrivateLinkServiceConnections|
+|**--private-link-service-connections**|array|Specifies the private link service connections of the private endpoint.|private_link_service_connections|privateLinkServiceConnections|
+|**--private-link-service-proxies**|array|Specifies the private link service proxies of the private endpoint.|private_link_service_proxies|privateLinkServiceProxies|
+|**--connection-details**|array|Specifies the connection details of the private endpoint.|connection_details|connectionDetails|
diff --git a/src/powerbiprivatelinks/setup.cfg b/src/powerbiprivatelinks/setup.cfg
new file mode 100644
index 00000000000..2fdd96e5d39
--- /dev/null
+++ b/src/powerbiprivatelinks/setup.cfg
@@ -0,0 +1 @@
+#setup.cfg
\ No newline at end of file
diff --git a/src/powerbiprivatelinks/setup.py b/src/powerbiprivatelinks/setup.py
new file mode 100644
index 00000000000..80570da059d
--- /dev/null
+++ b/src/powerbiprivatelinks/setup.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+
+from codecs import open
+from setuptools import setup, find_packages
+
+# HISTORY.rst entry.
+VERSION = '0.1.0'
+try:
+ from azext_powerbiprivatelinks.manual.version import VERSION
+except ImportError:
+ pass
+
+# The full list of classifiers is available at
+# https://pypi.python.org/pypi?%3Aaction=list_classifiers
+CLASSIFIERS = [
+ 'Development Status :: 4 - Beta',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: System Administrators',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'License :: OSI Approved :: MIT License',
+]
+
+DEPENDENCIES = []
+
+try:
+ from azext_powerbiprivatelinks.manual.dependency import DEPENDENCIES
+except ImportError:
+ pass
+
+with open('README.md', 'r', encoding='utf-8') as f:
+ README = f.read()
+with open('HISTORY.rst', 'r', encoding='utf-8') as f:
+ HISTORY = f.read()
+
+setup(
+ name='powerbiprivatelinks',
+ version=VERSION,
+ description='Microsoft Azure Command-Line Tools PowerBIPrivateLinkServiceManagementClient Extension',
+ author='Microsoft Corporation',
+ author_email='azpycli@microsoft.com',
+ url='https://github.com/Azure/azure-cli-extensions/tree/master/src/powerbiprivatelinks',
+ long_description=README + '\n\n' + HISTORY,
+ license='MIT',
+ classifiers=CLASSIFIERS,
+ packages=find_packages(),
+ install_requires=DEPENDENCIES,
+ package_data={'azext_powerbiprivatelinks': ['azext_metadata.json']},
+)