diff --git a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tileset_async.py b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tileset_async.py index 36f8d9cb643c..4227e4319f9a 100644 --- a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tileset_async.py +++ b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tileset_async.py @@ -37,7 +37,8 @@ async def get_map_tileset_async(): maps_render_client = MapsRenderClient(credential=AzureKeyCredential(subscription_key)) - result = maps_render_client.get_map_tileset(tileset_id=TilesetID.MICROSOFT_BASE) + async with maps_render_client: + result = await maps_render_client.get_map_tileset(tileset_id=TilesetID.MICROSOFT_BASE) print("Get map tileset result:") print(result) diff --git a/sdk/maps/test-resources.json b/sdk/maps/test-resources.json index 489c598cef3b..8a3cec157744 100644 --- a/sdk/maps/test-resources.json +++ b/sdk/maps/test-resources.json @@ -1,100 +1,100 @@ { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "baseName": { - "type": "string", - "defaultValue": "[resourceGroup().name]", + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "The base resource name." + } + }, + "endpointPrefix": { + "defaultValue": "maps", + "type": "string" + }, + "mapsServicesEndpointSuffix": { + "defaultValue": ".maps.azure.com", + "type": "string" + }, + "testApplicationOid": { + "type": "string", + "metadata": { + "description": "The client OID to grant access to test resources." + } + }, + "tenantId": { + "type": "string", "metadata": { - "description": "The base resource name." - } - }, - "endpointPrefix": { - "defaultValue": "maps", - "type": "string" - }, - "mapsServicesEndpointSuffix": { - "defaultValue": ".maps.azure.com", - "type": "string" - }, - "testApplicationOid": { - "type": "string", + "description": "The tenant id to which the application and resources belong." + } + }, + "testApplicationId": { + "type": "string", "metadata": { - "description": "The client OID to grant access to test resources." + "description": "The application client id used to run tests." } - }, - "tenantId": { - "type": "string", - "metadata": { - "description": "The tenant id to which the application and resources belong." + }, + "testApplicationSecret": { + "type": "string", + "metadata": { + "description": "The application client secret used to run tests." } + } + }, + "variables": { + "uniqueSubDomainName": "[format('{0}-{1}', parameters('baseName'), parameters('endpointPrefix'))]", + "contributorRoleId": "b24988ac-6180-42a0-ab88-20f7382dd24c", + "mapsAccountName": "[guid(resourceGroup().id, deployment().name, parameters('baseName'))]" + }, + "resources": [ + { + "type": "Microsoft.Maps/accounts", + "apiVersion": "2021-12-01-preview", + "name": "[variables('mapsAccountName')]", + "location": "eastus", + "sku": { + "name": "G2", + "tier": "Standard" }, - "testApplicationId": { - "type": "string", - "metadata": { - "description": "The application client id used to run tests." - } + "kind": "Gen2", + "identity": { + "type": "None" }, - "testApplicationSecret": { - "type": "string", - "metadata": { - "description": "The application client secret used to run tests." + "properties": { + "disableLocalAuth": false, + "cors": { + "corsRules": [ + { + "allowedOrigins": [ + "*" + ] + } + ] } } + } + ], + "outputs": { + "AZURE_TENANT_ID": { + "type": "string", + "value": "[parameters('tenantId')]" }, - "variables": { - "uniqueSubDomainName": "[format('{0}-{1}', parameters('baseName'), parameters('endpointPrefix'))]", - "contributorRoleId": "b24988ac-6180-42a0-ab88-20f7382dd24c", - "mapsAccountName": "[guid(resourceGroup().id, deployment().name, parameters('baseName'))]" + "AZURE_CLIENT_ID": { + "type": "string", + "value": "[parameters('testApplicationId')]" }, - "resources": [ - { - "type": "Microsoft.Maps/accounts", - "apiVersion": "2021-12-01-preview", - "name": "[variables('mapsAccountName')]", - "location": "eastus", - "sku": { - "name": "G2", - "tier": "Standard" - }, - "kind": "Gen2", - "identity": { - "type": "None" - }, - "properties": { - "disableLocalAuth": false, - "cors": { - "corsRules": [ - { - "allowedOrigins": [ - "*" - ] - } - ] - } - } - } - ], - "outputs": { - "AZURE_TENANT_ID": { - "type": "string", - "value": "[parameters('tenantId')]" - }, - "AZURE_CLIENT_ID": { - "type": "string", - "value": "[parameters('testApplicationId')]" - }, - "AZURE_CLIENT_SECRET": { - "type": "string", - "value": "[parameters('testApplicationSecret')]" - }, - "SUBSCRIPTION_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Maps/accounts',variables('mapsAccountName')), '2021-12-01-preview').primaryKey]" - }, - "RESOURCE_GROUP_NAME": { - "type": "string", - "value": "[resourceGroup().Name]" - } + "AZURE_CLIENT_SECRET": { + "type": "string", + "value": "[parameters('testApplicationSecret')]" + }, + "AZURE_SUBSCRIPTION_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Maps/accounts',variables('mapsAccountName')), '2021-12-01-preview').primaryKey]" + }, + "RESOURCE_GROUP_NAME": { + "type": "string", + "value": "[resourceGroup().Name]" } - } \ No newline at end of file + } +} \ No newline at end of file