swagger: "2.0"
schemes:
  - https
host: adminmanagement.local.azurestack.external
info:
  description: Alert operation endpoints and objects.
  title: InfrastructureInsightsManagementClient
  version: 2016-05-01
  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/azsadmin/resource-manager/infrastructureinsights/Microsoft.InfrastructureInsights.Admin/preview/2016-05-01/Alert.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: azsadmin-Alert
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Authorization uses an Azure Active Directory OAuth2 flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  AlertNameParameter:
    description: Name of the alert.
    in: path
    name: alertName
    required: true
    type: string
    x-ms-parameter-location: method
  AlertParameter:
    description: Updated alert parameter.
    in: body
    name: alert
    required: true
    schema:
      $ref: "#/definitions/Alert"
    x-ms-parameter-location: method
  UserParameter:
    description: The username used to perform the operation.
    in: query
    name: user
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/{location}/alerts":
    get:
      description: Returns the list of all alerts in a given region.
      operationId: Alerts_List
      parameters:
        - description: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the region
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2016-05-01
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
        - description: OData filter parameter.
          in: query
          name: $filter
          type: string
          x-ms-parameter-location: method
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/AlertList"
      tags:
        - Alerts
      x-ms-examples:
        Returns the list of all alerts in a given region.:
          parameters:
            api-version: 2016-05-01
            location: local
            resourceGroupName: System.local
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                nextLink: null
                value:
                  - id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/alerts/1fcf80bb-f889-44c5-8591-efd191812385
                    location: local
                    name: 1fcf80bb-f889-44c5-8591-efd191812385
                    properties:
                      alertId: 1fcf80bb-f889-44c5-8591-efd191812385
                      alertProperties:
                        description: ""
                        fabricName: fabric:/FabricResourceProvider
                        healthState: Warning
                        name: Capacity
                        serviceType: FabricResourceProvider
                      closedByUserAlias: ""
                      closedTimestamp: ""
                      createdTimestamp: 2017-08-12T20:28:56.897087Z
                      description:
                        - text: The infrastructure role Capacity is experiencing issues.
                          type: Text
                      faultId: ServiceFabric:/FabricResourceProvider/fabric:/FabricResourceProvider
                      faultTypeId: ServiceFabricApplicationUnhealthy
                      impactedResourceDisplayName: FabricResourceProvider
                      impactedResourceId: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/system.local/providers/Microsoft.Fabric.Admin/fabricLocations/local/infraRoles/FabricResourceProvider
                      lastUpdatedTimestamp: 2017-08-12T20:28:56.897087Z
                      remediation:
                        - text: "Please contact Support. Before you do, start the log file collection process using the guidance from "
                          type: Text
                        - linkType: Uri
                          resourceId: ""
                          type: LinkBegin
                          uri: https://aka.ms/azurestacklogfiles
                        - text: https://aka.ms/azurestacklogfiles
                          type: Text
                        - type: LinkEnd
                        - text: .
                          type: Text
                      resourceProviderRegistrationId: e56bc7b8-c8b5-4e25-b00c-4f951effb22c
                      resourceRegistrationId: ""
                      severity: Warning
                      state: Active
                      title: Infrastructure role is unhealthy
                    tags: {}
                    type: Microsoft.InfrastructureInsights.Admin/regionHealths/alerts
                  - id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/alerts/ca55be03-9be9-4deb-8467-e890ab1d116b
                    location: local
                    name: ca55be03-9be9-4deb-8467-e890ab1d116b
                    properties:
                      alertId: ca55be03-9be9-4deb-8467-e890ab1d116b
                      alertProperties:
                        description: ""
                        fabricName: FabricControllerRing
                        healthState: Warning
                        name: Infrastructure management controller
                        serviceType: FabricControllerRing
                      closedByUserAlias: ""
                      closedTimestamp: ""
                      createdTimestamp: 2017-08-12T20:28:56.912712Z
                      description:
                        - text: The infrastructure role Infrastructure management controller is experiencing issues.
                          type: Text
                      faultId: ServiceFabric:/FabricControllerRing/FabricControllerRing
                      faultTypeId: ServiceFabricClusterUnhealthy
                      impactedResourceDisplayName: Infrastructure management controller
                      impactedResourceId: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/system.local/providers/Microsoft.Fabric.Admin/fabricLocations/local/infraRoles/FabricControllerRing
                      lastUpdatedTimestamp: 2017-08-12T20:28:56.912712Z
                      remediation:
                        - text: "Please contact Support. Before you do, start the log file collection process using the guidance from "
                          type: Text
                        - linkType: Uri
                          resourceId: ""
                          type: LinkBegin
                          uri: https://aka.ms/azurestacklogfiles
                        - text: https://aka.ms/azurestacklogfiles
                          type: Text
                        - type: LinkEnd
                        - text: .
                          type: Text
                      resourceProviderRegistrationId: e56bc7b8-c8b5-4e25-b00c-4f951effb22c
                      resourceRegistrationId: 7cd4c25c-e946-4502-926b-e3c32737b116
                      severity: Warning
                      state: Active
                      title: Infrastructure role is unhealthy
                    tags: {}
                    type: Microsoft.InfrastructureInsights.Admin/regionHealths/alerts
      x-ms-odata: "#/definitions/Alert"
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/{location}/alerts/{alertName}":
    get:
      description: Returns the requested an alert.
      operationId: Alerts_Get
      parameters:
        - description: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the region
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/AlertNameParameter"
        - default: 2016-05-01
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Alert"
      tags:
        - Alerts
      x-ms-examples:
        Returns the requested an alert.:
          parameters:
            alertName: ca55be03-9be9-4deb-8467-e890ab1d116b
            api-version: 2016-05-01
            location: local
            resourceGroupName: System.local
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/alerts/ca55be03-9be9-4deb-8467-e890ab1d116b
                location: local
                name: ca55be03-9be9-4deb-8467-e890ab1d116b
                properties:
                  alertId: ca55be03-9be9-4deb-8467-e890ab1d116b
                  alertProperties:
                    description: ""
                    fabricName: FabricControllerRing
                    healthState: Warning
                    name: Infrastructure management controller
                    serviceType: FabricControllerRing
                  closedByUserAlias: ""
                  closedTimestamp: ""
                  createdTimestamp: 2017-08-12T20:28:56.912712Z
                  description:
                    - text: The infrastructure role Infrastructure management controller is experiencing issues.
                      type: Text
                  faultId: ServiceFabric:/FabricControllerRing/FabricControllerRing
                  faultTypeId: ServiceFabricClusterUnhealthy
                  impactedResourceDisplayName: Infrastructure management controller
                  impactedResourceId: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/system.local/providers/Microsoft.Fabric.Admin/fabricLocations/local/infraRoles/FabricControllerRing
                  lastUpdatedTimestamp: 2017-08-12T20:28:56.912712Z
                  remediation:
                    - text: "Please contact Support. Before you do, start the log file collection process using the guidance from "
                      type: Text
                    - linkType: Uri
                      resourceId: ""
                      type: LinkBegin
                      uri: https://aka.ms/azurestacklogfiles
                    - text: https://aka.ms/azurestacklogfiles
                      type: Text
                    - type: LinkEnd
                    - text: .
                      type: Text
                  resourceProviderRegistrationId: e56bc7b8-c8b5-4e25-b00c-4f951effb22c
                  resourceRegistrationId: 7cd4c25c-e946-4502-926b-e3c32737b116
                  severity: Warning
                  state: Active
                  title: Infrastructure role is unhealthy
                tags: {}
                type: Microsoft.InfrastructureInsights.Admin/regionHealths/alerts
    put:
      description: Closes the given alert.
      operationId: Alerts_Close
      parameters:
        - description: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the region
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/AlertNameParameter"
        - default: 2016-05-01
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
        - $ref: "#/parameters/UserParameter"
        - $ref: "#/parameters/AlertParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Alert"
      tags:
        - Alerts
      x-ms-examples:
        Closes the given alert.:
          parameters:
            alert:
              id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/alerts/ca55be03-9be9-4deb-8467-e890ab1d116b
              location: local
              name: ca55be03-9be9-4deb-8467-e890ab1d116b
              properties:
                closedByUserAlias: ciserviceadmin@msazurestack.onmicrosoft.com
                state: Closed
              tags: {}
              type: Microsoft.InfrastructureInsights.Admin/regionHealths/alerts
            alertName: ca55be03-9be9-4deb-8467-e890ab1d116b
            api-version: 2016-05-01
            location: local
            resourceGroupName: System.local
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
            user: ciserviceadmin@msazurestack.onmicrosoft.com
          responses:
            "200":
              body:
                id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/alerts/ca55be03-9be9-4deb-8467-e890ab1d116b
                location: local
                name: ca55be03-9be9-4deb-8467-e890ab1d116b
                properties:
                  alertId: ca55be03-9be9-4deb-8467-e890ab1d116b
                  alertProperties:
                    description: ""
                    fabricName: FabricControllerRing
                    healthState: Warning
                    name: Infrastructure management controller
                    serviceType: FabricControllerRing
                  closedByUserAlias: ciserviceadmin@msazurestack.onmicrosoft.com
                  closedTimestamp: ""
                  createdTimestamp: 2017-08-12T20:28:56.912712Z
                  description:
                    - text: The infrastructure role Infrastructure management controller is experiencing issues.
                      type: Text
                  faultId: ServiceFabric:/FabricControllerRing/FabricControllerRing
                  faultTypeId: ServiceFabricClusterUnhealthy
                  impactedResourceDisplayName: Infrastructure management controller
                  impactedResourceId: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/system.local/providers/Microsoft.Fabric.Admin/fabricLocations/local/infraRoles/FabricControllerRing
                  lastUpdatedTimestamp: 2017-08-12T20:28:56.912712Z
                  remediation:
                    - text: "Please contact Support. Before you do, start the log file collection process using the guidance from "
                      type: Text
                    - linkType: Uri
                      resourceId: ""
                      type: LinkBegin
                      uri: https://aka.ms/azurestacklogfiles
                    - text: https://aka.ms/azurestacklogfiles
                      type: Text
                    - type: LinkEnd
                    - text: .
                      type: Text
                  resourceProviderRegistrationId: e56bc7b8-c8b5-4e25-b00c-4f951effb22c
                  resourceRegistrationId: 7cd4c25c-e946-4502-926b-e3c32737b116
                  severity: Warning
                  state: Closed
                  title: Infrastructure role is unhealthy
                tags: {}
                type: Microsoft.InfrastructureInsights.Admin/regionHealths/alerts
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/{location}/alerts/{alertName}/repair":
    post:
      description: Repairs an alert.
      operationId: Alerts_Repair
      parameters:
        - description: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the region
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/AlertNameParameter"
        - default: 2016-05-01
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
        "202":
          description: ACCEPTED
      tags:
        - Alerts
      x-ms-examples:
        Repairs an alert.:
          parameters:
            alertName: ca55be03-9be9-4deb-8467-e890ab1d116b
            api-version: 2016-05-01
            location: local
            resourceGroupName: System.local
            subscriptionId: 20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200": {}
            "202": {}
      x-ms-long-running-operation: true
definitions:
  Alert:
    allOf:
      - allOf:
          - description: The core properties of ARM resources
            properties:
              id:
                description: Fully qualified resource Id for the resource
                readOnly: true
                type: string
              name:
                description: The name of the resource
                readOnly: true
                type: string
              type:
                description: The type of the resource.
                readOnly: true
                type: string
            x-ms-azure-resource: true
        description: The resource model definition for a ARM tracked top level resource
        properties:
          location:
            description: The Azure Region where the resource lives
            type: string
            x-ms-mutability:
              - read
              - create
          tags:
            additionalProperties:
              type: string
            description: Resource tags.
            type: object
            x-ms-mutability:
              - read
              - create
              - update
    description: This object represents an alert resource.
    properties:
      properties:
        $ref: "#/definitions/AlertModel"
        description: Contains information related to alerts.
        x-ms-client-flatten: true
    type: object
  AlertList:
    description: A pageable list of alerts
    properties:
      nextLink:
        description: URI to the next page.
        type: string
      value:
        description: List of alerts.
        items:
          $ref: "#/definitions/Alert"
        type: array
  AlertModel:
    description: Contains alert data.
    properties:
      alertId:
        description: Gets or sets the ID of the alert.
        type: string
      alertProperties:
        additionalProperties:
          type: string
        description: Properties of the alert.
        type: object
      closedByUserAlias:
        description: User alias who closed the alert.
        type: string
      closedTimestamp:
        description: Timestamp when the alert was closed.
        type: string
      createdTimestamp:
        description: Timestamp when the alert was created.
        type: string
      description:
        description: Description of the alert.
        items:
          additionalProperties:
            type: string
          description: Dictionary of string key-value pairs.
          type: object
        type: array
      faultId:
        description: Gets or sets the fault ID of the alert.
        type: string
      faultTypeId:
        description: Gets or sets the fault type ID of the alert.
        type: string
      hasValidRemediationAction:
        description: Indicates if the alert can be remediated.
        type: boolean
      impactedResourceDisplayName:
        description: Display name for the impacted item.
        type: string
      impactedResourceId:
        description: Gets or sets the Resource ID for the impacted item.
        type: string
      lastUpdatedTimestamp:
        description: Timestamp when the alert was last updated.
        type: string
      remediation:
        description: Gets or sets the admin friendly remediation instructions for the alert.
        items:
          additionalProperties:
            type: string
          description: Dictionary of string key-value pairs.
          type: object
        type: array
      resourceProviderRegistrationId:
        description: Gets or sets the registration ID of the service the alert belongs to.
        type: string
      resourceRegistrationId:
        description: Gets or sets the registration ID of the resource associated with the alert. If the alert is not associated with a resource, the resource registration ID is null.
        type: string
      severity:
        description: Severity of the alert.
        type: string
      state:
        description: State of the alert.
        type: string
      title:
        description: Gets or sets the Resource ID for the impacted item.
        type: string
