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/dscConfiguration.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: automation-dscConfiguration
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
  - text/plain; charset=utf-8
produces:
  - application/json
  - text/plain; charset=utf-8
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}/configurations":
    get:
      description: Retrieve a list of configurations.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/configurationoperations
      operationId: DscConfiguration_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/DscConfigurationListResult"
        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:
        - DscConfiguration
      x-ms-examples:
        Get DSC Configuration:
          parameters:
            api-version: 2015-10-31
            automationAccountName: myAutomationAccount33
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SetupServer
                    location: East US 2
                    name: SetupServer
                    properties:
                      creationTime: 2017-03-28T18:53:24.997+00:00
                      lastModifiedTime: 2017-03-28T18:53:24.997+00:00
                      state: Published
                    type: Microsoft.Automation/AutomationAccounts/Configurations
              headers: {}
        List Paged DSC Configurations with name filter:
          parameters:
            $filter: contains(name,'server')
            $inlinecount: allpages
            $skip: 0
            $top: 2
            api-version: 2015-10-31
            automationAccountName: myAutomationAccount33
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                totalCount: 4
                value:
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SqlServerBig
                    location: East US 2
                    name: SqlServerBig
                    properties:
                      creationTime: 2017-03-28T18:53:24.997+00:00
                      lastModifiedTime: 2017-03-28T18:53:24.997+00:00
                      nodeConfigurationCount: 1
                      state: Published
                    type: Microsoft.Automation/AutomationAccounts/Configurations
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SqlServerLittle
                    location: East US 2
                    name: SqlServerLittle
                    properties:
                      creationTime: 2017-03-28T18:53:24.997+00:00
                      lastModifiedTime: 2017-03-28T18:53:24.997+00:00
                      nodeConfigurationCount: 1
                      state: Published
                    type: Microsoft.Automation/AutomationAccounts/Configurations
              headers: {}
        List Paged DSC Configurations with no filter:
          parameters:
            $inlinecount: allpages
            $skip: 0
            $top: 3
            api-version: 2015-10-31
            automationAccountName: myAutomationAccount33
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                totalCount: 12
                value:
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SqlServerBig
                    location: East US 2
                    name: SqlServerBig
                    properties:
                      creationTime: 2017-03-28T18:53:24.997+00:00
                      lastModifiedTime: 2017-03-28T18:53:24.997+00:00
                      nodeConfigurationCount: 1
                      state: Published
                    type: Microsoft.Automation/AutomationAccounts/Configurations
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SqlServerLittle
                    location: East US 2
                    name: SqlServerLittle
                    properties:
                      creationTime: 2017-03-28T18:53:24.997+00:00
                      lastModifiedTime: 2017-03-28T18:53:24.997+00:00
                      nodeConfigurationCount: 1
                      state: Published
                    type: Microsoft.Automation/AutomationAccounts/Configurations
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SetupServer
                    location: East US 2
                    name: SetupServer
                    properties:
                      creationTime: 2017-03-28T18:53:24.997+00:00
                      lastModifiedTime: 2017-03-28T18:53:24.997+00:00
                      nodeConfigurationCount: 1
                      state: Published
                    type: Microsoft.Automation/AutomationAccounts/Configurations
              headers: {}
      x-ms-odata: "#/definitions/DscConfiguration"
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}":
    delete:
      description: Delete the dsc configuration identified by configuration name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/configurationoperations
      operationId: DscConfiguration_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 configuration name.
          in: path
          name: configurationName
          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
        "204":
          description: No Content
        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:
        - DscConfiguration
      x-ms-examples:
        Delete DSC Configuration:
          parameters:
            api-version: 2015-10-31
            automationAccountName: myAutomationAccount33
            configurationName: TemplateBasic
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200": {}
            "204": {}
    get:
      description: Retrieve the configuration identified by configuration name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/configurationoperations
      operationId: DscConfiguration_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 configuration name.
          in: path
          name: configurationName
          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/DscConfiguration"
        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:
        - DscConfiguration
      x-ms-examples:
        Get a DSC Configuration:
          parameters:
            api-version: 2015-10-31
            automationAccountName: myAutomationAccount33
            configurationName: TemplateBasic
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: '"636263396635600000"'
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/TemplateBasic
                location: East US 2
                name: TemplateBasic
                properties:
                  creationTime: 2017-03-28T23:14:23.56+00:00
                  description: sample configuration
                  jobCount: 0
                  lastModifiedTime: 2017-03-28T23:14:23.56+00:00
                  logVerbose: false
                  parameters: {}
                  provisioningState: null
                  state: Published
                tags: {}
                type: Microsoft.Automation/AutomationAccounts/Configurations
              headers: {}
    patch:
      description: Create the configuration identified by configuration name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/configurationoperations
      operationId: DscConfiguration_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 create or update parameters for configuration.
          in: path
          name: configurationName
          required: true
          type: string
        - description: The create or update parameters for configuration.
          in: body
          name: parameters
          schema:
            $ref: "#/definitions/DscConfigurationUpdateParameters"
        - 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/DscConfiguration"
        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:
        - DscConfiguration
      x-ms-examples:
        Create or Update Configuration:
          parameters:
            api-version: 2015-10-31
            automationAccountName: myAutomationAccount18
            configurationName: SetupServer
            parameters:
              name: SetupServer
              tags:
                Hello: World
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: '"636572843399170000"'
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SetupServer
                location: eastus2
                name: SetupServer
                properties:
                  creationTime: 0001-01-01T00:00:00+00:00
                  description: sample configuration
                  jobCount: 0
                  lastModifiedTime: 0001-01-01T00:00:00+00:00
                  logVerbose: false
                  parameters: {}
                  provisioningState: Succeeded
                  state: null
                tags:
                  Hello: World
                type: Microsoft.Automation/AutomationAccounts/Configurations
              headers: {}
    put:
      description: Create the configuration identified by configuration name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/configurationoperations
      operationId: DscConfiguration_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 create or update parameters for configuration.
          in: path
          name: configurationName
          required: true
          type: string
        - description: The create or update parameters for configuration.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/DscConfigurationCreateOrUpdateParameters"
        - 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/DscConfiguration"
        "201":
          description: Created
          schema:
            $ref: "#/definitions/DscConfiguration"
        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:
        - DscConfiguration
      x-ms-examples:
        Create or Update Configuration:
          parameters:
            api-version: 2015-10-31
            automationAccountName: myAutomationAccount18
            configurationName: SetupServer
            parameters:
              location: East US 2
              name: SetupServer
              properties:
                description: sample configuration
                source:
                  hash:
                    algorithm: sha256
                    value: A9E5DB56BA21513F61E0B3868816FDC6D4DF5131F5617D7FF0D769674BD5072F
                  type: embeddedContent
                  value: "Configuration SetupServer {\r

                    \    Node localhost {\r

                    \                               WindowsFeature IIS {\r

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

                    \            Ensure = \"Present\"\r

                    \        }\r

                    \    }\r

                    }"
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: null
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SetupServer
                location: East US 2
                name: SetupServer
                properties:
                  creationTime: 0001-01-01T00:00:00+00:00
                  description: sample configuration
                  jobCount: 0
                  lastModifiedTime: 0001-01-01T00:00:00+00:00
                  logVerbose: false
                  parameters: {}
                  provisioningState: Succeeded
                  state: null
                tags: {}
                type: Microsoft.Automation/AutomationAccounts/Configurations
              headers: {}
            "201":
              body:
                etag: '"636263396635600000"'
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SetupServer
                location: East US 2
                name: SetupServer
                properties:
                  creationTime: 2017-03-28T23:14:23.56+00:00
                  description: sample configuration
                  jobCount: 0
                  lastModifiedTime: 2017-03-28T23:14:23.56+00:00
                  logVerbose: false
                  parameters: {}
                  provisioningState: Succeeded
                  state: Published
                tags: {}
                type: Microsoft.Automation/AutomationAccounts/Configurations
              headers: {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}/content":
    get:
      description: Retrieve the configuration script identified by configuration name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/configurationoperations
      operationId: DscConfiguration_GetContent
      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 configuration name.
          in: path
          name: configurationName
          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
      produces:
        - text/powershell
      responses:
        "200":
          description: OK
          schema:
            type: file
        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:
        - DscConfiguration
      x-ms-examples:
        Get DSC Configuration content:
          parameters:
            api-version: 2015-10-31
            automationAccountName: myAutomationAccount33
            configurationName: ConfigName
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body: "Configuration ConfigName {\r

                \    Node localhost {\r

                \                               WindowsFeature IIS {\r

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

                \            Ensure = \"Present\"\r

                \        }\r

                \    }\r

                }"
              headers:
                Content-Type: text/powershell
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
  DscConfiguration:
    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: 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
        type: object
    description: Definition of the configuration type.
    properties:
      etag:
        description: Gets or sets the etag of the resource.
        type: string
      properties:
        $ref: "#/definitions/DscConfigurationProperties"
        description: Gets or sets the configuration properties.
        x-ms-client-flatten: true
    type: object
  DscConfigurationCreateOrUpdateParameters:
    description: The parameters supplied to the create or update configuration operation.
    properties:
      location:
        description: Gets or sets the location of the resource.
        type: string
      name:
        description: Gets or sets name of the resource.
        type: string
      properties:
        $ref: "#/definitions/DscConfigurationCreateOrUpdateProperties"
        description: Gets or sets configuration create or update properties.
        x-ms-client-flatten: true
      tags:
        additionalProperties:
          type: string
        description: Gets or sets the tags attached to the resource.
        type: object
    required:
      - properties
  DscConfigurationCreateOrUpdateProperties:
    description: The properties to create or update configuration.
    properties:
      description:
        description: Gets or sets the description of the configuration.
        type: string
      logProgress:
        description: Gets or sets progress log option.
        type: boolean
      logVerbose:
        description: Gets or sets verbose log option.
        type: boolean
      parameters:
        additionalProperties:
          $ref: "#/definitions/DscConfigurationParameter"
        description: Gets or sets the configuration parameters.
        type: object
      source:
        $ref: "#/definitions/ContentSource"
        description: Gets or sets the source.
    required:
      - source
  DscConfigurationListResult:
    description: The response model for the list configuration operation.
    properties:
      nextLink:
        description: Gets or sets the next link.
        type: string
      totalCount:
        description: Gets the total number of configurations matching filter criteria.
        type: integer
      value:
        description: Gets or sets a list of configurations.
        items:
          $ref: "#/definitions/DscConfiguration"
        type: array
  DscConfigurationParameter:
    description: Definition of the configuration parameter type.
    properties:
      defaultValue:
        description: Gets or sets the default value of parameter.
        type: string
      isMandatory:
        description: Gets or sets a Boolean value to indicate whether the parameter is mandatory or not.
        type: boolean
      position:
        description: Get or sets the position of the parameter.
        format: int32
        type: integer
      type:
        description: Gets or sets the type of the parameter.
        type: string
  DscConfigurationProperties:
    description: Definition of the configuration property type.
    properties:
      creationTime:
        description: Gets or sets the creation time.
        format: date-time
        type: string
        x-nullable: false
      description:
        description: Gets or sets the description.
        type: string
      jobCount:
        description: Gets or sets the job count of the configuration.
        format: int32
        type: integer
      lastModifiedTime:
        description: Gets or sets the last modified time.
        format: date-time
        type: string
        x-nullable: false
      logVerbose:
        description: Gets or sets verbose log option.
        type: boolean
      nodeConfigurationCount:
        description: Gets the number of compiled node configurations.
        type: integer
        x-nullable: false
      parameters:
        additionalProperties:
          $ref: "#/definitions/DscConfigurationParameter"
        description: Gets or sets the configuration parameters.
        type: object
      provisioningState:
        description: Gets or sets the provisioning state of the configuration.
        enum:
          - Succeeded
        type: string
        x-ms-enum:
          modelAsString: false
          name: DscConfigurationProvisioningState
      source:
        $ref: "#/definitions/ContentSource"
        description: Gets or sets the source.
      state:
        description: Gets or sets the state of the configuration.
        enum:
          - New
          - Edit
          - Published
        type: string
        x-ms-enum:
          modelAsString: true
          name: DscConfigurationState
  DscConfigurationUpdateParameters:
    description: The parameters supplied to the create or update configuration operation.
    properties:
      name:
        description: Gets or sets name of the resource.
        type: string
      properties:
        $ref: "#/definitions/DscConfigurationCreateOrUpdateProperties"
        description: Gets or sets configuration create or update properties.
        x-ms-client-flatten: true
      tags:
        additionalProperties:
          type: string
        description: Gets or sets the tags attached to the resource.
        type: object
