Skip to content

Commit

Permalink
[Synapse] az synapse workspace create: Add parameter `--managed-res…
Browse files Browse the repository at this point in the history
…ource-group-name` (#23713)
  • Loading branch information
kevinzz6 authored Oct 28, 2022
1 parent 3f2e469 commit a5c7174
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3944,4 +3944,4 @@ webapp update:
- option_length_too_long
skip_dns_registration:
rule_exclusions:
- option_length_too_long
- option_length_too_long
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
--sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US" \\
--repository-type AzureDevOpsGit --account-name testuser --project-name testprj \\
--repository-name testrepo --collaboration-branch main --last-commit-id 000000
- name: Create a Synapse workspace with managed resource group
text: |-
az synapse workspace create --name testworkspace --resource-group rg \\
--managed-rg-name managedrg \\
--storage-account testadlsgen2 --file-system testfilesystem \\
--sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US"
"""

helps['synapse workspace list'] = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def load_arguments(self, _):
c.argument('prevent_data_exfiltration', arg_type=get_three_state_flag(),
help='The flag indicates whether enable data exfiltration.', options_list=['--prevent-exfiltration', '--prevent-data-exfiltration'])
c.argument('key_identifier', help='The customer-managed key used to encrypt all data at rest in the workspace. Key identifier should be in the format of: https://{keyvaultname}.vault.azure.net/keys/{keyname}.', options_list=['--key-identifier', '--cmk'])
c.argument('managed_resource_group_name', options_list=['--managed-rg-name'],
help=' Workspace managed resource group. The resource group name uniquely identifies the resource group within the user subscriptionId.')

with self.argument_context('synapse workspace check-name') as c:
c.argument('name', arg_type=name_type, help='The name you wanted to check.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def list_workspaces(cmd, client, resource_group_name=None):
def create_workspace(cmd, client, resource_group_name, workspace_name, storage_account, file_system,
sql_admin_login_user, sql_admin_login_password, location=None, key_name="default", key_identifier=None, enable_managed_virtual_network=None,
allowed_aad_tenant_ids=None, prevent_data_exfiltration=None, tags=None, repository_type=None, host_name=None, account_name=None,
collaboration_branch=None, repository_name=None, root_folder='/', project_name=None, last_commit_id=None, tenant_id=None, no_wait=False):
collaboration_branch=None, repository_name=None, root_folder='/', project_name=None, last_commit_id=None, tenant_id=None,
managed_resource_group_name=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)
Expand Down Expand Up @@ -77,7 +78,8 @@ def create_workspace(cmd, client, resource_group_name, workspace_name, storage_a
managed_virtual_network_settings=managed_virtual_network_settings,
encryption=encryption,
tags=tags,
workspace_repository_configuration=workspace_repository_configuration
workspace_repository_configuration=workspace_repository_configuration,
managed_resource_group_name=managed_resource_group_name
)
return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, workspace_name, workspace_info)

Expand Down

0 comments on commit a5c7174

Please sign in to comment.