Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
00c59c2
[Role] az ad sp create-for-rbac: Deprecate creating Contributor role …
jiasli Dec 22, 2020
8d3bbbb
[SQL] az sql dw update: fix update to not accept backup-storage-redun…
xaliciayang Dec 22, 2020
4ef9e0e
[BACKUP] az backup job list: Solved -o table bug and added backup_man…
akshayneema Dec 22, 2020
aea4f5e
[AppService] Unhide Python 3.9 in functionapp create (#16296)
Hazhzeng Dec 23, 2020
791150e
{Storage} Fix issue #9948: 'az storage container create' required '--…
Juliehzl Dec 23, 2020
8001d4b
[DataBoxEdge] new command module: support for data-box-edge devices a…
evelyn-ys Dec 23, 2020
94dcc6a
[Synapse] Add new cmdlets for synapse sql aad admin and sql audit pol…
aim-for-better Dec 23, 2020
bedfc6f
{Telemetry} Reomve trace stack info in Telemetry (#16332)
houk-ms Dec 23, 2020
7361b99
Extract error code and error message from HttpOperationError (#16273)
houk-ms Dec 23, 2020
903ecf1
Fix spelling (mySubscrpitionId) (#16252)
scovetta Dec 23, 2020
7882147
[AppService] Fixes #14583: az webapp up should generate default name …
calvinsID Dec 23, 2020
37c8d72
[ARO] Ensure worker_profile is not None before getting the subnets fr…
bennerv Dec 23, 2020
3776643
[ACR] bump api version. support zone redundancy (#15975)
adewaleo Dec 23, 2020
df80a09
[Synapse] Add integration runtime related cmdlets (#15498)
wonner Dec 24, 2020
885e78d
[Resource] az provider register: Add --accept-terms for registering R…
fengzhou-msft Dec 24, 2020
e5eefd2
[Profile] Fix "missing secret or certificate in order to authenticate…
jiasli Dec 24, 2020
02bbf1f
[ACR] az acr connected-acr create/update/delete/list/show: new featur…
rosanch Dec 24, 2020
7270756
{Network} Migrate network SDK that is used by some other modules to t…
jsntcy Dec 24, 2020
25912fd
[ARM] `az deployment`: Fix parse errors with multiline strings (#15502)
wiktorn Dec 25, 2020
288e18d
{Storage} Fix live test (#15948)
Juliehzl Dec 25, 2020
cf9a4dc
[AppService] Bugfix: Better error handling when trying to create dupl…
calvinsID Dec 25, 2020
e836dd2
{Storage} Fix issue #13478 to add more information for requires_sync …
Juliehzl Dec 25, 2020
357c9c9
{Release} Upgrade to Azure CLI 2.17.0 (#16362)
Dec 25, 2020
57ce1e6
fix branch (#16364)
fengzhou-msft Dec 25, 2020
b9f69b6
Migrate to Track 2 mgmt SDK (#16376)
avanigupta Dec 29, 2020
dff16b2
[Storage] Fix #16072: Upload file with big size (#16372)
Juliehzl Dec 29, 2020
ee380ec
add rdbms code owner (#16383)
evelyn-ys Dec 29, 2020
6227e34
Fix a typo (#16370)
gossion Dec 29, 2020
2557860
{Core} Use knack 0.8.0rc2 (#16301)
jiasli Dec 30, 2020
87cbdb0
hotfix for bad name (#16381)
msyyc Dec 30, 2020
269954f
docs: fix simple typo, satsify -> satisfy (#16389)
timgates42 Dec 30, 2020
ab2e074
{Doc} Track 2 Migration Guidance (#16330)
qwordy Dec 31, 2020
1d4a90e
{Release} HotFix: Release 2.17.1 (#16393)
msyyc Dec 31, 2020
dc77512
disable homebrew package test temporarily (#16407)
fengzhou-msft Dec 31, 2020
809389f
[Compute] Fix issue of none storage_profile (#16260)
qwordy Jan 4, 2021
36b337b
Merge remote-tracking branch 'upstream/release' into dev
evelyn-ys Jan 4, 2021
c71c2f9
[AppService] Fix #13907: az webapp config ssl import: Change command …
singlessis Jan 5, 2021
3f760cb
{RDBMS} : Stabilize tests for live-test runs in pipeline. (#16415)
arde0708 Jan 5, 2021
761de62
{Test} Live test pipeline 0.10.0 (#16408)
qwordy Jan 5, 2021
fade4bf
[Role] Fix #11594: az role assignment create: Only show supported val…
jiasli Jan 5, 2021
bd13df4
{Misc.} Bump humanfriendly to 9.1 (#16363)
jiasli Jan 5, 2021
4d11117
Remove the preview tag for server key and ad admin (#16412)
shinilm Jan 5, 2021
1e8f1bb
{AKS} Update region mapping list for Container Insights to include la…
bragi92 Jan 6, 2021
4ac1441
{ARM} Bump azure-mgmt-resource SDK: 10.3.0 to 12.0.0, v2020-06-01 t…
detienne20 Jan 6, 2021
9b20d55
[AppService] Fixes #16125: az webapp ssh if using a windows client, o…
calvinsID Jan 7, 2021
2d39b43
[AppService]: fix for #13291- az webapp deployment slot swap should s…
Kotasudhakarreddy Jan 7, 2021
aa3ac71
{Network} Support list for storage private endpoint connection (#16438)
Juliehzl Jan 7, 2021
4191edb
{Compute} Fix tests (#16425)
qwordy Jan 7, 2021
25cac8b
{Compute} Update _help.py - add link to article for finding an image …
cynthn Jan 8, 2021
72c2203
[Compute] Better error handling of external tokens (#16406)
qwordy Jan 8, 2021
4e1e753
{Core} Add polling start time and end time in telemetry (#16458)
Juliehzl Jan 11, 2021
9601031
[Storage] Fix issue #12291: az storage blob generate-sas does not pro…
Juliehzl Jan 11, 2021
c66daef
[ARM] Az Deployments : Add support for --query-string (#16447)
detienne20 Jan 11, 2021
22d53e3
add pamamiko to legal notice file (#16461)
fengzhou-msft Jan 11, 2021
3269d06
[Compute] Fix a vmss reimage issue (#16483)
qwordy Jan 11, 2021
a854825
{Storage} `az storage container immutability-policy extend`: Fix requ…
Juliehzl Jan 11, 2021
e032bdf
[Compute] vm/vmss extension set: New parameter --enable-auto-upgrade …
qwordy Jan 12, 2021
d7e5dea
{Doc} Track 2 Migration Guidance (#16484)
qwordy Jan 12, 2021
d095076
{Misc.} Update CODEOWNERS (#16382)
jiasli Jan 12, 2021
87f979e
{container} Bugfix #15856: az container exec - remove eol check to av…
bitcloud Jan 12, 2021
8db65c7
[Backup]Added default backup retention as 30 days (#16394)
Jan 12, 2021
701f1cd
set default backup retention value to 30 days (#16500)
akshayneema Jan 13, 2021
ca09633
[ARM] ts: error handling improvement - use of --template-file without…
detienne20 Jan 13, 2021
785d8f4
{Storage} Enable logging for track2 data plane operations (#16439)
Juliehzl Jan 13, 2021
1058618
[AKS] az aks check-acr: Add new check-acr command (#16490)
samkreter Jan 13, 2021
ea298e9
[IoT] Add --tags to IoT Hub create and update (#16336)
c-ryan-k Jan 14, 2021
cddb696
remove --export-all-tables for command az monitor log-analytics works…
kairu-ms Jan 14, 2021
0bcfb50
Patch version in homebrew formula (#16518)
fengzhou-msft Jan 14, 2021
27f5250
{RDBMS} Fixed bugs and updated local context test (#16437)
DaeunYim Jan 14, 2021
2cc0913
[ACR] add --allow-trusted-services support (#16530)
adewaleo Jan 14, 2021
fdea210
bump cffi (#16531)
fengzhou-msft Jan 14, 2021
4720ab9
fix: revert to use old region mapping (#16435)
bragi92 Jan 14, 2021
f5a88f1
[acr] add step in "check-health" command to ensure the identity used …
yugangw-msft Jan 14, 2021
873dfeb
{ACR} Quick Fix (#16441)
rosanch Jan 14, 2021
afdfbab
[Storage] GA PITR and blob service properties in SRP (#16540)
Juliehzl Jan 15, 2021
8930324
[DMS] Merging pg mysql from extension into core (#15746)
temandr Jan 15, 2021
82d9063
[AppService] BREAKING CHANGE: Fix regression where you can't use a ru…
calvinsID Jan 15, 2021
39a4516
{Storage} Remove extension suppression for storage-or-preview becaus…
Juliehzl Jan 15, 2021
da4239a
{Release} Upgrade to Azure CLI 2.18.0 (#16543)
Jan 15, 2021
f53441a
[SQL] Add managed hsm regex match to SQL (#15109)
Yueren-Wang Jan 15, 2021
8fb0be5
[AppConfig] BREAKING CHANGE: az appconfig feature filter add: Support…
avanigupta Jan 18, 2021
edf9ed4
[AppService] az appservice ase/plan ASEv3 support (#16516)
madsd Jan 18, 2021
77ad664
fix broken link (#16569)
yungezz Jan 18, 2021
36bcdae
os-preference and ase private dns (#16575)
madsd Jan 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Migrate to Track 2 mgmt SDK (Azure#16376)
  • Loading branch information
avanigupta authored Dec 29, 2020
commit b9f69b6e59d2330b19a7c3c0d69205609eb6673e
6 changes: 3 additions & 3 deletions src/azure-cli/azure/cli/command_modules/appconfig/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from knack.prompting import NoTTYException, prompt_y_n
from knack.util import CLIError
from azure.appconfiguration import AzureAppConfigurationClient
from azure.mgmt.appconfiguration.models import ErrorException
from azure.core.exceptions import HttpResponseError

from ._client_factory import cf_configstore
from ._constants import HttpHeaders
Expand All @@ -30,7 +30,7 @@ def construct_connection_string(cmd, config_store_name):
for entry in access_keys:
if not entry.read_only:
return connection_string_template.format(endpoint, entry.id, entry.value)
except ErrorException as ex:
except HttpResponseError as ex:
raise CLIError('Failed to get access keys for the App Configuration "{}". Make sure that the account that logged in has sufficient permissions to access the App Configuration store.\n{}'.format(config_store_name, str(ex)))

raise CLIError('Cannot find a read write access key for the App Configuration {}'.format(config_store_name))
Expand All @@ -44,7 +44,7 @@ def resolve_store_metadata(cmd, config_store_name):
if store.name.lower() == config_store_name.lower():
# Id has a fixed structure /subscriptions/subscriptionName/resourceGroups/groupName/providers/providerName/configurationStores/storeName"
return store.id.split('/')[4], store.endpoint
except ErrorException as ex:
except HttpResponseError as ex:
raise CLIError("Failed to get the list of App Configuration stores for the current user. Make sure that the account that logged in has sufficient permissions to access the App Configuration store.\n{}".format(str(ex)))

raise CLIError("Failed to find the App Configuration store '{}'.".format(config_store_name))
Expand Down
59 changes: 19 additions & 40 deletions src/azure-cli/azure/cli/command_modules/appconfig/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
ResourceIdentity,
UserIdentity,
EncryptionProperties,
KeyVaultProperties)
KeyVaultProperties,
RegenerateKeyParameters)

from ._utils import resolve_store_metadata, user_confirmation

Expand Down Expand Up @@ -45,21 +46,19 @@ def create_configstore(client,
sku=Sku(name=sku),
public_network_access=public_network_access)

return client.create(resource_group_name, name, configstore_params)
return client.begin_create(resource_group_name, name, configstore_params)


def delete_configstore(cmd, client, name, resource_group_name=None, yes=False):
if resource_group_name is None:
resource_group_name, _ = resolve_store_metadata(cmd, name)
confirmation_message = "Are you sure you want to delete the App Configuration: {}".format(
name)
confirmation_message = "Are you sure you want to delete the App Configuration: {}".format(name)
user_confirmation(confirmation_message, yes)
return client.delete(resource_group_name, name)
return client.begin_delete(resource_group_name, name)


def list_configstore(client, resource_group_name=None):
response = client.list() if resource_group_name is None else client.list_by_resource_group(
resource_group_name)
response = client.list() if resource_group_name is None else client.list_by_resource_group(resource_group_name)
return response


Expand Down Expand Up @@ -100,9 +99,9 @@ def update_configstore(cmd,

update_params.encryption = EncryptionProperties(key_vault_properties=key_vault_properties)

return client.update(resource_group_name=resource_group_name,
config_store_name=name,
config_store_update_parameters=update_params)
return client.begin_update(resource_group_name=resource_group_name,
config_store_name=name,
config_store_update_parameters=update_params)


def assign_managed_identity(cmd, client, name, resource_group_name=None, identities=None):
Expand Down Expand Up @@ -131,9 +130,9 @@ def assign_managed_identity(cmd, client, name, resource_group_name=None, identit
managed_identities = ResourceIdentity(type=','.join(identity_types) if identity_types else 'None',
user_assigned_identities=user_assigned_identities if user_assigned_identities else None)

client.update(resource_group_name=resource_group_name,
config_store_name=name,
config_store_update_parameters=ConfigurationStoreUpdateParameters(identity=managed_identities))
client.begin_update(resource_group_name=resource_group_name,
config_store_name=name,
config_store_update_parameters=ConfigurationStoreUpdateParameters(identity=managed_identities))

# Due to a bug in RP https://msazure.visualstudio.com/Azure%20AppConfig/_workitems/edit/6017040
# It client.update does not return the updated identities.
Expand Down Expand Up @@ -172,32 +171,24 @@ def remove_managed_identity(cmd, client, name, resource_group_name=None, identit
managed_identities = ResourceIdentity(type=','.join(identity_types) if identity_types else 'None',
user_assigned_identities=user_assigned_identities if user_assigned_identities else None)

client.update(resource_group_name=resource_group_name,
config_store_name=name,
config_store_update_parameters=ConfigurationStoreUpdateParameters(identity=managed_identities))
client.begin_update(resource_group_name=resource_group_name,
config_store_name=name,
config_store_update_parameters=ConfigurationStoreUpdateParameters(identity=managed_identities))


def show_managed_identity(cmd, client, name, resource_group_name=None):
config_store = show_configstore(cmd, client, name, resource_group_name)

return config_store.identity if config_store.identity else {}


def list_credential(cmd, client, name, resource_group_name=None):
resource_group_name, endpoint = resolve_store_metadata(cmd, name)
credentials = client.list_keys(resource_group_name, name)
augmented_credentials = []

for credentail in credentials:
augmented_credential = __convert_api_key_to_json(credentail, endpoint)
augmented_credentials.append(augmented_credential)
return augmented_credentials
resource_group_name, _ = resolve_store_metadata(cmd, name)
return client.list_keys(resource_group_name, name)


def regenerate_credential(cmd, client, name, id_, resource_group_name=None):
resource_group_name, endpoint = resolve_store_metadata(cmd, name)
credentail = client.regenerate_key(resource_group_name, name, id_)
return __convert_api_key_to_json(credentail, endpoint)
resource_group_name, _ = resolve_store_metadata(cmd, name)
return client.regenerate_key(resource_group_name, name, RegenerateKeyParameters(id=id_))


def __get_resource_identity(assign_identity):
Expand Down Expand Up @@ -236,15 +227,3 @@ def __validate_cmk(encryption_key_name=None,
else:
if any(arg is not None for arg in [encryption_key_vault, encryption_key_version, identity_client_id]):
logger.warning("Removing the customer encryption key. Key vault related arguments are ignored.")


def __convert_api_key_to_json(credentail, endpoint):
augmented_credential = {}
augmented_credential['id'] = credentail.id
augmented_credential['name'] = credentail.name
augmented_credential['value'] = credentail.value
augmented_credential['lastModified'] = credentail.last_modified
augmented_credential['readOnly'] = credentail.read_only
augmented_credential['connectionString'] = 'Endpoint=' + \
endpoint + ';Id=' + credentail.id + ';Secret=' + credentail.value
return augmented_credential
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Fri Dec 11 12:04:49 China Standard Time 2020
#Mon Dec 28 11:55:37 Pacific Standard Time 2020
Color=Red
Region=West US
feature-management.FalseFeature=false
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading