swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Azure Log Analytics API reference for Solution.
  title: Azure Log Analytics - Operations Management
  version: 2015-11-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/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: operationsmanagement-OperationsManagement
  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:
  ApiVersionParameter:
    description: Client Api Version.
    in: query
    name: api-version
    required: true
    type: string
  ManagementAssociationNameParameter:
    description: User ManagementAssociation Name.
    in: path
    name: managementAssociationName
    required: true
    type: string
    x-ms-parameter-location: method
  ManagementConfigurationNameParameter:
    description: User Management Configuration Name.
    in: path
    name: managementConfigurationName
    required: true
    type: string
    x-ms-parameter-location: method
  ProviderNameParameter:
    description: Provider name for the parent resource.
    in: path
    name: providerName
    required: true
    type: string
    x-ms-parameter-location: client
  ResourceGroupNameParameter:
    description: The name of the resource group to get. The name is case insensitive.
    in: path
    maxLength: 90
    minLength: 1
    name: resourceGroupName
    pattern: ^[-\w\._\(\)]+$
    required: true
    type: string
    x-ms-parameter-location: method
  ResourceNameParameter:
    description: Parent resource name.
    in: path
    name: resourceName
    required: true
    type: string
    x-ms-parameter-location: client
  ResourceTypeParameter:
    description: Resource type for the parent resource
    in: path
    name: resourceType
    required: true
    type: string
    x-ms-parameter-location: client
  SolutionNameParameter:
    description: User Solution Name.
    in: path
    name: solutionName
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: Gets subscription credentials which 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
paths:
  /providers/Microsoft.OperationsManagement/operations:
    get:
      description: Lists all of the available OperationsManagement Rest API operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/OperationListResult"
      tags:
        - Operations
      x-ms-examples:
        OperationsList:
          parameters:
            api-version: 2015-11-01-preview
          responses:
            "200":
              body:
                - display:
                    description: Create new OMS solution
                    operation: Create new OMS solution
                    provider: Microsoft Operations Management
                    resource: Solutions
                  name: Microsoft.OperationsManagement/solutions/write
                - display:
                    description: Get exiting OMS solution
                    operation: Get existing OMS solution
                    provider: Microsoft Operations Management
                    resource: Solutions
                  name: Microsoft.OperationsManagement/solutions/read
                - display:
                    description: Delete existing OMS solution
                    operation: Delete existing OMS solution
                    provider: Microsoft Operations Management
                    resource: Solutions
                  name: Microsoft.OperationsManagement/solutions/delete
                - display:
                    description: Register a subscription to a resource provider.
                    operation: Register a subscription to a resource provider.
                    provider: Microsoft Operations Management
                    resource: Register
                  name: Microsoft.OperationsManagement/register/action
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementAssociations":
    get:
      description: Retrieves the ManagementAssociations list.
      operationId: ManagementAssociations_ListBySubscription
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
          schema:
            $ref: "#/definitions/ManagementAssociationPropertiesList"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Retrieves the ManagementAssociations list for the subscription
      tags:
        - ManagementAssociation
      x-ms-examples:
        SolutionList:
          parameters:
            api-version: 2015-11-01-preview
            subscriptionId: subid
          responses:
            "200":
              body:
                - id: subscriptions/subid/resourcegroups/rg1/providers/Microsoft.OperationalInsights/workspaces/ws1/Microsoft.OperationsManagement/ManagementAssociations/managementAssociation1
                  location: East US
                  name: managementAssociation1
                  type: Microsoft.OperationsManagement/ManagementAssociations
  "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementConfigurations":
    get:
      description: Retrieves the ManagementConfigurations list.
      operationId: ManagementConfigurations_ListBySubscription
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
          schema:
            $ref: "#/definitions/ManagementConfigurationPropertiesList"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Retrieves the ManagementConfigurations list for the subscription
      tags:
        - ManagementConfiguration
      x-ms-examples:
        SolutionList:
          parameters:
            api-version: 2015-11-01-preview
            subscriptionId: subid
          responses:
            "200":
              body:
                - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.OperationsManagement/ManagementConfiguration/managementConfiguration1
                  location: East US
                  name: managementConfiguration1
                  properties:
                    applicationId: /subscriptions/sub1/resourcegroups/rg1/providers/Microsoft.Appliance/Appliances/managementConfiguration1
                    parameters:
                      - name: jsonobject
                        value:
                          displayName: abcde
                          query: hello
                    parentResourceType: Microsoft.OperationalInsights/workspaces
                    template:
                      $schema: https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json
                      contentVersion: 1.0.0.0
                      outputs: {}
                      parameters:
                        jsonobject:
                          type: object
                        managementConfigurationName:
                          type: string
                        parentResourceName:
                          type: string
                      resources:
                        - apiVersion: 2015-11-01-preview
                          dependsOn: []
                          name: "[concat(parameters('parentResourceName'), '/', parameters('managementConfigurationName'), '-', parameters('jsonobject').displayName)]"
                          properties:
                            Category: A-Templated
                            DisplayName: "[parameters('jsonobject').displayName]"
                            ETag: "*"
                            Query: "[parameters('jsonobject').query]"
                            Version: 1
                          type: Microsoft.OperationalInsights/workspaces/savedsearches
                  type: Microsoft.OperationsManagement/ManagementConfigurations
  "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/solutions":
    get:
      description: Retrieves the solution list. It will retrieve both first party and third party solutions
      operationId: Solutions_ListBySubscription
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
          schema:
            $ref: "#/definitions/SolutionPropertiesList"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Retrieves the solution list for the subscription
      tags:
        - Solution
      x-ms-examples:
        SolutionList:
          parameters:
            api-version: 2015-11-01-preview
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.OperationsManagement/solutions/solution1
                    location: East US
                    name: solution1
                    plan:
                      name: name1
                      product: product1
                      promotionCode: promocode1
                      publisher: publisher1
                    properties:
                      containedResources:
                        - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource1
                        - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource2
                      provisioningState: Succeeded
                      referencedResources:
                        - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource2
                        - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource3
                      workspaceResourceId: /subscriptions/sub2/resourceGroups/rg2/providers/Microsoft.OperationalInsights/workspaces/ws1
                    type: Microsoft.OperationsManagement/solutions
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}":
    delete:
      description: Deletes the ManagementConfiguration in the subscription.
      operationId: ManagementConfigurations_Delete
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ManagementConfigurationNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Deletes the ManagementConfiguration
      tags:
        - ManagementConfiguration
      x-ms-examples:
        ManagementConfigurationDelete:
          parameters:
            api-version: 2015-11-01-preview
            managementConfigurationName: managementConfigurationName
            resourceGroupName: rg1
            solutionName: managementConfiguration1
            subscriptionId: subid
          responses:
            "200": {}
    get:
      description: Retrieves the user ManagementConfiguration.
      operationId: ManagementConfigurations_Get
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ManagementConfigurationNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
          schema:
            $ref: "#/definitions/ManagementConfiguration"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Retrieve ManagementConfiguration.
      tags:
        - ManagementConfiguration
      x-ms-examples:
        SolutionGet:
          parameters:
            api-version: 2015-11-01-preview
            managementConfigurationName: managementConfigurationName
            resourceGroupName: rg1
            solutionName: managementConfiguration1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.OperationsManagement/ManagementConfigurations/managementConfiguration1
                location: East US
                name: managementConfiguration1
                type: Microsoft.OperationsManagement/ManagementConfigurations
    put:
      description: Creates or updates the ManagementConfiguration.
      operationId: ManagementConfigurations_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/ManagementConfigurationNameParameter"
        - description: The parameters required to create OMS Solution.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ManagementConfiguration"
      responses:
        "200":
          description: OK response definition.
          schema:
            $ref: "#/definitions/ManagementConfiguration"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Create/Update ManagementConfiguration.
      tags:
        - ManagementConfiguration
      x-ms-examples:
        ManagementConfigurationCreate:
          parameters:
            api-version: 2015-11-01-preview
            managementConfigurationName: managementConfiguration1
            parameters:
              location: East US
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: subscriptions/subid/resourcegroups/rg1/providers/Microsoft.OperationsManagement/ManagementConfigurations/managementConfiguration1
                location: East US
                name: managementConfiguration1
                type: Microsoft.OperationsManagement/ManagementConfigurations
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions":
    get:
      description: Retrieves the solution list. It will retrieve both first party and third party solutions
      operationId: Solutions_ListByResourceGroup
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
          schema:
            $ref: "#/definitions/SolutionPropertiesList"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Retrieves the solution list for the subscription
      tags:
        - Solution
      x-ms-examples:
        SolutionList:
          parameters:
            api-version: 2015-11-01-preview
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.OperationsManagement/solutions/solution1
                    location: East US
                    name: solution1
                    plan:
                      name: name1
                      product: product1
                      promotionCode: promocode1
                      publisher: publisher1
                    properties:
                      containedResources:
                        - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource1
                        - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource2
                      provisioningState: Succeeded
                      referencedResources:
                        - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource2
                        - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource3
                      workspaceResourceId: /subscriptions/sub2/resourceGroups/rg2/providers/Microsoft.OperationalInsights/workspaces/ws1
                    type: Microsoft.OperationsManagement/solutions
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}":
    delete:
      description: Deletes the solution in the subscription.
      operationId: Solutions_Delete
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/SolutionNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Deletes the solution
      tags:
        - Solution
      x-ms-examples:
        SolutionDelete:
          parameters:
            api-version: 2015-11-01-preview
            resourceGroupName: rg1
            solutionName: solution1
            subscriptionId: subid
          responses:
            "200": {}
      x-ms-long-running-operation: true
    get:
      description: Retrieves the user solution.
      operationId: Solutions_Get
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/SolutionNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
          schema:
            $ref: "#/definitions/Solution"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Retrieve solution.
      tags:
        - Solution
      x-ms-examples:
        SolutionGet:
          parameters:
            api-version: 2015-11-01-preview
            resourceGroupName: rg1
            solutionName: solution1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.OperationsManagement/solutions/solution1
                location: East US
                name: solution1
                plan:
                  name: name1
                  product: product1
                  promotionCode: promocode1
                  publisher: publisher1
                properties:
                  containedResources:
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource1
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource2
                  provisioningState: Succeeded
                  referencedResources:
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource2
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource3
                  workspaceResourceId: /subscriptions/sub2/resourceGroups/rg2/providers/Microsoft.OperationalInsights/workspaces/ws1
                type: Microsoft.OperationsManagement/solutions
    patch:
      description: Patch a Solution. Only updating tags supported.
      operationId: Solutions_Update
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SolutionNameParameter"
        - description: The parameters required to patch a Solution.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/SolutionPatch"
      responses:
        "200":
          description: Patch succeeded.
          schema:
            $ref: "#/definitions/Solution"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Patch a Solution.
      tags:
        - Solution
      x-ms-examples:
        SolutionUpdate:
          parameters:
            api-version: 2015-11-01-preview
            parameters:
              tags:
                Dept: IT
                Environment: Test
            resourceGroupName: rg1
            solutionName: solution1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: subscriptions/subid/resourcegroups/rg1/providers/Microsoft.OperationsManagement/solutions/solution1
                location: East US
                name: solution1
                plan:
                  name: name1
                  product: product1
                  promotionCode: promocode1
                  publisher: publisher1
                properties:
                  containedResources:
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource1
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource2
                  provisioningState: Succeeded
                  referencedResources:
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource2
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource3
                  workspaceResourceId: /subscriptions/sub2/resourceGroups/rg2/providers/Microsoft.OperationalInsights/workspaces/ws1
                tags:
                  Dept: IT
                  Environment: Test
                type: Microsoft.OperationsManagement/solution
      x-ms-long-running-operation: true
    put:
      description: Creates or updates the Solution.
      operationId: Solutions_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SolutionNameParameter"
        - description: The parameters required to create OMS Solution.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/Solution"
      responses:
        "201":
          description: Created response definition.
          schema:
            $ref: "#/definitions/Solution"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Create/Update Solution.
      tags:
        - Solution
      x-ms-examples:
        SolutionCreate:
          parameters:
            api-version: 2015-11-01-preview
            parameters:
              location: East US
              plan:
                name: name1
                product: product1
                promotionCode: promocode1
                publisher: publisher1
              properties:
                containedResources:
                  - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource1
                  - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource2
                referencedResources:
                  - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource2
                  - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource3
                workspaceResourceId: /subscriptions/sub2/resourceGroups/rg2/providers/Microsoft.OperationalInsights/workspaces/ws1
            resourceGroupName: rg1
            solutionName: solution1
            subscriptionId: subid
          responses:
            "201":
              body:
                id: subscriptions/subid/resourcegroups/rg1/providers/Microsoft.OperationsManagement/solutions/solution1
                location: East US
                name: solution1
                plan:
                  name: name1
                  product: product1
                  promotionCode: promocode1
                  publisher: publisher1
                properties:
                  containedResources:
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource1
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource2
                  provisioningState: Succeeded
                  referencedResources:
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource2
                    - /subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource3
                  workspaceResourceId: /subscriptions/sub2/resourceGroups/rg2/providers/Microsoft.OperationalInsights/workspaces/ws1
                type: Microsoft.OperationsManagement/solution
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}":
    delete:
      description: Deletes the ManagementAssociation in the subscription.
      operationId: ManagementAssociations_Delete
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ProviderNameParameter"
        - $ref: "#/parameters/ResourceTypeParameter"
        - $ref: "#/parameters/ResourceNameParameter"
        - $ref: "#/parameters/ManagementAssociationNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Deletes the ManagementAssociation
      tags:
        - ManagementAssociation
      x-ms-examples:
        SolutionDelete:
          parameters:
            api-version: 2015-11-01-preview
            managementAssociationName: managementAssociationName
            managementConfigurationName: managementConfigurationName
            providerName: providerName
            resourceGroupName: rg1
            resourceName: resourceName
            resourceType: resourceType
            solutionName: ManagementAssociation1
            subscriptionId: subid
          responses:
            "200": {}
    get:
      description: Retrieves the user ManagementAssociation.
      operationId: ManagementAssociations_Get
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ProviderNameParameter"
        - $ref: "#/parameters/ResourceTypeParameter"
        - $ref: "#/parameters/ResourceNameParameter"
        - $ref: "#/parameters/ManagementAssociationNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK response definition.
          schema:
            $ref: "#/definitions/ManagementAssociation"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Retrieve ManagementAssociation.
      tags:
        - ManagementAssociation
      x-ms-examples:
        SolutionGet:
          parameters:
            api-version: 2015-11-01-preview
            managementAssociationName: managementAssociation1
            providerName: providerName
            resourceGroupName: rg1
            resourceName: resourceName
            resourceType: resourceType
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourcegroups/rg1/providers/Microsoft.OperationalInsights/workspaces/ws1/Microsoft.OperationsManagement/ManagementAssociations/managementAssociation1
                location: East US
                name: managementAssociation1
                properties:
                  applicationId: /subscriptions/sub1/resourcegroups/rg1/providers/Microsoft.Appliance/Appliances/appliance1
                type: Microsoft.OperationsManagement/ManagementAssociations
    put:
      description: Creates or updates the ManagementAssociation.
      operationId: ManagementAssociations_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/ProviderNameParameter"
        - $ref: "#/parameters/ResourceTypeParameter"
        - $ref: "#/parameters/ResourceNameParameter"
        - $ref: "#/parameters/ManagementAssociationNameParameter"
        - description: The parameters required to create ManagementAssociation extension.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ManagementAssociation"
      responses:
        "200":
          description: OK response definition.
          schema:
            $ref: "#/definitions/ManagementAssociation"
        default:
          description: Error response definition.
          schema:
            $ref: "#/definitions/CodeMessageError"
      summary: Create/Update ManagementAssociation.
      tags:
        - ManagementAssociation
      x-ms-examples:
        SolutionCreate:
          parameters:
            api-version: 2015-11-01-preview
            managementAssociationName: managementAssociation1
            parameters:
              location: East US
              properties:
                applicationId: /subscriptions/sub1/resourcegroups/rg1/providers/Microsoft.Appliance/Appliances/appliance1
            providerName: providerName
            resourceGroupName: rg1
            resourceName: resourceName
            resourceType: resourceType
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourcegroups/rg1/providers/Microsoft.OperationalInsights/workspaces/ws1/Microsoft.OperationsManagement/ManagementAssociations/managementAssociation1
                location: East US
                name: managementAssociation1
                properties:
                  applicationId: /subscriptions/sub1/resourcegroups/rg1/providers/Microsoft.Appliance/Appliances/appliance1
                type: Microsoft.OperationsManagement/ManagementAssociations
definitions:
  ArmTemplateParameter:
    description: Parameter to pass to ARM template
    properties:
      name:
        description: name of the parameter.
        type: string
      value:
        description: "value for the parameter. In Jtoken "
        type: string
  CodeMessageError:
    description: The error body contract.
    properties:
      error:
        description: The error details for a failed request.
        properties:
          code:
            description: The error type.
            type: string
          message:
            description: The error message.
            type: string
        type: object
  ManagementAssociation:
    description: The container for solution.
    properties:
      id:
        description: Resource ID.
        readOnly: true
        type: string
      location:
        description: Resource location
        type: string
      name:
        description: Resource name.
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/ManagementAssociationProperties"
        description: Properties for ManagementAssociation object supported by the OperationsManagement resource provider.
      type:
        description: Resource type.
        readOnly: true
        type: string
    x-ms-azure-resource: true
  ManagementAssociationProperties:
    description: ManagementAssociation properties supported by the OperationsManagement resource provider.
    properties:
      applicationId:
        description: The applicationId of the appliance for this association.
        type: string
    required:
      - applicationId
    x-ms-azure-resource: true
  ManagementAssociationPropertiesList:
    description: the list of ManagementAssociation response
    properties:
      value:
        description: List of Management Association properties within the subscription.
        items:
          $ref: "#/definitions/ManagementAssociation"
        type: array
  ManagementConfiguration:
    description: The container for solution.
    properties:
      id:
        description: Resource ID.
        readOnly: true
        type: string
      location:
        description: Resource location
        type: string
      name:
        description: Resource name.
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/ManagementConfigurationProperties"
        description: Properties for ManagementConfiguration object supported by the OperationsManagement resource provider.
      type:
        description: Resource type.
        readOnly: true
        type: string
    x-ms-azure-resource: true
  ManagementConfigurationProperties:
    description: ManagementConfiguration properties supported by the OperationsManagement resource provider.
    properties:
      applicationId:
        description: The applicationId of the appliance for this Management.
        type: string
      parameters:
        description: Parameters to run the ARM template
        items:
          $ref: "#/definitions/ArmTemplateParameter"
        type: array
      parentResourceType:
        description: The type of the parent resource.
        type: string
      provisioningState:
        description: The provisioning state for the ManagementConfiguration.
        readOnly: true
        type: string
      template:
        description: The Json object containing the ARM template to deploy
        type: object
    required:
      - parameters
      - parentResourceType
      - template
    x-ms-azure-resource: true
  ManagementConfigurationPropertiesList:
    description: the list of ManagementConfiguration response
    properties:
      value:
        description: List of Management Configuration properties within the subscription.
        items:
          $ref: "#/definitions/ManagementConfiguration"
        type: array
  Operation:
    description: Supported operation of OperationsManagement resource provider.
    properties:
      display:
        description: Display metadata associated with the operation.
        properties:
          operation:
            description: "Type of operation: get, read, delete, etc."
            type: string
          provider:
            description: "Service provider: Microsoft OperationsManagement."
            type: string
          resource:
            description: Resource on which the operation is performed etc.
            type: string
      name:
        description: "Operation name: {provider}/{resource}/{operation}"
        type: string
  OperationListResult:
    description: Result of the request to list solution operations.
    properties:
      value:
        description: List of solution operations supported by the OperationsManagement resource provider.
        items:
          $ref: "#/definitions/Operation"
        type: array
  Solution:
    description: The container for solution.
    properties:
      id:
        description: Resource ID.
        readOnly: true
        type: string
      location:
        description: Resource location
        type: string
      name:
        description: Resource name.
        readOnly: true
        type: string
      plan:
        $ref: "#/definitions/SolutionPlan"
        description: Plan for solution object supported by the OperationsManagement resource provider.
      properties:
        $ref: "#/definitions/SolutionProperties"
        description: Properties for solution object supported by the OperationsManagement resource provider.
      tags:
        additionalProperties:
          type: string
        description: Resource tags
        type: object
      type:
        description: Resource type.
        readOnly: true
        type: string
    x-ms-azure-resource: true
  SolutionPatch:
    description: The properties of a Solution that can be patched.
    properties:
      tags:
        additionalProperties:
          type: string
        description: Resource tags
        type: object
    x-ms-azure-resource: true
  SolutionPlan:
    description: Plan for solution object supported by the OperationsManagement resource provider.
    properties:
      name:
        description: name of the solution to be created. For Microsoft published solution it should be in the format of solutionType(workspaceName). SolutionType part is case sensitive. For third party solution, it can be anything.
        type: string
      product:
        description: name of the solution to enabled/add. For Microsoft published gallery solution it should be in the format of OMSGallery/<solutionType>. This is case sensitive
        type: string
      promotionCode:
        description: promotionCode, Not really used now, can you left as empty
        type: string
      publisher:
        description: Publisher name. For gallery solution, it is Microsoft.
        type: string
  SolutionProperties:
    description: Solution properties supported by the OperationsManagement resource provider.
    properties:
      containedResources:
        description: The azure resources that will be contained within the solutions. They will be locked and gets deleted automatically when the solution is deleted.
        items:
          description: the azure resourceId of the resource.
          type: string
        type: array
      provisioningState:
        description: The provisioning state for the solution.
        readOnly: true
        type: string
      referencedResources:
        description: The resources that will be referenced from this solution. Deleting any of those solution out of band will break the solution.
        items:
          description: the azure resourceId of the resource.
          type: string
        type: array
      workspaceResourceId:
        description: The azure resourceId for the workspace where the solution will be deployed/enabled.
        type: string
    required:
      - workspaceResourceId
    x-ms-azure-resource: true
  SolutionPropertiesList:
    description: the list of solution response
    properties:
      value:
        description: List of solution properties within the subscription.
        items:
          $ref: "#/definitions/Solution"
        type: array
