swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: API spec for Microsoft.Security (Azure Security Center) resource provider
  title: Security Center
  version: 2015-06-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/locations.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: security-locations
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  ExtendedResourceName:
    description: The name of the base resource
    in: path
    name: extendedResourceName
    required: true
    type: string
    x-ms-parameter-location: method
  ExtendedResourceProvider:
    description: Resource provider name of the base resource
    in: path
    name: extendedResourceProvider
    required: true
    type: string
    x-ms-parameter-location: method
  ExtendedResourceType:
    description: Type of the base resource
    in: path
    name: extendedResourceType
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations":
    get:
      description: The location of the responsible ASC of the specific subscription (home region). For each subscription there is only one responsible location. The location in the response should be used to read or write other resources in ASC according to their ID.
      operationId: Locations_List
      parameters:
        - description: API version for the operation
          in: query
          name: api-version
          required: true
          type: string
        - description: Azure subscription ID
          in: path
          name: subscriptionId
          pattern: ^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            description: List of locations where ASC saves your data
            properties:
              nextLink:
                description: The URI to fetch the next page.
                readOnly: true
                type: string
              value:
                items:
                  allOf:
                    - description: Describes an Azure resource.
                      properties:
                        id:
                          description: Resource Id
                          readOnly: true
                          type: string
                        name:
                          description: Resource name
                          readOnly: true
                          type: string
                        type:
                          description: Resource type
                          readOnly: true
                          type: string
                      type: object
                      x-ms-azure-resource: true
                  description: The ASC location of the subscription is in the "name" field
                  properties:
                    properties:
                      description: An empty set of properties
                      type: object
                  type: object
                readOnly: true
                type: array
            type: object
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error response structure.
            properties:
              error:
                description: Error details.
                properties:
                  code:
                    description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
                    readOnly: true
                    type: string
                  message:
                    description: A message describing the error, intended to be suitable for display in a user interface.
                    readOnly: true
                    type: string
                type: object
                x-ms-external: true
            type: object
            x-ms-external: true
      tags:
        - Locations
      x-ms-examples:
        Get security data locations:
          parameters:
            api-version: 2015-06-01-preview
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/centralus
                    name: centralus
                    properties:
                      homeRegionName: centralus
                    type: Microsoft.Security/locations
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}":
    get:
      description: Details of a specific location
      operationId: Locations_Get
      parameters:
        - description: API version for the operation
          in: query
          name: api-version
          required: true
          type: string
        - description: Azure subscription ID
          in: path
          name: subscriptionId
          pattern: ^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$
          required: true
          type: string
        - description: The location where ASC stores the data of the subscription. can be retrieved from Get locations
          in: path
          name: ascLocation
          required: true
          type: string
          x-ms-parameter-location: client
      responses:
        "200":
          description: OK
          schema:
            allOf:
              - description: Describes an Azure resource.
                properties:
                  id:
                    description: Resource Id
                    readOnly: true
                    type: string
                  name:
                    description: Resource name
                    readOnly: true
                    type: string
                  type:
                    description: Resource type
                    readOnly: true
                    type: string
                type: object
                x-ms-azure-resource: true
            description: The ASC location of the subscription is in the "name" field
            properties:
              properties:
                description: An empty set of properties
                type: object
            type: object
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error response structure.
            properties:
              error:
                description: Error details.
                properties:
                  code:
                    description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
                    readOnly: true
                    type: string
                  message:
                    description: A message describing the error, intended to be suitable for display in a user interface.
                    readOnly: true
                    type: string
                type: object
                x-ms-external: true
            type: object
            x-ms-external: true
      tags:
        - Locations
      x-ms-examples:
        Get security data location:
          parameters:
            api-version: 2015-06-01-preview
            ascLocation: centralus
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/centralus
                name: centralus
                properties:
                  homeRegionName: centralus
                type: Microsoft.Security/locations
