{ "swagger": "2.0", "info": { "title": "Azure Maps Resource Provider", "description": "Resource Provider", "version": "2018-05-01", "x-ms-code-generation-settings": { "name": "MapsManagementClient" } }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}": { "put": { "description": "Create or update a Maps Account. A Maps Account holds the keys which allow access to the Maps REST APIs.", "operationId": "Accounts_CreateOrUpdate", "x-ms-examples": { "CreateAccount": { "$ref": "./examples/CreateAccount.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/AccountNameParameter" }, { "name": "MapsAccountCreateParameters", "in": "body", "description": "The new or updated parameters for the Maps Account.", "required": true, "schema": { "$ref": "#/definitions/MapsAccountCreateParameters" } } ], "responses": { "200": { "description": "The Account was successfully updated.", "schema": { "$ref": "#/definitions/MapsAccount" } }, "201": { "description": "The Account was successfully created.", "schema": { "$ref": "#/definitions/MapsAccount" } }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "description": "Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku and Tags.", "operationId": "Accounts_Update", "x-ms-examples": { "UpdateAccount": { "$ref": "./examples/UpdateAccount.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/AccountNameParameter" }, { "name": "MapsAccountUpdateParameters", "in": "body", "description": "The updated parameters for the Maps Account.", "required": true, "schema": { "$ref": "#/definitions/MapsAccountUpdateParameters" } } ], "responses": { "200": { "description": "The Account was successfully updated.", "schema": { "$ref": "#/definitions/MapsAccount" } }, "404": { "description": "The specified Account was not found. Nothing was updated." }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "description": "Delete a Maps Account.", "operationId": "Accounts_Delete", "x-ms-examples": { "DeleteAccount": { "$ref": "./examples/DeleteAccount.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/AccountNameParameter" } ], "responses": { "200": { "description": "The Account was deleted successfully." }, "204": { "description": "The specified Account was not found. Nothing was deleted." }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } }, "get": { "description": "Get a Maps Account.", "operationId": "Accounts_Get", "x-ms-examples": { "GetAccount": { "$ref": "./examples/GetAccount.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/AccountNameParameter" } ], "responses": { "200": { "description": "The request was successful.", "schema": { "$ref": "#/definitions/MapsAccount" } }, "404": { "description": "The specified Account does not exist." }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts": { "get": { "description": "Get all Maps Accounts in a Resource Group", "operationId": "Accounts_ListByResourceGroup", "x-ms-examples": { "ListAccountsByResourceGroup": { "$ref": "./examples/ListAccountsByResourceGroup.json" } }, "x-ms-pageable": { "nextLinkName": null, "itemName": "value" }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { "description": "The request was successful.", "schema": { "$ref": "#/definitions/MapsAccounts" } }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Maps/accounts": { "get": { "description": "Get all Maps Accounts in a Subscription", "operationId": "Accounts_ListBySubscription", "x-ms-examples": { "ListAccountsBySubscription": { "$ref": "./examples/ListAccountsBySubscription.json" } }, "x-ms-pageable": { "nextLinkName": null, "itemName": "value" }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The request was successful.", "schema": { "$ref": "#/definitions/MapsAccounts" } }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources": { "post": { "description": "Moves Maps Accounts from one ResourceGroup (or Subscription) to another", "operationId": "Accounts_Move", "x-ms-examples": { "MoveAccounts": { "$ref": "./examples/MoveAccounts.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "name": "resourceGroupName", "in": "path", "description": "The name of the resource group that contains Maps Account to move.", "required": true, "type": "string" }, { "name": "moveRequest", "in": "body", "description": "The details of the Maps Account move.", "required": true, "schema": { "$ref": "#/definitions/MapsAccountsMoveRequest" } } ], "responses": { "200": { "description": "The Accounts were successfully moved." }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/listKeys": { "post": { "description": "Get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.", "operationId": "Accounts_ListKeys", "x-ms-examples": { "ListKeys": { "$ref": "./examples/ListKeys.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/AccountNameParameter" } ], "responses": { "200": { "description": "The request was successful.", "schema": { "$ref": "#/definitions/MapsAccountKeys" } }, "404": { "description": "The specified Account does not exist." }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/regenerateKey": { "post": { "description": "Regenerate either the primary or secondary key for use with the Maps APIs. The old key will stop working immediately.", "operationId": "Accounts_RegenerateKeys", "x-ms-examples": { "RegenerateKey": { "$ref": "./examples/RegenerateKey.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/AccountNameParameter" }, { "name": "keySpecification", "in": "body", "required": true, "description": "Which key to regenerate: primary or secondary.", "schema": { "$ref": "#/definitions/MapsKeySpecification" } } ], "responses": { "200": { "description": "The request was successful.", "schema": { "$ref": "#/definitions/MapsAccountKeys" } }, "404": { "description": "The specified Account does not exist." }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Maps/operations": { "get": { "description": "List operations available for the Maps Resource Provider", "operationId": "Accounts_ListOperations", "x-ms-examples": { "GetOperations": { "$ref": "./examples/GetOperations.json" } }, "x-ms-pageable": { "nextLinkName": null, "itemName": "value" }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "The request was successful.", "schema": { "$ref": "#/definitions/MapsOperations" } }, "default": { "description": "An unexpected error occurred.", "schema": { "$ref": "#/definitions/Error" } } } } } }, "parameters": { "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", "required": true, "type": "string", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." }, "ApiVersionParameter": { "name": "api-version", "in": "query", "required": true, "type": "string", "description": "Client Api Version." }, "ResourceGroupNameParameter": { "name": "resourceGroupName", "in": "path", "description": "The name of the Azure Resource Group.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "AccountNameParameter": { "name": "accountName", "in": "path", "description": "The name of the Maps Account.", "required": true, "type": "string", "x-ms-parameter-location": "method" } }, "definitions": { "Error": { "type": "object", "description": "This object is returned when an error occurs in the Maps API", "properties": { "code": { "type": "string", "readOnly": true, "description": "Error code." }, "message": { "type": "string", "readOnly": true, "description": "If available, a human readable description of the error." }, "target": { "type": "string", "readOnly": true, "description": "If available, the component generating the error." }, "details": { "type": "array", "readOnly": true, "description": "If available, a list of additional details about the error.", "items": { "type": "object", "properties": { "code": { "type": "string", "readOnly": true, "description": "Error code." }, "message": { "type": "string", "readOnly": true, "description": "If available, a human readable description of the error." }, "target": { "type": "string", "readOnly": true, "description": "If available, the component generating the error." } } } } } }, "Resource": { "description": "An Azure resource", "properties": { "id": { "readOnly": true, "type": "string", "description": "The fully qualified Maps Account resource identifier." }, "name": { "readOnly": true, "type": "string", "description": "The name of the Maps Account, which is unique within a Resource Group." }, "type": { "readOnly": true, "type": "string", "description": "Azure resource type." } }, "x-ms-azure-resource": true }, "MapsAccount": { "description": "An Azure resource which represents access to a suite of Maps REST APIs.", "type": "object", "properties": { "location": { "readOnly": true, "type": "string", "description": "The location of the resource." }, "tags": { "readOnly": true, "type": "object", "additionalProperties": { "type": "string" }, "description": "Gets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters." }, "sku": { "readOnly": true, "description": "The SKU of this account.", "$ref": "#/definitions/Sku" }, "properties": { "readOnly": true, "description": "The map account properties.", "$ref": "#/definitions/MapsAccountProperties" } }, "allOf": [ { "$ref": "#/definitions/Resource" } ] }, "MapsAccountCreateParameters": { "description": "Parameters used to create a new Maps Account.", "type": "object", "properties": { "location": { "type": "string", "description": "The location of the resource." }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters." }, "sku": { "description": "The SKU of this account.", "$ref": "#/definitions/Sku" } }, "required": [ "location", "sku" ] }, "MapsAccountUpdateParameters": { "description": "Parameters used to update an existing Maps Account.", "type": "object", "properties": { "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters." }, "sku": { "description": "The SKU of this account.", "$ref": "#/definitions/Sku" } } }, "MapsAccounts": { "description": "A list of Maps Accounts.", "type": "object", "properties": { "value": { "description": "a Maps Account.", "type": "array", "readOnly": true, "items": { "$ref": "#/definitions/MapsAccount" } } } }, "Sku": { "description": "The SKU of the Maps Account.", "properties": { "name": { "description": "The name of the SKU, in standard format (such as S0).", "type": "string" }, "tier": { "readOnly": true, "type": "string", "description": "Gets the sku tier. This is based on the SKU name." } }, "required": [ "name" ] }, "MapsAccountsMoveRequest": { "description": "The description of what resources to move between resource groups.", "type": "object", "required": [ "targetResourceGroup", "resourceIds" ], "properties": { "targetResourceGroup": { "type": "string", "description": "The name of the destination resource group." }, "resourceIds": { "type": "array", "items": { "type": "string" }, "description": "A list of resource names to move from the source resource group." } } }, "MapsKeySpecification": { "description": "Whether the operation refers to the primary or secondary key.", "type": "object", "required": [ "keyType" ], "properties": { "keyType": { "type": "string", "enum": [ "primary", "secondary" ], "x-ms-enum": { "name": "KeyType", "modelAsString": true }, "description": "Whether the operation refers to the primary or secondary key." } } }, "MapsAccountKeys": { "description": "The set of keys which can be used to access the Maps REST APIs. Two keys are provided for key rotation without interruption.", "type": "object", "properties": { "id": { "type": "string", "readOnly": true, "description": "The full Azure resource identifier of the Maps Account." }, "primaryKey": { "type": "string", "readOnly": true, "description": "The primary key for accessing the Maps REST APIs." }, "secondaryKey": { "type": "string", "readOnly": true, "description": "The secondary key for accessing the Maps REST APIs." } } }, "MapsOperations": { "description": "The set of operations available for Maps.", "type": "object", "properties": { "value": { "description": "An operation available for Maps.", "type": "array", "readOnly": true, "items": { "type": "object", "properties": { "name": { "type": "string", "readOnly": true, "description": "Operation name: {provider}/{resource}/{operation}." }, "display": { "description": "The human-readable description of the operation.", "type": "object", "properties": { "provider": { "type": "string", "readOnly": true, "description": "Service provider: Microsoft Maps." }, "resource": { "type": "string", "readOnly": true, "description": "Resource on which the operation is performed." }, "operation": { "type": "string", "readOnly": true, "description": "The action that users can perform, based on their permission level." }, "description": { "type": "string", "readOnly": true, "description": "The description of the operation." } } }, "origin": { "type": "string", "readOnly": true, "description": "The origin of the operation." } } } } } }, "MapsAccountProperties": { "description": "Additional Map account properties", "properties": { "x-ms-client-id": { "description": "A unique identifier for the maps account", "type": "string" } } } } }