swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  title: AutomationManagement
  version: 2015-10-31
  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/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/hybridRunbookWorkerGroup.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: automation-hybridRunbookWorkerGroup
  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: {}
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups":
    get:
      description: Retrieve a list of hybrid runbook worker groups.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations
      operationId: HybridRunbookWorkerGroup_ListByAutomationAccount
      parameters:
        - description: Name of an Azure Resource group.
          in: path
          maxLength: 90
          minLength: 1
          name: resourceGroupName
          pattern: ^[-\w\._]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the automation account.
          in: path
          name: automationAccountName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The filter to apply on the operation.
          in: query
          name: $filter
          required: false
          type: string
        - 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
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/HybridRunbookWorkerGroupsListResult"
        default:
          description: Automation error response describing why the operation failed.
          schema:
            description: Error response of an operation failure
            properties:
              code:
                description: Error code
                type: string
              message:
                description: Error message indicating why the operation failed.
                type: string
            type: object
      tags:
        - HybridRunbookWorkerGroup
      x-ms-examples:
        List hybrid worker groups by Automation Account:
          parameters:
            api-version: 2015-10-31
            automationAccountName: testaccount
            hybridRunbookWorkerGroupName: TestWorkerGroup
            resourceGroupName: udtest
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - credential:
                      name: myRunAsCredentialName
                    hybridRunbookWorkers:
                      - ip: 134.1.1.1
                        name: TestMachine
                        registrationTime: 2017-03-24T12:43:43.053855-07:00
                    id: /subscriptions/subid/resourceGroups/udtest/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestWorkerGroup
                    name: TestWorkerGroup
              headers: {}
      x-ms-odata: "#/definitions/HybridRunbookWorkerGroup"
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}":
    delete:
      description: Delete a hybrid runbook worker group.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations
      operationId: HybridRunbookWorkerGroup_Delete
      parameters:
        - description: Name of an Azure Resource group.
          in: path
          maxLength: 90
          minLength: 1
          name: resourceGroupName
          pattern: ^[-\w\._]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the automation account.
          in: path
          name: automationAccountName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The hybrid runbook worker group name
          in: path
          name: hybridRunbookWorkerGroupName
          required: true
          type: string
        - 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
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
        default:
          description: Automation error response describing why the operation failed.
          schema:
            description: Error response of an operation failure
            properties:
              code:
                description: Error code
                type: string
              message:
                description: Error message indicating why the operation failed.
                type: string
            type: object
      tags:
        - HybridRunbookWorkerGroup
      x-ms-examples:
        Delete a hybrid worker group:
          parameters:
            api-version: 2015-10-31
            automationAccountName: myAutomationAccount20
            hybridRunbookWorkerGroupName: myGroup
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200": {}
    get:
      description: Retrieve a hybrid runbook worker group.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations
      operationId: HybridRunbookWorkerGroup_Get
      parameters:
        - description: Name of an Azure Resource group.
          in: path
          maxLength: 90
          minLength: 1
          name: resourceGroupName
          pattern: ^[-\w\._]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the automation account.
          in: path
          name: automationAccountName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The hybrid runbook worker group name
          in: path
          name: hybridRunbookWorkerGroupName
          required: true
          type: string
        - 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
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/HybridRunbookWorkerGroup"
        default:
          description: Automation error response describing why the operation failed.
          schema:
            description: Error response of an operation failure
            properties:
              code:
                description: Error code
                type: string
              message:
                description: Error message indicating why the operation failed.
                type: string
            type: object
      tags:
        - HybridRunbookWorkerGroup
      x-ms-examples:
        Get a hybrid worker group:
          parameters:
            api-version: 2015-10-31
            automationAccountName: testaccount
            hybridRunbookWorkerGroupName: TestHybridGroup
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                credential:
                  name: myRunAsCredentialName
                hybridRunbookWorkers:
                  - ip: 100.1.1.1
                    name: TestHybridWorker
                    registrationTime: 2017-03-24T12:43:45.0146578-07:00
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup
                name: TestHybridGroup
              headers: {}
    patch:
      description: Update a hybrid runbook worker group.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations
      operationId: HybridRunbookWorkerGroup_Update
      parameters:
        - description: Name of an Azure Resource group.
          in: path
          maxLength: 90
          minLength: 1
          name: resourceGroupName
          pattern: ^[-\w\._]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the automation account.
          in: path
          name: automationAccountName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The hybrid runbook worker group name
          in: path
          name: hybridRunbookWorkerGroupName
          required: true
          type: string
        - description: The hybrid runbook worker group
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/HybridRunbookWorkerGroupUpdateParameters"
        - 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
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/HybridRunbookWorkerGroup"
        default:
          description: Automation error response describing why the operation failed.
          schema:
            description: Error response of an operation failure
            properties:
              code:
                description: Error code
                type: string
              message:
                description: Error message indicating why the operation failed.
                type: string
            type: object
      tags:
        - HybridRunbookWorkerGroup
      x-ms-examples:
        Update hybrid worker group:
          parameters:
            api-version: 2015-10-31
            automationAccountName: testaccount
            hybridRunbookWorkerGroupName: TestHybridGroup
            parameters:
              credential:
                name: myRunAsCredentialName
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                credential:
                  name: myRunAsCredentialName
                hybridRunbookWorkers:
                  - ip: 100.1.1.1
                    name: TestHybridWorker
                    registrationTime: 2017-03-24T12:43:45.0146578-07:00
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup
                name: TestHybridGroup
              headers: {}
definitions:
  HybridRunbookWorker:
    description: Definition of hybrid runbook worker.
    properties:
      ip:
        description: Gets or sets the assigned machine IP address.
        type: string
      lastSeenDateTime:
        description: Last Heartbeat from the Worker
        format: date-time
        type: string
        x-nullable: false
      name:
        description: Gets or sets the worker machine name.
        type: string
      registrationTime:
        description: Gets or sets the registration time of the worker machine.
        format: date-time
        type: string
        x-nullable: false
  HybridRunbookWorkerGroup:
    description: Definition of hybrid runbook worker group.
    properties:
      credential:
        $ref: "#/definitions/RunAsCredentialAssociationProperty"
        description: Sets the credential of a worker group.
      groupType:
        description: Type of the HybridWorkerGroup.
        enum:
          - User
          - System
        type: string
        x-ms-enum:
          modelAsString: true
          name: GroupTypeEnum
      hybridRunbookWorkers:
        description: Gets or sets the list of hybrid runbook workers.
        items:
          $ref: "#/definitions/HybridRunbookWorker"
        type: array
      id:
        description: Gets or sets the id of the resource.
        type: string
      name:
        description: Gets or sets the name of the group.
        type: string
  HybridRunbookWorkerGroupUpdateParameters:
    description: Parameters supplied to the update operation.
    properties:
      credential:
        $ref: "#/definitions/RunAsCredentialAssociationProperty"
        description: Sets the credential of a worker group.
  HybridRunbookWorkerGroupsListResult:
    description: The response model for the list hybrid runbook worker groups.
    properties:
      nextLink:
        description: Gets or sets the next link.
        type: string
      value:
        description: Gets or sets a list of hybrid runbook worker groups.
        items:
          $ref: "#/definitions/HybridRunbookWorkerGroup"
        type: array
  RunAsCredentialAssociationProperty:
    description: Definition of RunAs credential to use for hybrid worker.
    properties:
      name:
        description: Gets or sets the name of the credential.
        type: string
