зеркало из https://github.com/microsoft/azure-cli.git
[Synapse] Add workspace, sparkpool, sqlpool related cmdlets (#14755)
This commit is contained in:
Родитель
414b4bdbd8
Коммит
4bf79e6ec5
|
@ -43,3 +43,4 @@
|
|||
/src/azure-cli/azure/cli/command_modules/iot/ @digimaun
|
||||
/src/azure-cli/azure/cli/command_modules/aro/ @mjudeikis @jim-minter
|
||||
/src/azure-cli/azure/cli/command_modules/util/ @jiasli @Juliehzl @zhoxing-ms
|
||||
/src/azure-cli/azure/cli/command_modules/synapse/ @idear1203 @sunsw1994 @aim-for-better
|
||||
|
|
|
@ -935,6 +935,18 @@
|
|||
<Compile Include="azure-cli\azure\cli\command_modules\storage\_transformers.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\storage\_validators.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\storage\__init__.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\operations\__init__.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\_client_factory.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\_help.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\_params.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\_validators.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\__init__.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\commands.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\constant.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\operations\sparkpool.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\operations\workspace.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\operations\sqlpool.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\synapse\tests\latest\test_synapse_scenario.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\vm\commands.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\vm\custom.py" />
|
||||
<Compile Include="azure-cli\azure\cli\command_modules\vm\disk_encryption.py" />
|
||||
|
@ -1193,6 +1205,10 @@
|
|||
<Folder Include="azure-cli\azure\cli\command_modules\storage\operations\" />
|
||||
<Folder Include="azure-cli\azure\cli\command_modules\storage\tests\" />
|
||||
<Folder Include="azure-cli\azure\cli\command_modules\storage\tests\latest\" />
|
||||
<Folder Include="azure-cli\azure\cli\command_modules\synapse\" />
|
||||
<Folder Include="azure-cli\azure\cli\command_modules\synapse\operations\" />
|
||||
<Folder Include="azure-cli\azure\cli\command_modules\synapse\tests\" />
|
||||
<Folder Include="azure-cli\azure\cli\command_modules\synapse\tests\latest\" />
|
||||
<Folder Include="azure-cli\azure\cli\command_modules\vm\" />
|
||||
<Folder Include="azure-cli\azure\cli\command_modules\vm\tests\" />
|
||||
<Folder Include="azure-cli\azure\cli\command_modules\vm\tests\latest\" />
|
||||
|
|
|
@ -74,5 +74,6 @@
|
|||
"managedservices": "src/azure-cli/azure/cli/command_modules/managedservices/_help.py",
|
||||
"apim": "src/azure-cli/azure/cli/command_modules/apim/_help.py",
|
||||
"aro": "src/azure-cli/azure/cli/command_modules/aro/_help.py",
|
||||
"util": "src/azure-cli/azure/cli/command_modules/util/_help.py"
|
||||
"util": "src/azure-cli/azure/cli/command_modules/util/_help.py",
|
||||
"synapse": "src/azure-cli/azure/cli/command_modules/synapse/_help.py"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from azure.cli.core import AzCommandsLoader
|
||||
from azure.cli.command_modules.synapse._help import helps # pylint: disable=unused-import
|
||||
|
||||
|
||||
# pylint: disable=line-too-long
|
||||
class SynapseCommandsLoader(AzCommandsLoader):
|
||||
def __init__(self, cli_ctx=None):
|
||||
from azure.cli.core.commands import CliCommandType
|
||||
from azure.cli.command_modules.synapse._client_factory import cf_synapse
|
||||
synapse_custom = CliCommandType(
|
||||
operations_tmpl='azure.cli.command_modules.synapse.custom#{}',
|
||||
client_factory=cf_synapse,
|
||||
operation_group='synapse')
|
||||
|
||||
super(SynapseCommandsLoader, self).__init__(cli_ctx=cli_ctx, operation_group='synapse', custom_command_type=synapse_custom)
|
||||
|
||||
def load_command_table(self, args):
|
||||
from azure.cli.command_modules.synapse.commands import load_command_table
|
||||
load_command_table(self, args)
|
||||
return self.command_table
|
||||
|
||||
def load_arguments(self, command):
|
||||
from azure.cli.command_modules.synapse._params import load_arguments
|
||||
load_arguments(self, command)
|
||||
|
||||
|
||||
COMMAND_LOADER_CLS = SynapseCommandsLoader
|
|
@ -0,0 +1,30 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
def cf_synapse(cli_ctx, *_):
|
||||
|
||||
from azure.cli.core.commands.client_factory import get_mgmt_service_client
|
||||
from azure.mgmt.synapse import SynapseManagementClient
|
||||
return get_mgmt_service_client(cli_ctx, SynapseManagementClient)
|
||||
|
||||
|
||||
def cf_synapse_client_workspace_factory(cli_ctx, *_):
|
||||
return cf_synapse(cli_ctx).workspaces
|
||||
|
||||
|
||||
def cf_synapse_client_bigdatapool_factory(cli_ctx, *_):
|
||||
return cf_synapse(cli_ctx).big_data_pools
|
||||
|
||||
|
||||
def cf_synapse_client_sqlpool_factory(cli_ctx, *_):
|
||||
return cf_synapse(cli_ctx).sql_pools
|
||||
|
||||
|
||||
def cf_synapse_client_ipfirewallrules_factory(cli_ctx, *_):
|
||||
return cf_synapse(cli_ctx).ip_firewall_rules
|
||||
|
||||
|
||||
def cf_synapse_client_operations_factory(cli_ctx, *_):
|
||||
return cf_synapse(cli_ctx).operations
|
|
@ -0,0 +1,281 @@
|
|||
# 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.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from knack.help_files import helps
|
||||
|
||||
|
||||
helps['synapse'] = """
|
||||
type: group
|
||||
short-summary: Manage and operate Synapse Workspace, Spark Pool, SQL Pool.
|
||||
"""
|
||||
|
||||
helps['synapse workspace'] = """
|
||||
type: group
|
||||
short-summary: Manage Synapse workspaces.
|
||||
"""
|
||||
|
||||
helps['synapse workspace create'] = """
|
||||
type: command
|
||||
short-summary: Create a Synapse workspace.
|
||||
examples:
|
||||
- name: Create a Synapse workspace
|
||||
text: |-
|
||||
az synapse workspace create --name fromcli4 --resource-group rg \\
|
||||
--storage-account testadlsgen2 --file-system testfilesystem \\
|
||||
--sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US"
|
||||
- name: Create a Synapse workspace with storage resource id
|
||||
text: |-
|
||||
az synapse workspace create --name fromcli4 --resource-group rg \\
|
||||
--storage-account /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/testadlsgen2 --file-system testfilesystem \\
|
||||
--sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US"
|
||||
"""
|
||||
|
||||
helps['synapse workspace list'] = """
|
||||
type: command
|
||||
short-summary: List all Synapse workspaces.
|
||||
examples:
|
||||
- name: List all Synapse workspaces under a subscription
|
||||
text: |-
|
||||
az synapse workspace list
|
||||
- name: List all Synapse workspaces under a specific resource group
|
||||
text: |-
|
||||
az synapse workspace list --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse workspace show'] = """
|
||||
type: command
|
||||
short-summary: Get a Synapse workspace.
|
||||
examples:
|
||||
- name: Get a Synapse workspace.
|
||||
text: |-
|
||||
az synapse workspace show --name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse workspace update'] = """
|
||||
type: command
|
||||
short-summary: Update a Synapse workspace.
|
||||
examples:
|
||||
- name: Update a Synapse workspace
|
||||
text: |-
|
||||
az synapse workspace update --name fromcli4 --resource-group rg \\
|
||||
--tags key1=value1
|
||||
"""
|
||||
|
||||
helps['synapse workspace delete'] = """
|
||||
type: command
|
||||
short-summary: Delete a Synapse workspace.
|
||||
examples:
|
||||
- name: Delete a Synapse workspace.
|
||||
text: |-
|
||||
az synapse workspace delete --name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse workspace check-name'] = """
|
||||
type: command
|
||||
short-summary: Check if a Synapse workspace name is available or not.
|
||||
examples:
|
||||
- name: Check if a Synapse workspace name is available or not.
|
||||
text: |-
|
||||
az synapse workspace check-name --name testsynapseworkspace
|
||||
"""
|
||||
|
||||
helps['synapse workspace wait'] = """
|
||||
type: command
|
||||
short-summary: Place the CLI in a waiting state until a condition of the workspace is met.
|
||||
"""
|
||||
|
||||
helps['synapse spark'] = """
|
||||
type: group
|
||||
short-summary: Manage Spark pools and Spark jobs.
|
||||
"""
|
||||
|
||||
helps['synapse spark pool'] = """
|
||||
type: group
|
||||
short-summary: Manage Spark pools.
|
||||
"""
|
||||
|
||||
helps['synapse spark pool create'] = """
|
||||
type: command
|
||||
short-summary: Create a Spark pool.
|
||||
examples:
|
||||
- name: Create a Spark pool.
|
||||
text: |-
|
||||
az synapse spark pool create --name testpool --workspace-name testsynapseworkspace --resource-group rg \\
|
||||
--spark-version 2.4 --node-count 3 --node-size Medium
|
||||
"""
|
||||
|
||||
helps['synapse spark pool list'] = """
|
||||
type: command
|
||||
short-summary: List all Spark pools.
|
||||
examples:
|
||||
- name: List all Spark pools.
|
||||
text: |-
|
||||
az synapse spark pool list --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse spark pool show'] = """
|
||||
type: command
|
||||
short-summary: Get a Spark pool.
|
||||
examples:
|
||||
- name: Get a Spark pool.
|
||||
text: |-
|
||||
az synapse spark pool show --name testpool --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse spark pool update'] = """
|
||||
type: command
|
||||
short-summary: Update the Spark pool.
|
||||
examples:
|
||||
- name: Update the Spark pool's tags.
|
||||
text: |-
|
||||
az synapse spark pool update --name testpool --workspace-name testsynapseworkspace --resource-group rg \\
|
||||
--tags key1=value1
|
||||
- name: Update the Spark pool's auto scale configuration.
|
||||
text: |-
|
||||
az synapse spark pool update --name testpool --workspace-name testsynapseworkspace --resource-group rg \\
|
||||
--enable-auto-scale --min-node-count 3 --max-node-count 100
|
||||
"""
|
||||
|
||||
helps['synapse spark pool delete'] = """
|
||||
type: command
|
||||
short-summary: Delete a Spark pool.
|
||||
examples:
|
||||
- name: Delete a Spark pool.
|
||||
text: |-
|
||||
az synapse spark pool delete --name testpool --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse spark pool wait'] = """
|
||||
type: command
|
||||
short-summary: Place the CLI in a waiting state until a condition of a Spark pool is met.
|
||||
"""
|
||||
|
||||
helps['synapse sql'] = """
|
||||
type: group
|
||||
short-summary: Manage SQL pools.
|
||||
"""
|
||||
|
||||
helps['synapse sql pool'] = """
|
||||
type: group
|
||||
short-summary: Manage SQL pools.
|
||||
"""
|
||||
|
||||
helps['synapse sql pool create'] = """
|
||||
type: command
|
||||
short-summary: Create a SQL pool.
|
||||
examples:
|
||||
- name: Create a SQL pool.
|
||||
text: |-
|
||||
az synapse sql pool create --name sqlpoolcli1 --performance-level "DW1000c" \\
|
||||
--workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse sql pool show'] = """
|
||||
type: command
|
||||
short-summary: Get a SQL pool.
|
||||
examples:
|
||||
- name: Get a SQL pool.
|
||||
text: |-
|
||||
az synapse sql pool show --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse sql pool list'] = """
|
||||
type: command
|
||||
short-summary: List all SQL pools.
|
||||
examples:
|
||||
- name: List SQL pools.
|
||||
text: |-
|
||||
az synapse sql pool list --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse sql pool update'] = """
|
||||
type: command
|
||||
short-summary: Update a SQL pool.
|
||||
examples:
|
||||
- name: Update a SQL pool.
|
||||
text: |-
|
||||
az synapse sql pool update --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg \\
|
||||
--tags key1=value1
|
||||
"""
|
||||
|
||||
helps['synapse sql pool pause'] = """
|
||||
type: command
|
||||
short-summary: Pause a SQL pool.
|
||||
examples:
|
||||
- name: Pause a SQL pool.
|
||||
text: |-
|
||||
az synapse sql pool pause --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse sql pool resume'] = """
|
||||
type: command
|
||||
short-summary: Resume a SQL pool.
|
||||
examples:
|
||||
- name: Resume a SQL pool.
|
||||
text: |-
|
||||
az synapse sql pool resume --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse sql pool delete'] = """
|
||||
type: command
|
||||
short-summary: Delete a SQL pool.
|
||||
examples:
|
||||
- name: Delete a SQL pool.
|
||||
text: |-
|
||||
az synapse sql pool delete --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse sql pool wait'] = """
|
||||
type: command
|
||||
short-summary: Place the CLI in a waiting state until a condition of a SQL pool is met.
|
||||
"""
|
||||
|
||||
helps['synapse workspace firewall-rule'] = """
|
||||
type: group
|
||||
short-summary: Manage a workspace's firewall rules.
|
||||
"""
|
||||
|
||||
helps['synapse workspace firewall-rule create'] = """
|
||||
type: command
|
||||
short-summary: Create a firewall rule.
|
||||
examples:
|
||||
- name: Create a firewall rule.
|
||||
text: |-
|
||||
az synapse workspace firewall-rule create --name allowAll --workspace-name testsynapseworkspace \\
|
||||
--resource-group rg --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255
|
||||
"""
|
||||
|
||||
helps['synapse workspace firewall-rule show'] = """
|
||||
type: command
|
||||
short-summary: Get a firewall rule.
|
||||
examples:
|
||||
- name: Get a firewall rule.
|
||||
text: |-
|
||||
az synapse workspace firewall-rule show --name rule1 --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse workspace firewall-rule list'] = """
|
||||
type: command
|
||||
short-summary: List all firewall rules.
|
||||
examples:
|
||||
- name: List all firewall rules.
|
||||
text: |-
|
||||
az synapse workspace firewall-rule list --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse workspace firewall-rule delete'] = """
|
||||
type: command
|
||||
short-summary: Delete a firewall rule.
|
||||
examples:
|
||||
- name: Delete a firewall rule.
|
||||
text: |-
|
||||
az synapse workspace firewall-rule delete --name rule1 --workspace-name testsynapseworkspace --resource-group rg
|
||||
"""
|
||||
|
||||
helps['synapse workspace firewall-rule wait'] = """
|
||||
type: command
|
||||
short-summary: Place the CLI in a waiting state until a condition of a firewall rule is met.
|
||||
"""
|
|
@ -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.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from azure.cli.core.commands.parameters import name_type, tags_type, get_three_state_flag, get_enum_type
|
||||
from ._validators import validate_storage_account
|
||||
|
||||
|
||||
def load_arguments(self, _): # pylint: disable=too-many-statements
|
||||
# synapse workspace
|
||||
for scope in ['show', 'create', 'update', 'delete']:
|
||||
with self.argument_context('synapse workspace ' + scope) as c:
|
||||
c.argument('workspace_name', arg_type=name_type, id_part='name', help='The workspace name.')
|
||||
|
||||
for scope in ['create', 'update']:
|
||||
with self.argument_context('synapse workspace ' + scope) as c:
|
||||
c.argument('sql_admin_login_password', options_list=['--sql-admin-login-password', '-p'],
|
||||
help='The sql administrator login password.')
|
||||
c.argument('tags', arg_type=tags_type)
|
||||
|
||||
with self.argument_context('synapse workspace create') as c:
|
||||
c.argument("storage_account", validator=validate_storage_account,
|
||||
help='The data lake storage account name or resource id.')
|
||||
c.argument('file_system', help='The file system of the data lake storage account.')
|
||||
c.argument('sql_admin_login_user', options_list=['--sql-admin-login-user', '-u'],
|
||||
help='The sql administrator login user name.')
|
||||
|
||||
with self.argument_context('synapse workspace check-name') as c:
|
||||
c.argument('name', arg_type=name_type, help='The name you wanted to check.')
|
||||
|
||||
# synapse spark pool
|
||||
with self.argument_context('synapse spark pool') as c:
|
||||
c.argument('workspace_name', id_part='name', help='The workspace name.')
|
||||
|
||||
with self.argument_context('synapse spark pool list') as c:
|
||||
c.argument('workspace_name', id_part=None, help='The workspace name.')
|
||||
|
||||
for scope in ['show', 'create', 'update', 'delete']:
|
||||
with self.argument_context('synapse spark pool ' + scope) as c:
|
||||
c.argument('spark_pool_name', arg_type=name_type, id_part='child_name_1',
|
||||
help='The name of the Spark pool.')
|
||||
|
||||
with self.argument_context('synapse spark pool create') as c:
|
||||
# Node
|
||||
c.argument('node_count', type=int, arg_group='Node', help='The number of node.')
|
||||
c.argument('node_size_family', arg_group='Node', help='The node size family.')
|
||||
c.argument('node_size', arg_group='Node', arg_type=get_enum_type(['Small', 'Medium', 'Large']),
|
||||
help='The node size.')
|
||||
|
||||
# AutoScale
|
||||
c.argument('enable_auto_scale', arg_type=get_three_state_flag(), arg_group='AutoScale',
|
||||
help='The flag of enabling auto scale.')
|
||||
c.argument('max_node_count', type=int, arg_group='AutoScale', help='The max node count.')
|
||||
c.argument('min_node_count', type=int, arg_group='AutoScale', help='The min node count.')
|
||||
|
||||
# AutoPause
|
||||
c.argument('enable_auto_pause', arg_type=get_three_state_flag(), arg_group='AutoPause',
|
||||
help='The flag of enabling auto pause.')
|
||||
c.argument('delay', arg_group='AutoPause', help='The delay time whose unit is minute.')
|
||||
|
||||
# Environment Configuration
|
||||
c.argument('library_requirements', arg_group='Environment Configuration',
|
||||
help='The library requirements file.')
|
||||
|
||||
# Default Folder
|
||||
c.argument('spark_events_folder', arg_group='Default Folder', help='The Spark events folder.')
|
||||
c.argument('spark_log_folder', arg_group='Default Folder', help='The default Spark log folder.')
|
||||
|
||||
# Component Version
|
||||
c.argument('spark_version', arg_group='Component Version', help='The supported Spark version is 2.4 now.')
|
||||
|
||||
c.argument('tags', arg_type=tags_type)
|
||||
|
||||
with self.argument_context('synapse spark pool update') as c:
|
||||
c.argument('tags', arg_type=tags_type)
|
||||
# Node
|
||||
c.argument('node_count', type=int, arg_group='Node', help='The number of node.')
|
||||
c.argument('node_size_family', arg_group='Node', help='The node size family.')
|
||||
|
||||
c.argument('node_size', arg_group='Node', arg_type=get_enum_type(['Small', 'Medium', 'Large']),
|
||||
help='The node size.')
|
||||
# AutoScale
|
||||
c.argument('enable_auto_scale', arg_type=get_three_state_flag(), arg_group='AutoScale',
|
||||
help='The flag of enabling auto scale.')
|
||||
c.argument('max_node_count', type=int, arg_group='AutoScale', help='The max node count.')
|
||||
c.argument('min_node_count', type=int, arg_group='AutoScale', help='The min node count.')
|
||||
|
||||
# AutoPause
|
||||
c.argument('enable_auto_pause', arg_type=get_three_state_flag(), arg_group='AutoPause',
|
||||
help='The flag of enabling auto pause.')
|
||||
c.argument('delay', arg_group='AutoPause', help='The delay time whose unit is minute.')
|
||||
|
||||
# Environment Configuration
|
||||
c.argument('library_requirements', arg_group='Environment Configuration',
|
||||
help='The library requirements file.')
|
||||
c.argument('force', arg_type=get_three_state_flag(), help='The flag of force operation.')
|
||||
|
||||
# synapse sql pool
|
||||
with self.argument_context('synapse sql pool') as c:
|
||||
c.argument('workspace_name', id_part='name', help='The workspace name.')
|
||||
|
||||
with self.argument_context('synapse sql pool list') as c:
|
||||
c.argument('workspace_name', id_part=None, help='The workspace name.')
|
||||
|
||||
for scope in ['show', 'create', 'delete', 'update', 'pause', 'resume']:
|
||||
with self.argument_context('synapse sql pool ' + scope) as c:
|
||||
c.argument('sql_pool_name', arg_type=name_type, id_part='child_name_1', help='The SQL pool name.')
|
||||
|
||||
with self.argument_context('synapse sql pool create') as c:
|
||||
c.argument('performance_level', help='The performance level.')
|
||||
c.argument('source_database_id', help='The source database id.')
|
||||
c.argument('recoverable_database_id', help='The recoverable database id.')
|
||||
c.argument('tags', arg_type=tags_type)
|
||||
|
||||
with self.argument_context('synapse sql pool update') as c:
|
||||
c.argument('sku_name', options_list=['--performance-level'], help='The performance level.')
|
||||
c.argument('tags', arg_type=tags_type)
|
||||
|
||||
# synapse workspace firewall-rule
|
||||
with self.argument_context('synapse workspace firewall-rule') as c:
|
||||
c.argument('workspace_name', id_part='name', help='The workspace name.')
|
||||
|
||||
with self.argument_context('synapse workspace firewall-rule list') as c:
|
||||
c.argument('workspace_name', id_part=None, help='The workspace name.')
|
||||
|
||||
for scope in ['show', 'create', 'delete']:
|
||||
with self.argument_context('synapse workspace firewall-rule ' + scope) as c:
|
||||
c.argument('rule_name', arg_type=name_type, id_part='child_name_1', help='The IP firewall rule name')
|
||||
|
||||
with self.argument_context('synapse workspace firewall-rule create') as c:
|
||||
c.argument('start_ip_address', help='The start IP address of the firewall rule. Must be IPv4 format.')
|
||||
c.argument('end_ip_address', help='The end IP address of the firewall rule. Must be IPv4 format. '
|
||||
'Must be greater than or equal to startIpAddress.')
|
|
@ -0,0 +1,31 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
# pylint: disable=line-too-long
|
||||
from msrestazure.tools import is_valid_resource_id
|
||||
|
||||
|
||||
def validate_storage_account(namespace):
|
||||
from msrestazure.tools import parse_resource_id
|
||||
if is_valid_resource_id(namespace.storage_account):
|
||||
parsed_storage = parse_resource_id(namespace.storage_account)
|
||||
storage_name = parsed_storage['resource_name']
|
||||
namespace.storage_account = storage_name
|
||||
|
||||
|
||||
def example_name_or_id_validator(cmd, namespace):
|
||||
# Example of a storage account name or ID validator.
|
||||
# See: https://github.com/Azure/azure-cli/blob/dev/doc/authoring_command_modules/authoring_commands.md#supporting-name-or-id-parameters
|
||||
from azure.cli.core.commands.client_factory import get_subscription_id
|
||||
from msrestazure.tools import resource_id
|
||||
if namespace.storage_account:
|
||||
if not is_valid_resource_id(namespace.RESOURCE):
|
||||
namespace.storage_account = resource_id(
|
||||
subscription=get_subscription_id(cmd.cli_ctx),
|
||||
resource_group=namespace.resource_group_name,
|
||||
namespace='Microsoft.Storage',
|
||||
type='storageAccounts',
|
||||
name=namespace.storage_account
|
||||
)
|
|
@ -0,0 +1,91 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
from azure.cli.core.commands import CliCommandType
|
||||
|
||||
|
||||
# pylint: disable=line-too-long
|
||||
def load_command_table(self, _):
|
||||
from ._client_factory import cf_synapse_client_workspace_factory
|
||||
from ._client_factory import cf_synapse_client_operations_factory
|
||||
from ._client_factory import cf_synapse_client_bigdatapool_factory
|
||||
from ._client_factory import cf_synapse_client_sqlpool_factory
|
||||
from ._client_factory import cf_synapse_client_ipfirewallrules_factory
|
||||
|
||||
def get_custom_sdk(custom_module, client_factory):
|
||||
return CliCommandType(
|
||||
operations_tmpl='azure.cli.command_modules.synapse.operations.{}#'.format(custom_module) + '{}',
|
||||
client_factory=client_factory,
|
||||
)
|
||||
|
||||
synapse_workspace_sdk = CliCommandType(
|
||||
operations_tmpl='azure.mgmt.synapse.operations#WorkspacesOperations.{}',
|
||||
client_factory=cf_synapse_client_workspace_factory)
|
||||
|
||||
synapse_operations_sdk = CliCommandType(
|
||||
operations_tmpl='azure.mgmt.synapse.operations#Operations.{}',
|
||||
client_factory=cf_synapse_client_operations_factory)
|
||||
|
||||
synapse_bigdatapool_sdk = CliCommandType(
|
||||
operations_tmpl='azure.mgmt.synapse.operations#BigDataPoolsOperations.{}',
|
||||
client_factory=cf_synapse_client_bigdatapool_factory)
|
||||
|
||||
synapse_sqlpool_sdk = CliCommandType(
|
||||
operations_tmpl='azure.mgmt.synapse.operations#SqlPoolsOperations.{}',
|
||||
client_factory=cf_synapse_client_sqlpool_factory)
|
||||
|
||||
synapse_firewallrules_sdk = CliCommandType(
|
||||
operations_tmpl='azure.mgmt.synapse.operations#IpFirewallRulesOperations.{}',
|
||||
client_factory=cf_synapse_client_ipfirewallrules_factory)
|
||||
|
||||
# Management Plane Commands --Workspace
|
||||
with self.command_group('synapse workspace', command_type=synapse_workspace_sdk,
|
||||
custom_command_type=get_custom_sdk('workspace', cf_synapse_client_workspace_factory),
|
||||
client_factory=cf_synapse_client_workspace_factory) as g:
|
||||
g.show_command('show', 'get')
|
||||
g.custom_command('list', 'list_workspaces')
|
||||
g.custom_command('create', 'create_workspace', supports_no_wait=True)
|
||||
g.custom_command('update', 'update_workspace', supports_no_wait=True)
|
||||
g.custom_command('check-name', 'custom_check_name_availability',
|
||||
command_type=synapse_operations_sdk,
|
||||
client_factory=cf_synapse_client_operations_factory)
|
||||
g.command('delete', 'delete', confirmation=True, supports_no_wait=True)
|
||||
g.wait_command('wait')
|
||||
|
||||
# Management Plane Commands --SparkPool
|
||||
with self.command_group('synapse spark pool', command_type=synapse_bigdatapool_sdk,
|
||||
custom_command_type=get_custom_sdk('sparkpool', cf_synapse_client_bigdatapool_factory),
|
||||
client_factory=cf_synapse_client_bigdatapool_factory) as g:
|
||||
g.custom_show_command('show', 'get_spark_pool')
|
||||
g.command('list', 'list_by_workspace')
|
||||
g.custom_command('create', 'create_spark_pool', supports_no_wait=True)
|
||||
g.custom_command('update', 'update_spark_pool', supports_no_wait=True)
|
||||
g.custom_command('delete', 'delete_spark_pool', confirmation=True, supports_no_wait=True)
|
||||
g.wait_command('wait')
|
||||
|
||||
# Management Plane Commands --SqlPool
|
||||
with self.command_group('synapse sql pool', command_type=synapse_sqlpool_sdk,
|
||||
custom_command_type=get_custom_sdk('sqlpool', cf_synapse_client_sqlpool_factory),
|
||||
client_factory=cf_synapse_client_sqlpool_factory) as g:
|
||||
g.show_command('show', 'get')
|
||||
g.command('list', 'list_by_workspace')
|
||||
g.custom_command('create', 'create_sql_pool', supports_no_wait=True)
|
||||
g.command('delete', 'delete', confirmation=True, supports_no_wait=True)
|
||||
g.custom_command('update', 'update_sql_pool')
|
||||
g.command('pause', 'pause')
|
||||
g.command('resume', 'resume')
|
||||
g.wait_command('wait')
|
||||
|
||||
# Management Plane Commands --FirewallRule
|
||||
with self.command_group('synapse workspace firewall-rule', command_type=synapse_firewallrules_sdk,
|
||||
custom_command_type=get_custom_sdk('workspace', cf_synapse_client_ipfirewallrules_factory),
|
||||
client_factory=cf_synapse_client_ipfirewallrules_factory) as g:
|
||||
g.command('list', 'list_by_workspace')
|
||||
g.show_command('show', 'get')
|
||||
g.custom_command('create', 'create_firewall_rule', supports_no_wait=True)
|
||||
g.command('delete', 'delete', confirmation=True, supports_no_wait=True)
|
||||
g.wait_command('wait')
|
||||
|
||||
with self.command_group('synapse', is_preview=True):
|
||||
pass
|
|
@ -0,0 +1,12 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class SynapseSqlCreateMode(str, Enum):
|
||||
Default = 'Default'
|
||||
Recovery = 'Recovery'
|
||||
Restore = 'Restore'
|
||||
PointInTimeRestore = 'PointInTimeRestore'
|
|
@ -0,0 +1,4 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
|
@ -0,0 +1,91 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# pylint: disable=unused-argument, line-too-long
|
||||
from azure.cli.core.util import sdk_no_wait, read_file_content
|
||||
from azure.mgmt.synapse.models import BigDataPoolResourceInfo, AutoScaleProperties, AutoPauseProperties, LibraryRequirements, NodeSizeFamily
|
||||
from .._client_factory import cf_synapse_client_workspace_factory
|
||||
|
||||
|
||||
# Synapse sparkpool
|
||||
def get_spark_pool(cmd, client, resource_group_name, workspace_name, spark_pool_name):
|
||||
return client.get(resource_group_name, workspace_name, spark_pool_name)
|
||||
|
||||
|
||||
def create_spark_pool(cmd, client, resource_group_name, workspace_name, spark_pool_name,
|
||||
spark_version, node_size, node_count,
|
||||
node_size_family=NodeSizeFamily.memory_optimized.value, enable_auto_scale=None,
|
||||
min_node_count=None, max_node_count=None,
|
||||
enable_auto_pause=None, delay=None, spark_events_folder="/events",
|
||||
library_requirements=None,
|
||||
spark_log_folder="/logs", tags=None, no_wait=False):
|
||||
|
||||
workspace_client = cf_synapse_client_workspace_factory(cmd.cli_ctx)
|
||||
workspace_object = workspace_client.get(resource_group_name, workspace_name)
|
||||
location = workspace_object.location
|
||||
|
||||
big_data_pool_info = BigDataPoolResourceInfo(location=location, spark_version=spark_version, node_size=node_size,
|
||||
node_count=node_count, node_size_family=node_size_family,
|
||||
spark_events_folder=spark_events_folder,
|
||||
spark_log_folder=spark_log_folder, tags=tags)
|
||||
|
||||
big_data_pool_info.auto_scale = AutoScaleProperties(enabled=enable_auto_scale, min_node_count=min_node_count,
|
||||
max_node_count=max_node_count)
|
||||
|
||||
big_data_pool_info.auto_pause = AutoPauseProperties(enabled=enable_auto_pause,
|
||||
delay_in_minutes=delay)
|
||||
|
||||
if library_requirements:
|
||||
library_requirements_content = read_file_content(library_requirements)
|
||||
big_data_pool_info.library_requirements = LibraryRequirements(filename=library_requirements,
|
||||
content=library_requirements_content)
|
||||
return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, workspace_name, spark_pool_name,
|
||||
big_data_pool_info)
|
||||
|
||||
|
||||
def update_spark_pool(cmd, client, resource_group_name, workspace_name, spark_pool_name,
|
||||
node_size=None, node_count=None, enable_auto_scale=None,
|
||||
min_node_count=None, max_node_count=None,
|
||||
enable_auto_pause=None, delay=None,
|
||||
library_requirements=None, tags=None, force=False, no_wait=False):
|
||||
existing_spark_pool = client.get(resource_group_name, workspace_name, spark_pool_name)
|
||||
|
||||
if node_size:
|
||||
existing_spark_pool.node_size = node_size
|
||||
if node_count:
|
||||
existing_spark_pool.node_count = node_count
|
||||
|
||||
if library_requirements:
|
||||
library_requirements_content = read_file_content(library_requirements)
|
||||
existing_spark_pool.library_requirements = LibraryRequirements(filename=library_requirements,
|
||||
content=library_requirements_content)
|
||||
if tags:
|
||||
existing_spark_pool.tags = tags
|
||||
|
||||
if existing_spark_pool.auto_scale is not None:
|
||||
if enable_auto_scale is not None:
|
||||
existing_spark_pool.auto_scale.enabled = enable_auto_scale
|
||||
if min_node_count:
|
||||
existing_spark_pool.auto_scale.min_node_count = min_node_count
|
||||
if max_node_count:
|
||||
existing_spark_pool.auto_scale.max_node_count = max_node_count
|
||||
else:
|
||||
existing_spark_pool.auto_scale = AutoScaleProperties(enabled=enable_auto_scale, min_node_count=min_node_count,
|
||||
max_node_count=max_node_count)
|
||||
|
||||
if existing_spark_pool.auto_pause is not None:
|
||||
if enable_auto_pause is not None:
|
||||
existing_spark_pool.auto_pause.enabled = enable_auto_pause
|
||||
if delay:
|
||||
existing_spark_pool.auto_pause.delay_in_minutes = delay
|
||||
else:
|
||||
existing_spark_pool.auto_pause = AutoPauseProperties(enabled=enable_auto_pause,
|
||||
delay_in_minutes=delay)
|
||||
|
||||
return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, workspace_name, spark_pool_name,
|
||||
existing_spark_pool, force=force)
|
||||
|
||||
|
||||
def delete_spark_pool(cmd, client, resource_group_name, workspace_name, spark_pool_name, no_wait=False):
|
||||
return sdk_no_wait(no_wait, client.delete, resource_group_name, workspace_name, spark_pool_name)
|
|
@ -0,0 +1,29 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# pylint: disable=unused-argument
|
||||
from azure.cli.core.util import sdk_no_wait
|
||||
from azure.mgmt.synapse.models import SqlPool, SqlPoolPatchInfo, Sku
|
||||
from .._client_factory import cf_synapse_client_workspace_factory
|
||||
from ..constant import SynapseSqlCreateMode
|
||||
|
||||
|
||||
# Synapse sqlpool
|
||||
def create_sql_pool(cmd, client, resource_group_name, workspace_name, sql_pool_name, performance_level, tags=None,
|
||||
no_wait=False):
|
||||
workspace_client = cf_synapse_client_workspace_factory(cmd.cli_ctx)
|
||||
workspace_object = workspace_client.get(resource_group_name, workspace_name)
|
||||
location = workspace_object.location
|
||||
|
||||
sku = Sku(name=performance_level)
|
||||
|
||||
sql_pool_info = SqlPool(sku=sku, location=location, create_mode=SynapseSqlCreateMode.Default, tags=tags)
|
||||
|
||||
return sdk_no_wait(no_wait, client.create, resource_group_name, workspace_name, sql_pool_name, sql_pool_info)
|
||||
|
||||
|
||||
def update_sql_pool(cmd, client, resource_group_name, workspace_name, sql_pool_name, sku_name=None, tags=None):
|
||||
sku = Sku(name=sku_name)
|
||||
sql_pool_patch_info = SqlPoolPatchInfo(sku=sku, tags=tags)
|
||||
return client.update(resource_group_name, workspace_name, sql_pool_name, sql_pool_patch_info)
|
|
@ -0,0 +1,47 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# pylint: disable=unused-argument
|
||||
from azure.cli.core.util import sdk_no_wait
|
||||
from azure.mgmt.synapse.models import Workspace, WorkspacePatchInfo, ManagedIdentity, \
|
||||
DataLakeStorageAccountDetails
|
||||
|
||||
|
||||
# Synapse workspace
|
||||
def list_workspaces(cmd, client, resource_group_name=None):
|
||||
return client.list_by_resource_group(
|
||||
resource_group_name=resource_group_name) if resource_group_name else client.list()
|
||||
|
||||
|
||||
def create_workspace(cmd, client, resource_group_name, workspace_name, storage_account, file_system,
|
||||
sql_admin_login_user, sql_admin_login_password, location, tags=None, no_wait=False):
|
||||
identity_type = "SystemAssigned"
|
||||
identity = ManagedIdentity(type=identity_type)
|
||||
account_url = "https://{}.dfs.{}".format(storage_account, cmd.cli_ctx.cloud.suffixes.storage_endpoint)
|
||||
default_data_lake_storage = DataLakeStorageAccountDetails(account_url=account_url, filesystem=file_system)
|
||||
workspace_info = Workspace(
|
||||
identity=identity,
|
||||
default_data_lake_storage=default_data_lake_storage,
|
||||
sql_administrator_login=sql_admin_login_user,
|
||||
sql_administrator_login_password=sql_admin_login_password,
|
||||
location=location,
|
||||
tags=tags
|
||||
)
|
||||
return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, workspace_name, workspace_info)
|
||||
|
||||
|
||||
def update_workspace(cmd, client, resource_group_name, workspace_name, sql_admin_login_password=None,
|
||||
tags=None, no_wait=False):
|
||||
workspace_patch_info = WorkspacePatchInfo(tags=tags, sql_admin_login_password=sql_admin_login_password)
|
||||
return sdk_no_wait(no_wait, client.update, resource_group_name, workspace_name, workspace_patch_info)
|
||||
|
||||
|
||||
def custom_check_name_availability(cmd, client, name):
|
||||
return client.check_name_availability(name, "Microsoft.Synapse/workspaces")
|
||||
|
||||
|
||||
def create_firewall_rule(cmd, client, resource_group_name, workspace_name, rule_name, start_ip_address, end_ip_address,
|
||||
no_wait=False):
|
||||
return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, workspace_name, rule_name,
|
||||
start_ip_address=start_ip_address, end_ip_address=end_ip_address)
|
|
@ -0,0 +1,5 @@
|
|||
# -----------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for
|
||||
# license information.
|
||||
# -----------------------------------------------------------------------------
|
|
@ -0,0 +1,5 @@
|
|||
# -----------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for
|
||||
# license information.
|
||||
# -----------------------------------------------------------------------------
|
|
@ -0,0 +1,400 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"properties": {"endIpAddress": "255.255.255.255", "startIpAddress": "0.0.0.0"}}'
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse workspace firewall-rule create
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '80'
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
ParameterSetName:
|
||||
- --name --workspace-name --resource-group --start-ip-address --end-ip-address
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/rule000002?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"properties":{"provisioningState":"Provisioning","startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/rule000002","name":"rule000002","type":"Microsoft.Synapse/workspaces/firewallRules"}'
|
||||
headers:
|
||||
access-control-allow-headers:
|
||||
- Location
|
||||
access-control-expose-headers:
|
||||
- Location
|
||||
azure-asyncoperation:
|
||||
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/729527c3-c127-4faa-99cf-831758bc6bf7?api-version=2019-06-01-preview
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '355'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:13:15 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationResults/729527c3-c127-4faa-99cf-831758bc6bf7?api-version=2019-06-01-preview
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1199'
|
||||
status:
|
||||
code: 201
|
||||
message: Created
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse workspace firewall-rule create
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --workspace-name --resource-group --start-ip-address --end-ip-address
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/729527c3-c127-4faa-99cf-831758bc6bf7?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"status":"Succeeded"}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '22'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:13:45 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse workspace firewall-rule create
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --workspace-name --resource-group --start-ip-address --end-ip-address
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/rule000002?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"properties":{"provisioningState":"Succeeded","startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/rule000002","name":"rule000002","type":"Microsoft.Synapse/workspaces/firewallRules"}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '352'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:13:45 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse workspace firewall-rule show
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --workspace-name --resource-group
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/rule000002?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"properties":{"provisioningState":"Succeeded","startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/rule000002","name":"rule000002","type":"Microsoft.Synapse/workspaces/firewallRules"}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '352'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:13:47 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse workspace firewall-rule list
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --workspace-name --resource-group
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"value":[{"properties":{"provisioningState":"Succeeded","startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/allowAll","name":"allowAll","type":"Microsoft.Synapse/workspaces/firewallRules"},{"properties":{"provisioningState":"Succeeded","startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/rule000002","name":"rule000002","type":"Microsoft.Synapse/workspaces/firewallRules"}]}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '717'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:13:49 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse workspace firewall-rule delete
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '0'
|
||||
ParameterSetName:
|
||||
- --name --workspace-name --resource-group --yes
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/rule000002?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: ''
|
||||
headers:
|
||||
access-control-allow-headers:
|
||||
- Location
|
||||
access-control-expose-headers:
|
||||
- Location
|
||||
azure-asyncoperation:
|
||||
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/30836b2a-928d-402c-8539-146d4372eb51?api-version=2019-06-01-preview
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '0'
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:13:51 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationResults/30836b2a-928d-402c-8539-146d4372eb51?api-version=2019-06-01-preview
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-deletes:
|
||||
- '14999'
|
||||
status:
|
||||
code: 202
|
||||
message: Accepted
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse workspace firewall-rule delete
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --workspace-name --resource-group --yes
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/30836b2a-928d-402c-8539-146d4372eb51?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"status":"Succeeded"}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '22'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:14:23 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse workspace firewall-rule show
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --workspace-name --resource-group
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/firewallRules/rule000002?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"error":{"code":"IpFirewallRuleNotFound","message":"testsynapseworkspace/rule000002"}}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '85'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:14:46 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 404
|
||||
message: Not Found
|
||||
version: 1
|
|
@ -0,0 +1,652 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool create
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --spark-version --workspace --resource-group --node-count --node-size
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace","location":"eastus","name":"testsynapseworkspace","type":"Microsoft.Synapse/workspaces","identity":{"type":"SystemAssigned","principalId":"e64a6f06-c0ef-4564-ab5d-ac006d710db5","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"tags":{},"properties":{"connectivityEndpoints":{"web":"https://web.azuresynapse.net?workspace=%2fsubscriptions%2f051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3%2fresourceGroups%2frg%2fproviders%2fMicrosoft.Synapse%2fworkspaces%2ftestsynapseworkspace","sql":"testsynapseworkspace.sql.azuresynapse.net","dev":"https://testsynapseworkspace.dev.azuresynapse.net","sqlOnDemand":"testsynapseworkspace-ondemand.sql.azuresynapse.net"},"managedResourceGroupName":"workspacemanagedrg-9f0b717c-759e-4465-871e-8ae6bb0e0727","defaultDataLakeStorage":{"accountUrl":"https://adlsgen2.dfs.core.windows.net","filesystem":"testsynapseworkspace"},"sqlAdministratorLogin":"sqladminuser","privateEndpointConnections":[],"provisioningState":"Succeeded"}}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '1125'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:04:12 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"location": "eastus", "properties": {"autoScale": {}, "autoPause": {},
|
||||
"sparkEventsFolder": "/events", "nodeCount": 3, "sparkVersion": "2.4", "defaultSparkLogFolder":
|
||||
"/logs", "nodeSize": "Medium", "nodeSizeFamily": "MemoryOptimized"}}'
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool create
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '236'
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
ParameterSetName:
|
||||
- --name --spark-version --workspace --resource-group --node-count --node-size
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001?api-version=2019-06-01-preview&force=false
|
||||
response:
|
||||
body:
|
||||
string: '{"properties":{"creationDate":"2020-07-22T11:04:19.2266667Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"provisioningState":"Provisioning"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001","name":"testpool000001","type":"Microsoft.Synapse/workspaces/bigDataPools"}'
|
||||
headers:
|
||||
access-control-allow-headers:
|
||||
- Location
|
||||
access-control-expose-headers:
|
||||
- Location
|
||||
azure-asyncoperation:
|
||||
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/a31e4ff1-cce2-4db2-82fa-708dc753e2ed?api-version=2019-06-01-preview
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '556'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:04:18 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationResults/a31e4ff1-cce2-4db2-82fa-708dc753e2ed?api-version=2019-06-01-preview
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1199'
|
||||
status:
|
||||
code: 202
|
||||
message: Accepted
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool create
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --spark-version --workspace --resource-group --node-count --node-size
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/a31e4ff1-cce2-4db2-82fa-708dc753e2ed?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"status":"Succeeded"}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '22'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:04:51 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool create
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --spark-version --workspace --resource-group --node-count --node-size
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001?api-version=2019-06-01-preview&force=false
|
||||
response:
|
||||
body:
|
||||
string: '{"properties":{"creationDate":"2020-07-22T11:04:19.2266667Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001","name":"testpool000001","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus"}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '573'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:04:51 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool show
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --workspace --resource-group
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"properties":{"creationDate":"2020-07-22T11:04:19.2266667Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001","name":"testpool000001","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus"}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '573'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:04:54 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool list
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --workspace --resource-group
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"value":[{"properties":{"creationDate":"2020-07-14T06:55:18.6333333Z","sparkVersion":"2.4","nodeCount":0,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":true,"minNodeCount":3,"maxNodeCount":40},"autoPause":{"enabled":true,"delayInMinutes":15},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/sparkpoolcli","name":"sparkpoolcli","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus","tags":{}},{"properties":{"creationDate":"2020-07-15T05:48:35.2066667Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testcreate","name":"testcreate","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus"},{"properties":{"creationDate":"2020-07-15T06:00:03.2933333Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"libraryRequirements":{"filename":"C:\\Users\\username\\requirements.txt","content":"#
|
||||
basic\r\nsetuptools==40.0.0\r\npip>=9.0.1","time":"2020-07-15T06:00:03.3004196Z"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testcreatefile","name":"testcreatefile","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus"},{"properties":{"creationDate":"2020-07-15T09:02:00.9Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"libraryRequirements":{"filename":"C:\\Users\\username\\requirements.txt","content":"#
|
||||
basic\r\nsetuptools==40.0.0\r\npip>=9.0.1","time":"2020-07-15T09:02:00.9000871Z"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testdebug","name":"testdebug","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus"},{"properties":{"creationDate":"2020-07-14T09:41:26.62Z","sparkVersion":"2.4","nodeCount":0,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":true,"minNodeCount":3,"maxNodeCount":40},"autoPause":{"enabled":true,"delayInMinutes":15},"libraryRequirements":{"filename":"requirements.txt","content":"#
|
||||
basic\r\nsetuptools==40.0.0\r\npip>=9.0.1","time":"2020-07-14T09:41:26.623672Z"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testlibrary","name":"testlibrary","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus","tags":{}},{"properties":{"creationDate":"2020-07-22T11:04:19.2266667Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001","name":"testpool000001","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus"}]}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '3909'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:04:55 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool update
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --ids --tags
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"properties":{"creationDate":"2020-07-22T11:04:19.2266667Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001","name":"testpool000001","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus"}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '573'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:04:57 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"tags": {"key1": "value1"}, "location": "eastus", "properties": {"provisioningState":
|
||||
"Succeeded", "autoScale": {"minNodeCount": 0, "enabled": false, "maxNodeCount":
|
||||
0}, "creationDate": "2020-07-22T11:04:19.226666Z", "autoPause": {"delayInMinutes":
|
||||
0, "enabled": false}, "nodeCount": 3, "sparkVersion": "2.4", "nodeSize": "Medium",
|
||||
"nodeSizeFamily": "MemoryOptimized"}}'
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool update
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '370'
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
ParameterSetName:
|
||||
- --ids --tags
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001?api-version=2019-06-01-preview&force=false
|
||||
response:
|
||||
body:
|
||||
string: '{"properties":{"creationDate":"2020-07-22T11:04:19.2266667Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"provisioningState":"Provisioning"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001","name":"testpool000001","type":"Microsoft.Synapse/workspaces/bigDataPools","tags":{"key1":"value1"}}'
|
||||
headers:
|
||||
access-control-allow-headers:
|
||||
- Location
|
||||
access-control-expose-headers:
|
||||
- Location
|
||||
azure-asyncoperation:
|
||||
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/c4a092de-73a8-4766-8d36-1a22198b5927?api-version=2019-06-01-preview
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '581'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:05:00 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationResults/c4a092de-73a8-4766-8d36-1a22198b5927?api-version=2019-06-01-preview
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1199'
|
||||
status:
|
||||
code: 202
|
||||
message: Accepted
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool update
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --ids --tags
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/c4a092de-73a8-4766-8d36-1a22198b5927?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"status":"Succeeded"}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '22'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:05:31 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool update
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --ids --tags
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001?api-version=2019-06-01-preview&force=false
|
||||
response:
|
||||
body:
|
||||
string: '{"properties":{"creationDate":"2020-07-22T11:04:19.2266667Z","sparkVersion":"2.4","nodeCount":3,"nodeSize":"Medium","nodeSizeFamily":"MemoryOptimized","autoScale":{"enabled":false,"minNodeCount":0,"maxNodeCount":0},"autoPause":{"enabled":false,"delayInMinutes":0},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001","name":"testpool000001","type":"Microsoft.Synapse/workspaces/bigDataPools","location":"eastus","tags":{"key1":"value1"}}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '598'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:05:31 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool delete
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '0'
|
||||
ParameterSetName:
|
||||
- --name --workspace --resource-group --yes
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: ''
|
||||
headers:
|
||||
access-control-allow-headers:
|
||||
- Location
|
||||
access-control-expose-headers:
|
||||
- Location
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '0'
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:05:35 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationResults/52d8bf72-664f-422b-94d7-229440859d52?api-version=2019-06-01-preview
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-deletes:
|
||||
- '14999'
|
||||
status:
|
||||
code: 202
|
||||
message: Accepted
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool delete
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --workspace --resource-group --yes
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationResults/52d8bf72-664f-422b-94d7-229440859d52?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: ''
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:06:06 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
server:
|
||||
- Microsoft-HTTPAPI/2.0
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 204
|
||||
message: No Content
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- synapse spark pool show
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- --name --workspace --resource-group
|
||||
User-Agent:
|
||||
- python/3.7.8 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.3 azure-mgmt-synapse/0.3.0
|
||||
Azure-SDK-For-Python AZURECLI/2.8.0
|
||||
accept-language:
|
||||
- en-US
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001?api-version=2019-06-01-preview
|
||||
response:
|
||||
body:
|
||||
string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testpool000001''
|
||||
under resource group ''rg'' was not found. For more details
|
||||
please go to https://aka.ms/ARMResourceNotFoundFix"}}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '266'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 22 Jul 2020 11:06:08 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-failure-cause:
|
||||
- gateway
|
||||
status:
|
||||
code: 404
|
||||
message: Not Found
|
||||
version: 1
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,243 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import os
|
||||
|
||||
from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer
|
||||
|
||||
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
|
||||
|
||||
|
||||
class SynapseScenarioTests(ScenarioTest):
|
||||
location = "northeurope"
|
||||
|
||||
@ResourceGroupPreparer(name_prefix='synapse-cli', random_name_length=16)
|
||||
def test_workspaces(self, resource_group):
|
||||
# create a workspace
|
||||
self._create_workspace()
|
||||
|
||||
# check workspace name
|
||||
self.cmd('az synapse workspace check-name --name {workspace}', checks=[
|
||||
self.check('available', False)
|
||||
])
|
||||
|
||||
# get workspace with workspace name
|
||||
workspace = self.cmd('az synapse workspace show --name {workspace} --resource-group {rg}', checks=[
|
||||
self.check('name', self.kwargs['workspace']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces'),
|
||||
self.check('provisioningState', 'Succeeded')
|
||||
]).get_output_in_json()
|
||||
|
||||
self.kwargs["workspace-id"] = workspace['id']
|
||||
|
||||
# list all workspaces under a specific resource group
|
||||
self.cmd('az synapse workspace list --resource-group {rg}', checks=[
|
||||
self.check('[0].type', 'Microsoft.Synapse/workspaces')
|
||||
])
|
||||
|
||||
# update workspace
|
||||
self.cmd('az synapse workspace update --ids {workspace-id} --tags key1=value1', checks=[
|
||||
self.check('tags.key1', 'value1'),
|
||||
self.check('name', self.kwargs['workspace']),
|
||||
self.check('id', self.kwargs['workspace-id']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces'),
|
||||
self.check('provisioningState', 'Succeeded')
|
||||
])
|
||||
|
||||
# delete workspace with workspace name
|
||||
self.cmd('az synapse workspace delete --name {workspace} --resource-group {rg} --yes')
|
||||
import time
|
||||
time.sleep(120)
|
||||
self.cmd('az synapse workspace show --name {workspace} --resource-group {rg}', expect_failure=True)
|
||||
|
||||
def test_spark_pool(self):
|
||||
self.kwargs.update({
|
||||
'location': 'eastus',
|
||||
'workspace': 'testsynapseworkspace',
|
||||
'rg': 'rg',
|
||||
'spark-pool': self.create_random_name(prefix='testpool', length=15),
|
||||
'spark-version': '2.4'
|
||||
})
|
||||
# create spark pool
|
||||
spark_pool = self.cmd('az synapse spark pool create --name {spark-pool} --spark-version {spark-version}'
|
||||
' --workspace {workspace} --resource-group {rg} --node-count 3 --node-size Medium',
|
||||
checks=[
|
||||
self.check('name', self.kwargs['spark-pool']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/bigDataPools'),
|
||||
self.check('provisioningState', 'Succeeded')
|
||||
]).get_output_in_json()
|
||||
|
||||
self.kwargs['pool-id'] = spark_pool['id']
|
||||
|
||||
# get spark pool with spark pool name
|
||||
self.cmd('az synapse spark pool show --name {spark-pool} --workspace {workspace} --resource-group {rg}',
|
||||
checks=[
|
||||
self.check('name', self.kwargs['spark-pool']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/bigDataPools'),
|
||||
self.check('provisioningState', 'Succeeded')
|
||||
])
|
||||
|
||||
# list all spark pools under the workspace
|
||||
self.cmd('az synapse spark pool list --workspace {workspace} --resource-group {rg}', checks=[
|
||||
self.check('[0].type', 'Microsoft.Synapse/workspaces/bigDataPools')
|
||||
])
|
||||
|
||||
# update spark pool
|
||||
self.cmd('az synapse spark pool update --ids {pool-id} --tags key1=value1', checks=[
|
||||
self.check('tags.key1', 'value1'),
|
||||
self.check('name', self.kwargs['spark-pool']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/bigDataPools'),
|
||||
self.check('provisioningState', 'Succeeded')
|
||||
])
|
||||
|
||||
# delete spark pool with spark pool name
|
||||
self.cmd(
|
||||
'az synapse spark pool delete --name {spark-pool} --workspace {workspace} --resource-group {rg} --yes')
|
||||
self.cmd('az synapse spark pool show --name {spark-pool} --workspace {workspace} --resource-group {rg}',
|
||||
expect_failure=True)
|
||||
|
||||
def test_sql_pool(self):
|
||||
self.kwargs.update({
|
||||
'location': 'eastus',
|
||||
'workspace': 'testsynapseworkspace',
|
||||
'rg': 'rg',
|
||||
'sql-pool': self.create_random_name(prefix='testsqlpool', length=15),
|
||||
'performance-level': 'DW1000c'
|
||||
})
|
||||
# create sql pool
|
||||
sql_pool = self.cmd(
|
||||
'az synapse sql pool create --name {sql-pool} --performance-level {performance-level} '
|
||||
'--workspace {workspace} --resource-group {rg}', checks=[
|
||||
self.check('name', self.kwargs['sql-pool']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/sqlPools'),
|
||||
self.check('provisioningState', 'Succeeded'),
|
||||
self.check('status', 'Online')
|
||||
]).get_output_in_json()
|
||||
|
||||
self.kwargs['pool-id'] = sql_pool['id']
|
||||
|
||||
# get sql pool with sql pool name
|
||||
self.cmd('az synapse sql pool show --name {sql-pool} --workspace {workspace} --resource-group {rg}',
|
||||
checks=[
|
||||
self.check('name', self.kwargs['sql-pool']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/sqlPools'),
|
||||
self.check('provisioningState', 'Succeeded'),
|
||||
self.check('status', 'Online')
|
||||
])
|
||||
|
||||
# list all sql pools under the workspace
|
||||
self.cmd('az synapse sql pool list --workspace {workspace} --resource-group {rg}', checks=[
|
||||
self.check('[0].type', 'Microsoft.Synapse/workspaces/sqlPools')
|
||||
])
|
||||
|
||||
# update sql pool
|
||||
self.cmd('az synapse sql pool update --ids {pool-id} --tags key1=value1')
|
||||
|
||||
# get sql pool with sql pool id
|
||||
self.cmd('az synapse sql pool show --ids {pool-id}',
|
||||
checks=[
|
||||
self.check('name', self.kwargs['sql-pool']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/sqlPools'),
|
||||
self.check('tags.key1', 'value1'),
|
||||
self.check('provisioningState', 'Succeeded'),
|
||||
self.check('status', 'Online')
|
||||
])
|
||||
|
||||
# pause sql pool
|
||||
self.cmd('az synapse sql pool pause --name {sql-pool} --workspace {workspace} --resource-group {rg}', checks=[])
|
||||
self.cmd('az synapse sql pool show --name {sql-pool} --workspace {workspace} --resource-group {rg}',
|
||||
checks=[
|
||||
self.check('name', self.kwargs['sql-pool']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/sqlPools'),
|
||||
self.check('status', 'Paused')
|
||||
])
|
||||
|
||||
# resume sql pool
|
||||
self.cmd('az synapse sql pool resume --name {sql-pool} --workspace {workspace} --resource-group {rg}', checks=[])
|
||||
self.cmd('az synapse sql pool show --name {sql-pool} --workspace {workspace} --resource-group {rg}',
|
||||
checks=[
|
||||
self.check('name', self.kwargs['sql-pool']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/sqlPools'),
|
||||
self.check('status', 'Online')
|
||||
])
|
||||
|
||||
# delete sql pool with sql pool name
|
||||
self.cmd(
|
||||
'az synapse sql pool delete --name {sql-pool} --workspace {workspace} --resource-group {rg} --yes')
|
||||
|
||||
self.cmd('az synapse sql pool show --name {sql-pool} --workspace {workspace} --resource-group {rg}',
|
||||
expect_failure=True)
|
||||
|
||||
@ResourceGroupPreparer(name_prefix='synapse-cli', random_name_length=16)
|
||||
def test_ip_firewall_rules(self, resource_group):
|
||||
self.kwargs.update({
|
||||
'workspace': 'testsynapseworkspace',
|
||||
'rg': 'rg',
|
||||
'ruleName': self.create_random_name(prefix='rule', length=8),
|
||||
'startIpAddress': "0.0.0.0",
|
||||
'endIpAddress': "255.255.255.255"
|
||||
})
|
||||
|
||||
# create a firewall rule
|
||||
self.cmd(
|
||||
'az synapse workspace firewall-rule create --name {ruleName} --workspace-name {workspace} '
|
||||
'--resource-group {rg} --start-ip-address {startIpAddress} --end-ip-address {endIpAddress}',
|
||||
checks=[
|
||||
self.check('name', self.kwargs['ruleName']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/firewallRules'),
|
||||
self.check('provisioningState', 'Succeeded')
|
||||
])
|
||||
|
||||
# get a firewall rule
|
||||
self.cmd(
|
||||
'az synapse workspace firewall-rule show --name {ruleName} --workspace-name {workspace} '
|
||||
'--resource-group {rg}',
|
||||
checks=[
|
||||
self.check('name', self.kwargs['ruleName']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces/firewallRules'),
|
||||
self.check('provisioningState', 'Succeeded')
|
||||
])
|
||||
|
||||
# list all firewall rules under a specific workspace
|
||||
self.cmd('az synapse workspace firewall-rule list --workspace-name {workspace} --resource-group {rg}',
|
||||
checks=[
|
||||
self.check('[0].type', 'Microsoft.Synapse/workspaces/firewallRules')
|
||||
])
|
||||
|
||||
# delete a firewall rule
|
||||
self.cmd(
|
||||
'az synapse workspace firewall-rule delete --name {ruleName} --workspace-name {workspace} '
|
||||
'--resource-group {rg} --yes')
|
||||
import time
|
||||
time.sleep(20)
|
||||
self.cmd('az synapse workspace firewall-rule show --name {ruleName} --workspace-name {workspace} '
|
||||
'--resource-group {rg}', expect_failure=True)
|
||||
|
||||
def _create_workspace(self):
|
||||
self.kwargs.update({
|
||||
'location': self.location,
|
||||
'workspace': self.create_random_name(prefix='clitest', length=16),
|
||||
'file-system': 'testfilesystem',
|
||||
'storage-account': 'adlsgen2account',
|
||||
'login-user': 'cliuser1',
|
||||
'login-password': 'password'
|
||||
})
|
||||
|
||||
# Wait some time to improve robustness
|
||||
if self.is_live or self.in_recording:
|
||||
import time
|
||||
time.sleep(60)
|
||||
|
||||
# create synapse workspace
|
||||
self.cmd(
|
||||
'az synapse workspace create --name {workspace} --resource-group {rg} --storage-account {storage-account} '
|
||||
'--file-system {file-system} --sql-admin-login-user {login-user} '
|
||||
'--sql-admin-login-password {login-password}'
|
||||
' --location {location}', checks=[
|
||||
self.check('name', self.kwargs['workspace']),
|
||||
self.check('type', 'Microsoft.Synapse/workspaces'),
|
||||
self.check('provisioningState', 'Succeeded')
|
||||
])
|
|
@ -80,6 +80,7 @@ azure-mgmt-sqlvirtualmachine==0.5.0
|
|||
azure-mgmt-storage==11.1.0
|
||||
azure-mgmt-trafficmanager==0.51.0
|
||||
azure-mgmt-web==0.47.0
|
||||
azure-mgmt-synapse==0.3.0
|
||||
azure-multiapi-storage==0.3.2
|
||||
azure-nspkg==3.0.2
|
||||
azure-loganalytics==0.1.0
|
||||
|
|
|
@ -80,6 +80,7 @@ azure-mgmt-sqlvirtualmachine==0.5.0
|
|||
azure-mgmt-storage==11.1.0
|
||||
azure-mgmt-trafficmanager==0.51.0
|
||||
azure-mgmt-web==0.47.0
|
||||
azure-mgmt-synapse==0.3.0
|
||||
azure-multiapi-storage==0.3.2
|
||||
azure-nspkg==3.0.2
|
||||
azure-loganalytics==0.1.0
|
||||
|
|
|
@ -80,6 +80,7 @@ azure-mgmt-sqlvirtualmachine==0.5.0
|
|||
azure-mgmt-storage==11.1.0
|
||||
azure-mgmt-trafficmanager==0.51.0
|
||||
azure-mgmt-web==0.47.0
|
||||
azure-mgmt-synapse==0.3.0
|
||||
azure-multiapi-storage==0.3.2
|
||||
azure-nspkg==3.0.2
|
||||
azure-loganalytics==0.1.0
|
||||
|
|
|
@ -122,6 +122,7 @@ DEPENDENCIES = [
|
|||
'azure-mgmt-storage~=11.1.0',
|
||||
'azure-mgmt-trafficmanager~=0.51.0',
|
||||
'azure-mgmt-web~=0.47.0',
|
||||
'azure-mgmt-synapse~=0.3.0',
|
||||
'azure-multiapi-storage~=0.3.2',
|
||||
'azure-loganalytics~=0.1.0',
|
||||
'azure-storage-common~=1.4',
|
||||
|
|
Загрузка…
Ссылка в новой задаче