swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  title: AutomationManagement
  version: 2018-01-15
  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/2018-01-15/dscNodeConfiguration.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: automation-dscNodeConfiguration
  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}/nodeConfigurations":
    get:
      description: Retrieve a list of dsc node configurations.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/dscnodeconfigurations
      operationId: DscNodeConfiguration_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: 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
        - description: The filter to apply on the operation.
          in: query
          name: $filter
          required: false
          type: string
        - description: The number of rows to skip.
          in: query
          name: $skip
          required: false
          type: integer
        - description: The number of rows to take.
          in: query
          name: $top
          required: false
          type: integer
        - description: Return total rows.
          in: query
          name: $inlinecount
          required: false
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/DscNodeConfigurationListResult"
        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:
        - DscNodeConfiguration
      x-ms-examples:
        List DSC node configurations by Automation Account:
          parameters:
            api-version: 2018-01-15
            automationAccountName: myAutomationAccount33
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost
                    name: SetupServer.localhost
                    properties:
                      configuration:
                        name: SetupServer
                      creationTime: 2017-03-28T23:17:06.8901968+00:00
                      incrementNodeConfigurationBuild: false
                      lastModifiedTime: 2017-03-28T23:17:06.8901968+00:00
                      nodeCount: 0
                      source: null
                    type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost
                    name: SetupServer.localhost
                    properties:
                      configuration:
                        name: SetupServer
                      creationTime: 2017-03-28T23:17:06.8901968+00:00
                      incrementNodeConfigurationBuild: false
                      lastModifiedTime: 2017-03-28T23:17:06.8901968+00:00
                      nodeCount: 0
                      source: null
                    type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
              headers: {}
        List Paged DSC node configurations by Automation Account with name filter:
          parameters:
            $filter: contains('.localhost',name)
            $inlinecount: allpages
            $skip: 0
            $top: 2
            api-version: 2018-01-15
            automationAccountName: myAutomationAccount33
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                totalCount: 6
                value:
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost
                    name: server.localhost
                    properties:
                      configuration:
                        name: SetupServer
                      creationTime: 2017-03-28T23:17:06.8901968+00:00
                      lastModifiedTime: 2017-03-28T23:17:06.8901968+00:00
                      nodeCount: 2
                    type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupClient.localhost
                    name: SetupClient.localhost
                    properties:
                      configuration:
                        name: SetupClient
                      creationTime: 2017-03-28T23:17:06.8901968+00:00
                      lastModifiedTime: 2017-03-28T23:17:06.8901968+00:00
                      nodeCount: 6
                    type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
              headers: {}
        List Paged DSC node configurations by Automation Account with no filter:
          parameters:
            $inlinecount: allpages
            $skip: 0
            $top: 4
            api-version: 2018-01-15
            automationAccountName: myAutomationAccount33
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                totalCount: 12
                value:
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost
                    name: server.localhost
                    properties:
                      configuration:
                        name: SetupServer
                      creationTime: 2017-03-28T23:17:06.8901968+00:00
                      lastModifiedTime: 2017-03-28T23:17:06.8901968+00:00
                      nodeCount: 2
                    type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupClient.localhost
                    name: SetupClient.localhost
                    properties:
                      configuration:
                        name: SetupClient
                      creationTime: 2017-03-28T23:17:06.8901968+00:00
                      lastModifiedTime: 2017-03-28T23:17:06.8901968+00:00
                      nodeCount: 6
                    type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/webServer.localhost
                    name: webServer.localhost
                    properties:
                      configuration:
                        name: webServer
                      creationTime: 2017-03-28T23:17:06.8901968+00:00
                      lastModifiedTime: 2017-03-28T23:17:06.8901968+00:00
                      nodeCount: 5
                    type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SqlServer.localhost
                    name: SqlServer.localhost
                    properties:
                      configuration:
                        name: SqlServer
                      creationTime: 2017-03-28T23:17:06.8901968+00:00
                      lastModifiedTime: 2017-03-28T23:17:06.8901968+00:00
                      nodeCount: 1
                    type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
              headers: {}
      x-ms-odata: "#/definitions/DscNodeConfiguration"
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}":
    delete:
      description: Delete the Dsc node configurations by node configuration.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/dscnodeconfigurations
      operationId: DscNodeConfiguration_Delete
      parameters:
        - 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: 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 Dsc node configuration name.
          in: path
          name: nodeConfigurationName
          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:
        - DscNodeConfiguration
      x-ms-examples:
        Delete a DSC node configuration:
          parameters:
            api-version: 2018-01-15
            automationAccountName: myAutomationAccount20
            credentialName: myCredential
            nodeConfigurationName: configName.nodeConfigName
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200": {}
    get:
      description: Retrieve the Dsc node configurations by node configuration.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/dscnodeconfigurations
      operationId: DscNodeConfiguration_Get
      parameters:
        - 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: 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 Dsc node configuration name.
          in: path
          name: nodeConfigurationName
          required: true
          type: string
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/DscNodeConfiguration"
        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:
        - DscNodeConfiguration
      x-ms-examples:
        Get a DSC node configuration:
          parameters:
            api-version: 2018-01-15
            automationAccountName: myAutomationAccount33
            nodeConfigurationName: SetupServer.localhost
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost
                name: SetupServer.localhost
                properties:
                  configuration:
                    name: SetupServer
                  creationTime: 2017-03-28T23:17:06.8901968+00:00
                  incrementNodeConfigurationBuild: false
                  lastModifiedTime: 2017-03-28T23:17:06.8901968+00:00
                  nodeCount: 0
                  source: null
                type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
              headers: {}
    put:
      description: Create the node configuration identified by node configuration name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/dscnodeconfigurations
      operationId: DscNodeConfiguration_CreateOrUpdate
      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 Dsc node configuration name.
          in: path
          name: nodeConfigurationName
          required: true
          type: string
        - description: The create or update parameters for configuration.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/DscNodeConfigurationCreateOrUpdateParameters"
        - 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
        "201":
          description: Created
          schema:
            $ref: "#/definitions/DscNodeConfiguration"
        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:
        - DscNodeConfiguration
      x-ms-examples:
        Create node configuration:
          parameters:
            api-version: 2018-01-15
            automationAccountName: myAutomationAccount20
            nodeConfigurationName: configName.nodeConfigName
            parameters:
              name: configName.nodeConfigName
              properties:
                configuration:
                  name: configName
                incrementNodeConfigurationBuild: true
                source:
                  hash:
                    algorithm: sha256
                    value: 6DE256A57F01BFA29B88696D5E77A383D6E61484C7686E8DB955FA10ACE9FFE5
                  type: embeddedContent
                  value: "\r

                    instance of MSFT_RoleResource as $MSFT_RoleResource1ref\r

                    {\r

                    ResourceID = \"[WindowsFeature]IIS\";\r

                    \ Ensure = \"Present\";\r

                    \ SourceInfo = \"::3::32::WindowsFeature\";\r

                    \ Name = \"Web-Server\";\r

                    \ ModuleName = \"PsDesiredStateConfiguration\";\r

                    \r

                    ModuleVersion = \"1.0\";\r\r

                    \ ConfigurationName = \"configName\";\r\r

                    };\r

                    instance of OMI_ConfigurationDocument\r

                    \r\r

                    \                    {\r

                    \ Version=\"2.0.0\";\r

                    \ \r\r

                    \                        MinimumCompatibleVersion = \"1.0.0\";\r

                    \ \r\r

                    \                        CompatibleVersionAdditionalProperties= {\"Omi_BaseResource:ConfigurationName\"};\r

                    \ \r\r

                    \                        Author=\"weijiel\";\r

                    \ \r\r

                    \                        GenerationDate=\"03/30/2017 13:40:25\";\r

                    \ \r\r

                    \                        GenerationHost=\"TEST-BACKEND\";\r

                    \ \r\r

                    \                        Name=\"configName\";\r

                    \r\r

                    \                    };\r\n"
                  version: "1.0"
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200": {}
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/nodeConfigurations/configName.nodeConfigName
                name: configName.nodeConfigName
                properties:
                  configuration:
                    name: configName
                  creationTime: 2018-03-25T01:29:17.1205764+00:00
                  incrementNodeConfigurationBuild: false
                  lastModifiedTime: 2018-03-25T01:29:17.1205764+00:00
                  nodeCount: 0
                  source: null
                type: Microsoft.Automation/AutomationAccounts/nodeConfigurations
              headers: {}
      x-ms-long-running-operation: true
definitions:
  ContentHash:
    description: Definition of the runbook property type.
    properties:
      algorithm:
        description: Gets or sets the content hash algorithm used to hash the content.
        type: string
      value:
        description: Gets or sets expected hash value of the content.
        type: string
    required:
      - algorithm
      - value
  ContentSource:
    description: Definition of the content source.
    properties:
      hash:
        $ref: "#/definitions/ContentHash"
        description: Gets or sets the hash.
      type:
        description: Gets or sets the content source type.
        enum:
          - embeddedContent
          - uri
        type: string
        x-ms-enum:
          modelAsString: true
          name: ContentSourceType
      value:
        description: Gets or sets the value of the content. This is based on the content source type.
        type: string
      version:
        description: Gets or sets the version of the content.
        type: string
  DscConfigurationAssociationProperty:
    description: The Dsc configuration property associated with the entity.
    properties:
      name:
        description: Gets or sets the name of the Dsc configuration.
        type: string
  DscNodeConfiguration:
    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
            type: object
            x-ms-azure-resource: true
        description: ARM proxy resource.
        properties: {}
        type: object
    description: Definition of the dsc node configuration.
    properties:
      properties:
        $ref: "#/definitions/DscNodeConfigurationProperties"
        description: Gets or sets the configuration properties.
        x-ms-client-flatten: true
    type: object
  DscNodeConfigurationCreateOrUpdateParameters:
    description: The parameters supplied to the create or update node configuration operation.
    properties:
      name:
        description: Name of the node configuration.
        type: string
      properties:
        $ref: "#/definitions/DscNodeConfigurationCreateOrUpdateParametersProperties"
        description: Node configuration properties
        x-ms-client-flatten: true
      tags:
        additionalProperties:
          type: string
        description: Gets or sets the tags attached to the resource.
        type: object
  DscNodeConfigurationCreateOrUpdateParametersProperties:
    description: The parameter properties supplied to the create or update node configuration operation.
    properties:
      configuration:
        $ref: "#/definitions/DscConfigurationAssociationProperty"
        description: Gets or sets the configuration of the node.
      incrementNodeConfigurationBuild:
        description: If a new build version of NodeConfiguration is required.
        type: boolean
      source:
        $ref: "#/definitions/ContentSource"
        description: Gets or sets the source.
    required:
      - source
      - configuration
  DscNodeConfigurationListResult:
    description: The response model for the list job operation.
    properties:
      nextLink:
        description: Gets or sets the next link.
        type: string
      totalCount:
        description: Gets or sets the total rows in query.
        type: integer
      value:
        description: Gets or sets a list of Dsc node configurations.
        items:
          $ref: "#/definitions/DscNodeConfiguration"
        type: array
  DscNodeConfigurationProperties:
    description: Properties for the DscNodeConfiguration
    properties:
      configuration:
        $ref: "#/definitions/DscConfigurationAssociationProperty"
        description: Gets or sets the configuration of the node.
      creationTime:
        description: Gets or sets creation time.
        format: date-time
        type: string
        x-nullable: false
      incrementNodeConfigurationBuild:
        description: If a new build version of NodeConfiguration is required.
        type: boolean
      lastModifiedTime:
        description: Gets or sets the last modified time.
        format: date-time
        type: string
        x-nullable: false
      nodeCount:
        description: Number of nodes with this node configuration assigned
        format: int64
        type: integer
      source:
        description: Source of node configuration.
        type: string
  DscNodeExtensionHandlerAssociationProperty:
    description: The dsc extensionHandler property associated with the node
    properties:
      name:
        description: Gets or sets the name of the extension handler.
        type: string
      version:
        description: Gets or sets the version of the extension handler.
        type: string
