{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-maps/json-schema/microsoft-azure-maps-maps-account-schema.json",
  "title": "MapsAccount",
  "description": "An Azure resource which represents access to a suite of Maps REST APIs.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-maps-accounts-api-openapi.yml#/components/schemas/MapsAccount",
  "type": "object",
  "properties": {
    "sku": {
      "description": "The SKU of this account.",
      "$ref": "#/$defs/Sku"
    },
    "kind": {
      "description": "Get or Set Kind property.",
      "$ref": "#/$defs/Kind"
    },
    "systemData": {
      "$ref": "#/$defs/systemData"
    },
    "identity": {
      "$ref": "#/$defs/ManagedServiceIdentity"
    },
    "properties": {
      "description": "The map account properties.",
      "$ref": "#/$defs/MapsAccountProperties"
    }
  },
  "required": [
    "sku"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "x-ms-azure-resource": true,
  "$defs": {
    "CorsRule": {
      "type": "object",
      "properties": {
        "allowedOrigins": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or \"*\" to allow all domains"
        }
      },
      "required": [
        "allowedOrigins"
      ],
      "description": "Specifies a CORS rule for the Map Account."
    },
    "CorsRules": {
      "type": "object",
      "properties": {
        "corsRules": {
          "type": "array",
          "maxItems": 5,
          "items": {
            "description": "Specifies a CORS rule for the Map Account.",
            "$ref": "#/$defs/CorsRule"
          },
          "x-ms-identifiers": [],
          "description": "The list of CORS rules. You can include up to five CorsRule elements in the request. "
        }
      },
      "description": "Sets the CORS rules. You can include up to five CorsRule elements in the request. "
    },
    "Kind": {
      "description": "The Kind of the Maps Account.",
      "type": "string",
      "default": "Gen1",
      "enum": [
        "Gen1",
        "Gen2"
      ],
      "x-ms-enum": {
        "name": "kind",
        "modelAsString": true
      }
    },
    "LinkedResource": {
      "type": "object",
      "properties": {
        "uniqueName": {
          "type": "string",
          "description": "A provided name which uniquely identifies the linked resource."
        },
        "id": {
          "type": "string",
          "description": "ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}'."
        }
      },
      "required": [
        "uniqueName",
        "id"
      ],
      "description": "Linked resource is reference to a resource deployed in an Azure subscription, add the linked resource `uniqueName` value as an optional parameter for operations on Azure Maps Geospatial REST APIs."
    },
    "LinkedResources": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "$ref": "#/$defs/LinkedResource"
      },
      "description": "The array of associated resources to the Map account. Linked resource in the array cannot individually update, you must update all linked resources in the array together. These resources may be used on operations on the Azure Maps REST API. Access is controlled by the Map Account Managed Identity(s) permissions to those resource(s)."
    },
    "ManagedServiceIdentity": {
      "type": "object",
      "description": "Managed service identity (system assigned and/or user assigned identities)",
      "properties": {
        "principalId": {
          "type": "string",
          "format": "uuid",
          "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "tenantId": {
          "type": "string",
          "format": "uuid",
          "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/ManagedServiceIdentityType"
        },
        "userAssignedIdentities": {
          "$ref": "#/$defs/UserAssignedIdentities"
        }
      },
      "required": [
        "type"
      ]
    },
    "MapsAccountProperties": {
      "description": "Additional Map account properties",
      "type": "object",
      "properties": {
        "uniqueId": {
          "description": "A unique identifier for the maps account",
          "type": "string",
          "readOnly": true
        },
        "disableLocalAuth": {
          "description": "Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys and Shared Access Signature Token authentication from any usage.",
          "type": "boolean",
          "default": false
        },
        "provisioningState": {
          "type": "string",
          "description": "The provisioning state of the Map account resource, Account updates can only be performed on terminal states. Terminal states: `Succeeded` and `Failed`",
          "readOnly": true
        },
        "linkedResources": {
          "$ref": "#/$defs/LinkedResources"
        },
        "cors": {
          "$ref": "#/$defs/CorsRules",
          "description": "Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service."
        },
        "encryption": {
          "$ref": "#/$defs/encryption"
        }
      }
    },
    "Sku": {
      "description": "The SKU of the Maps Account.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the SKU, in standard format (such as S0).",
          "type": "string",
          "enum": [
            "S0",
            "S1",
            "G2"
          ],
          "x-ms-enum": {
            "name": "name",
            "modelAsString": true
          }
        },
        "tier": {
          "readOnly": true,
          "type": "string",
          "description": "Gets the sku tier. This is based on the SKU name."
        }
      },
      "required": [
        "name"
      ]
    },
    "TrackedResource": {
      "title": "Tracked Resource",
      "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
      "type": "object",
      "properties": {
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create",
            "update"
          ],
          "description": "Resource tags."
        },
        "location": {
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ],
          "description": "The geo-location where the resource lives"
        }
      },
      "required": [
        "location"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "encryption": {
      "type": "object",
      "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.",
      "properties": {
        "infrastructureEncryption": {
          "type": "string",
          "description": "Values are enabled and disabled.",
          "enum": [
            "enabled",
            "disabled"
          ],
          "x-ms-enum": {
            "name": "InfrastructureEncryption",
            "modelAsString": true
          }
        },
        "customerManagedKeyEncryption": {
          "$ref": "#/$defs/customerManagedKeyEncryption",
          "description": "All Customer-managed key encryption properties for the resource."
        }
      }
    },
    "systemData": {
      "type": "object",
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource."
        },
        "createdByType": {
          "type": "string",
          "description": "The type of identity that created the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource."
        },
        "lastModifiedByType": {
          "type": "string",
          "description": "The type of identity that last modified the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)"
        }
      },
      "readOnly": true
    }
  }
}