swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  title: AutomationManagement
  version: 2018-06-30
  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-06-30/python2package.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: automation-python2package
  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}/python2Packages":
    get:
      description: Retrieve a list of python 2 packages.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/moduleoperations
      operationId: Python2Package_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
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ModuleListResult"
        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:
        - Python2Package
      x-ms-examples:
        List python 2 packages by automation account:
          parameters:
            api-version: 2018-06-30
            automationAccountName: myAutomationAccount33
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/configparser
                    name: configparser
                    properties:
                      activityCount: 0
                      creationTime: 2018-07-17T17:57:01.7866667+00:00
                      isComposite: false
                      isGlobal: false
                      lastModifiedTime: 2018-07-24T20:30:16.4966667+00:00
                      provisioningState: Succeeded
                      sizeInBytes: 39573
                      version: 3.5.0
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/flask
                    name: flask
                    properties:
                      activityCount: 0
                      creationTime: 2018-07-09T18:07:44.6133333+00:00
                      isComposite: false
                      isGlobal: false
                      lastModifiedTime: 2018-07-09T18:09:20.7733333+00:00
                      provisioningState: Succeeded
                      sizeInBytes: 91364
                      version: 1.0.2
                  - id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/numpy
                    name: numpy
                    properties:
                      activityCount: 0
                      creationTime: 2018-07-14T01:05:54.67+00:00
                      isComposite: false
                      isGlobal: false
                      lastModifiedTime: 2018-07-17T17:58:09.8733333+00:00
                      provisioningState: Succeeded
                      sizeInBytes: 13345673
                      version: 1.14.5
              headers: {}
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName}":
    delete:
      description: Delete the python 2 package by name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/moduleoperations
      operationId: Python2Package_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 python package name.
          in: path
          name: packageName
          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:
        - Python2Package
      x-ms-examples:
        Delete a python 2 package:
          parameters:
            api-version: 2018-06-30
            automationAccountName: myAutomationAccount33
            packageName: OmsCompositeResources
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200": {}
    get:
      description: Retrieve the python 2 package identified by package name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/moduleoperations
      operationId: Python2Package_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 python package name.
          in: path
          name: packageName
          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/Module"
        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:
        - Python2Package
      x-ms-examples:
        Get a python 2 package:
          parameters:
            api-version: 2018-06-30
            automationAccountName: myAutomationAccount33
            packageName: OmsCompositeResources
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: null
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/OmsCompositeResources
                location: East US 2
                name: OmsCompositeResources
                properties:
                  activityCount: 0
                  creationTime: 2017-03-29T15:41:47.003+00:00
                  error:
                    code: null
                    message: ""
                  isComposite: true
                  isGlobal: false
                  lastModifiedTime: 2017-03-29T15:42:10.567+00:00
                  provisioningState: Creating
                  sizeInBytes: 0
                  version: null
                tags: {}
                type: Microsoft.Automation/AutomationAccounts/Python2Packages
              headers: {}
    patch:
      description: Update the python 2 package identified by package name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/moduleoperations
      operationId: Python2Package_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 name of python package.
          in: path
          name: packageName
          required: true
          type: string
        - description: The update parameters for python package.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/PythonPackageUpdateParameters"
        - 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/Module"
        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:
        - Python2Package
      x-ms-examples:
        Update a module:
          parameters:
            api-version: 2018-06-30
            automationAccountName: MyAutomationAccount
            packageName: MyPython2Package
            parameters:
              tags: {}
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: null
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyAutomationAccount/python2Packages/MyPython2Package
                location: East US 2
                name: MyPython2Package
                properties:
                  activityCount: 0
                  creationTime: 2017-03-29T15:41:47.003+00:00
                  error:
                    code: null
                    message: null
                  isComposite: false
                  isGlobal: false
                  lastModifiedTime: 2017-03-29T15:42:10.567+00:00
                  provisioningState: Creating
                  sizeInBytes: 0
                  version: null
                tags: {}
                type: Microsoft.Automation/AutomationAccounts/python2Packages
              headers: {}
    put:
      description: Create or Update the python 2 package identified by package name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/moduleoperations
      operationId: Python2Package_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 name of python package.
          in: path
          name: packageName
          required: true
          type: string
        - description: The create or update parameters for python package.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/PythonPackageCreateParameters"
        - 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/Module"
        "201":
          description: Created
          schema:
            $ref: "#/definitions/Module"
        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:
        - Python2Package
      x-ms-examples:
        Create or update a python 2 package:
          parameters:
            api-version: 2018-06-30
            automationAccountName: myAutomationAccount33
            packageName: OmsCompositeResources
            parameters:
              properties:
                contentLink:
                  contentHash:
                    algorithm: sha265
                    value: 07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A
                  uri: https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip
                  version: 1.0.0.0
              tags: {}
            resourceGroupName: rg
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: null
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/OmsCompositeResources
                location: East US 2
                name: OmsCompositeResources
                properties:
                  activityCount: 0
                  creationTime: 2017-03-29T15:41:47.003+00:00
                  error:
                    code: null
                    message: null
                  isComposite: false
                  isGlobal: false
                  lastModifiedTime: 2017-03-29T15:42:10.567+00:00
                  provisioningState: Creating
                  sizeInBytes: 0
                  version: null
                tags: {}
                type: Microsoft.Automation/AutomationAccounts/python2Packages
              headers: {}
            "201":
              body:
                etag: null
                id: /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/OmsCompositeResources
                location: East US 2
                name: OmsCompositeResources
                properties:
                  activityCount: 0
                  creationTime: 2017-03-29T15:41:47.003+00:00
                  error:
                    code: null
                    message: null
                  isComposite: false
                  isGlobal: false
                  lastModifiedTime: 2017-03-29T15:42:10.567+00:00
                  provisioningState: Creating
                  sizeInBytes: 0
                  version: null
                tags: {}
                type: Microsoft.Automation/AutomationAccounts/python2Packages
              headers: {}
definitions:
  Activity:
    description: Definition of the activity.
    properties:
      id:
        description: Gets or sets the id of the resource.
        type: string
      name:
        description: Gets the name of the activity.
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/ActivityProperties"
        description: Gets or sets the properties of the activity.
        x-ms-client-flatten: true
  ActivityListResult:
    description: The response model for the list activity operation.
    properties:
      nextLink:
        description: Gets or sets the next link.
        type: string
      value:
        description: Gets or sets a list of activities.
        items:
          $ref: "#/definitions/Activity"
        type: array
  ActivityOutputType:
    description: Definition of the activity output type.
    properties:
      name:
        description: Gets or sets the name of the activity output type.
        type: string
      type:
        description: Gets or sets the type of the activity output type.
        type: string
  ActivityParameter:
    description: Definition of the activity parameter.
    properties:
      description:
        description: Gets or sets the description of the activity parameter.
        type: string
      isDynamic:
        description: Gets or sets a Boolean value that indicates true if the parameter is dynamic.
        type: boolean
      isMandatory:
        description: Gets or sets a Boolean value that indicates true if the parameter is required. If the value is false, the parameter is optional.
        type: boolean
      name:
        description: Gets or sets the name of the activity parameter.
        type: string
      position:
        description: Gets or sets the position of the activity parameter.
        format: int64
        type: integer
      type:
        description: Gets or sets the type of the activity parameter.
        type: string
      validationSet:
        description: Gets or sets the validation set of activity parameter.
        items:
          $ref: "#/definitions/ActivityParameterValidationSet"
        type: array
      valueFromPipeline:
        description: Gets or sets a Boolean value that indicates true if the parameter can take values from the incoming pipeline objects. This setting is used if the cmdlet must access the complete input object. false indicates that the parameter cannot take values from the complete input object.
        type: boolean
      valueFromPipelineByPropertyName:
        description: "Gets or sets a Boolean value that indicates true if the parameter can be filled from a property of the incoming pipeline object that has the same name as this parameter. false indicates that the parameter cannot be filled from the incoming pipeline object property with the same name. "
        type: boolean
      valueFromRemainingArguments:
        description: Gets or sets a Boolean value that indicates true if the cmdlet parameter accepts all the remaining command-line arguments that are associated with this parameter in the form of an array. false if the cmdlet parameter does not accept all the remaining argument values.
        type: boolean
  ActivityParameterSet:
    description: Definition of the activity parameter set.
    properties:
      name:
        description: Gets or sets the name of the activity parameter set.
        type: string
      parameters:
        description: Gets or sets the parameters of the activity parameter set.
        items:
          $ref: "#/definitions/ActivityParameter"
        type: array
  ActivityParameterValidationSet:
    description: Definition of the activity parameter validation set.
    properties:
      memberValue:
        description: Gets or sets the name of the activity parameter validation set member.
        type: string
  ActivityProperties:
    description: Properties of the activity.
    properties:
      creationTime:
        description: Gets or sets the creation time.
        format: date-time
        type: string
        x-nullable: false
      definition:
        description: Gets or sets the user name of the activity.
        type: string
      description:
        description: Gets or sets the description.
        type: string
      lastModifiedTime:
        description: Gets or sets the last modified time.
        format: date-time
        type: string
        x-nullable: false
      outputTypes:
        description: Gets or sets the output types of the activity.
        items:
          $ref: "#/definitions/ActivityOutputType"
        type: array
      parameterSets:
        description: Gets or sets the parameter sets of the activity.
        items:
          $ref: "#/definitions/ActivityParameterSet"
        type: array
  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
  ContentLink:
    description: Definition of the content link.
    properties:
      contentHash:
        $ref: "#/definitions/ContentHash"
        description: Gets or sets the hash.
      uri:
        description: Gets or sets the uri of the runbook content.
        type: string
      version:
        description: Gets or sets the version of the content.
        type: string
  Module:
    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 module type.
    properties:
      etag:
        description: Gets or sets the etag of the resource.
        type: string
      properties:
        $ref: "#/definitions/ModuleProperties"
        description: Gets or sets the module properties.
        x-ms-client-flatten: true
  ModuleErrorInfo:
    description: Definition of the module error info type.
    properties:
      code:
        description: Gets or sets the error code.
        type: string
      message:
        description: Gets or sets the error message.
        type: string
  ModuleListResult:
    description: The response model for the list module operation.
    properties:
      nextLink:
        description: Gets or sets the next link.
        type: string
      value:
        description: Gets or sets a list of modules.
        items:
          $ref: "#/definitions/Module"
        type: array
  ModuleProperties:
    description: Definition of the module property type.
    properties:
      activityCount:
        description: Gets or sets the activity count of the module.
        format: int32
        type: integer
      contentLink:
        $ref: "#/definitions/ContentLink"
        description: Gets or sets the contentLink of the module.
      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
      error:
        $ref: "#/definitions/ModuleErrorInfo"
        description: Gets or sets the error info of the module.
      isComposite:
        description: Gets or sets type of module, if its composite or not.
        type: boolean
      isGlobal:
        description: Gets or sets the isGlobal flag of the module.
        type: boolean
      lastModifiedTime:
        description: Gets or sets the last modified time.
        format: date-time
        type: string
        x-nullable: false
      provisioningState:
        description: Gets or sets the provisioning state of the module.
        enum:
          - Created
          - Creating
          - StartingImportModuleRunbook
          - RunningImportModuleRunbook
          - ContentRetrieved
          - ContentDownloaded
          - ContentValidated
          - ConnectionTypeImported
          - ContentStored
          - ModuleDataStored
          - ActivitiesStored
          - ModuleImportRunbookComplete
          - Succeeded
          - Failed
          - Cancelled
          - Updating
        type: string
        x-ms-enum:
          modelAsString: false
          name: ModuleProvisioningState
      sizeInBytes:
        description: Gets or sets the size in bytes of the module.
        format: int64
        type: integer
      version:
        description: Gets or sets the version of the module.
        type: string
  PythonPackageCreateParameters:
    description: The parameters supplied to the create or update module operation.
    properties:
      properties:
        $ref: "#/definitions/PythonPackageCreateProperties"
        description: Gets or sets the module create properties.
        x-ms-client-flatten: true
      tags:
        additionalProperties:
          type: string
        description: Gets or sets the tags attached to the resource.
        type: object
    required:
      - properties
  PythonPackageCreateProperties:
    description: The parameters supplied to the create or update module properties.
    properties:
      contentLink:
        $ref: "#/definitions/ContentLink"
        description: Gets or sets the module content link.
    required:
      - contentLink
  PythonPackageUpdateParameters:
    description: The parameters supplied to the update module operation.
    properties:
      tags:
        additionalProperties:
          type: string
        description: Gets or sets the tags attached to the resource.
        type: object
  TypeField:
    description: Information about a field of a type.
    properties:
      name:
        description: Gets or sets the name of the field.
        type: string
      type:
        description: Gets or sets the type of the field.
        type: string
  TypeFieldListResult:
    description: The response model for the list fields operation.
    properties:
      value:
        description: Gets or sets a list of fields.
        items:
          $ref: "#/definitions/TypeField"
        type: array
