swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: These APIs allow end users to operate on Azure Machine Learning Commitment Plans resources and their child Commitment Association resources. They support CRUD operations for commitment plans, get and list operations for commitment associations, moving commitment associations between commitment plans, and retrieving commitment plan usage history.
  title: Azure ML Commitment Plans Management Client
  version: 2016-05-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/machinelearning/resource-manager/Microsoft.MachineLearning/preview/2016-05-01-preview/commitmentPlans.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: machinelearning-commitmentPlans
  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
parameters:
  APIVersionParameter:
    description: The version of the Microsoft.MachineLearning resource provider API to use.
    in: query
    name: api-version
    required: true
    type: string
  CommitmentAssociationNameParameter:
    description: The commitment association name.
    in: path
    name: commitmentAssociationName
    required: true
    type: string
    x-ms-parameter-location: method
  CommitmentPlanNameParameter:
    description: The Azure ML commitment plan name.
    in: path
    name: commitmentPlanName
    required: true
    type: string
    x-ms-parameter-location: method
  ResourceGroupNameParameter:
    description: The resource group name.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  SkipTokenParameter:
    description: Continuation token for pagination.
    in: query
    name: $skipToken
    required: false
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: Azure Subscription ID.
    in: path
    name: subscriptionId
    required: true
    type: string
paths:
  /providers/Microsoft.MachineLearning/operations:
    get:
      description: Lists all of the available Azure Machine Learning Studio Commitment Plan RP REST API operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/APIVersionParameter"
      responses:
        "200":
          description: OK.
          schema:
            $ref: "#/definitions/OperationEntityListResult"
      tags:
        - Operation
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearning/commitmentPlans":
    get:
      description: Retrieve all Azure ML commitment plans in a subscription.
      operationId: CommitmentPlans_List
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Continuation token for pagination.
          in: query
          name: $skipToken
          required: false
          type: string
        - $ref: "#/parameters/APIVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/CommitmentPlanListResult"
      tags:
        - CommitmentPlans
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearning/skus":
    get:
      description: Lists the available commitment plan SKUs.
      operationId: Skus_List
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/APIVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/SkuListResult"
      tags:
        - Skus
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans":
    get:
      description: Retrieve all Azure ML commitment plans in a resource group.
      operationId: CommitmentPlans_ListInResourceGroup
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/SkipTokenParameter"
        - $ref: "#/parameters/APIVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/CommitmentPlanListResult"
      tags:
        - CommitmentPlans
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}":
    delete:
      description: Remove an existing Azure ML commitment plan.
      operationId: CommitmentPlans_Remove
      responses:
        "200":
          description: OK
      tags:
        - CommitmentPlans
    get:
      description: Retrieve an Azure ML commitment plan by its subscription, resource group and name.
      operationId: CommitmentPlans_Get
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/CommitmentPlan"
      tags:
        - CommitmentPlans
    parameters:
      - $ref: "#/parameters/SubscriptionIdParameter"
      - $ref: "#/parameters/ResourceGroupNameParameter"
      - $ref: "#/parameters/CommitmentPlanNameParameter"
      - $ref: "#/parameters/APIVersionParameter"
    patch:
      description: Patch an existing Azure ML commitment plan resource.
      operationId: CommitmentPlans_Patch
      parameters:
        - description: The payload to use to patch the Azure ML commitment plan. Only tags and SKU may be modified on an existing commitment plan.
          in: body
          name: patchPayload
          required: true
          schema:
            $ref: "#/definitions/CommitmentPlanPatchPayload"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/CommitmentPlan"
      tags:
        - CommitmentPlans
    put:
      description: Create a new Azure ML commitment plan resource or updates an existing one.
      operationId: CommitmentPlans_CreateOrUpdate
      parameters:
        - description: The payload to create or update the Azure ML commitment plan.
          in: body
          name: createOrUpdatePayload
          required: true
          schema:
            $ref: "#/definitions/CommitmentPlan"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/CommitmentPlan"
        "201":
          description: Created
          schema:
            $ref: "#/definitions/CommitmentPlan"
      tags:
        - CommitmentPlans
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations":
    get:
      description: Get all commitment associations for a parent commitment plan.
      operationId: CommitmentAssociations_List
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/CommitmentPlanNameParameter"
        - $ref: "#/parameters/SkipTokenParameter"
        - $ref: "#/parameters/APIVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/CommitmentAssociationListResult"
      tags:
        - CommitmentAssociations
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}":
    get:
      description: Get a commitment association.
      operationId: CommitmentAssociations_Get
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/CommitmentPlanNameParameter"
        - $ref: "#/parameters/CommitmentAssociationNameParameter"
        - $ref: "#/parameters/APIVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/CommitmentAssociation"
      tags:
        - CommitmentAssociations
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}/move":
    post:
      description: Re-parent a commitment association from one commitment plan to another.
      operationId: CommitmentAssociations_Move
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/CommitmentPlanNameParameter"
        - $ref: "#/parameters/CommitmentAssociationNameParameter"
        - $ref: "#/parameters/APIVersionParameter"
        - description: The move request payload.
          in: body
          name: movePayload
          required: true
          schema:
            $ref: "#/definitions/MoveCommitmentAssociationRequest"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/CommitmentAssociation"
      tags:
        - CommitmentAssociations
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/usageHistory":
    get:
      description: Retrieve the usage history for an Azure ML commitment plan.
      operationId: UsageHistory_List
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/CommitmentPlanNameParameter"
        - $ref: "#/parameters/SkipTokenParameter"
        - $ref: "#/parameters/APIVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/PlanUsageHistoryListResult"
      tags:
        - CommitmentPlans
      x-ms-pageable:
        nextLinkName: nextLink
definitions:
  CatalogSku:
    description: Details of a commitment plan SKU.
    properties:
      capabilities:
        description: The capability information for the specified SKU.
        items:
          $ref: "#/definitions/SkuCapability"
        readOnly: true
        type: array
      capacity:
        $ref: "#/definitions/SkuCapacity"
        description: SKU scaling information
        readOnly: true
      costs:
        description: The cost information for the specified SKU.
        items:
          $ref: "#/definitions/SkuCost"
        readOnly: true
        type: array
      locations:
        description: Regions where the SKU is available.
        items:
          type: string
        readOnly: true
        type: array
      name:
        description: SKU name
        readOnly: true
        type: string
      resourceType:
        description: Resource type name
        readOnly: true
        type: string
      restrictions:
        description: Restrictions which would prevent a SKU from being used. This is empty if there are no restrictions.
        items:
          $ref: "#/definitions/SkuRestrictions"
        readOnly: true
        type: array
      tier:
        description: SKU tier
        readOnly: true
        type: string
    type: object
  CommitmentAssociation:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Represents the association between a commitment plan and some other resource, such as a Machine Learning web service.
    properties:
      etag:
        description: An entity tag used to enforce optimistic concurrency.
        type: string
      properties:
        $ref: "#/definitions/CommitmentAssociationProperties"
        description: The properties of the commitment association resource.
    type: object
  CommitmentAssociationListResult:
    description: A page of commitment association resources.
    properties:
      nextLink:
        description: A URI to retrieve the next page of results.
        type: string
      value:
        description: The set of results for this page.
        items:
          $ref: "#/definitions/CommitmentAssociation"
        type: array
    type: object
  CommitmentAssociationProperties:
    description: Properties of an Azure ML commitment association.
    properties:
      associatedResourceId:
        description: The ID of the resource this association points to, such as the ARM ID of an Azure ML web service.
        readOnly: true
        type: string
      commitmentPlanId:
        description: The ARM ID of the parent Azure ML commitment plan.
        readOnly: true
        type: string
      creationDate:
        description: The date at which this commitment association was created, in ISO 8601 format.
        format: date-time
        readOnly: true
        type: string
    type: object
  CommitmentPlan:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An Azure ML commitment plan resource.
    properties:
      etag:
        description: An entity tag used to enforce optimistic concurrency.
        type: string
      properties:
        $ref: "#/definitions/CommitmentPlanProperties"
        description: The commitment plan properties.
        readOnly: true
      sku:
        $ref: "#/definitions/ResourceSku"
        description: The commitment plan SKU.
    type: object
  CommitmentPlanListResult:
    description: A page of commitment plan resources.
    properties:
      nextLink:
        description: A URI to retrieve the next page of results.
        type: string
      value:
        description: The set of results for this page.
        items:
          $ref: "#/definitions/CommitmentPlan"
        type: array
    type: object
  CommitmentPlanPatchPayload:
    description: The properties of a commitment plan which may be updated via PATCH.
    properties:
      sku:
        $ref: "#/definitions/ResourceSku"
        description: The commitment plan SKU.
      tags:
        $ref: "#/definitions/Tags"
        description: User-defined tags for the commitment plan.
    type: object
  CommitmentPlanProperties:
    description: Properties of an Azure ML commitment plan.
    properties:
      chargeForOverage:
        description: Indicates whether usage beyond the commitment plan's included quantities will be charged.
        readOnly: true
        type: boolean
      chargeForPlan:
        description: Indicates whether the commitment plan will incur a charge.
        readOnly: true
        type: boolean
      creationDate:
        description: The date at which this commitment plan was created, in ISO 8601 format.
        format: date-time
        readOnly: true
        type: string
      includedQuantities:
        additionalProperties:
          $ref: "#/definitions/PlanQuantity"
        description: The included resource quantities this plan gives you.
        readOnly: true
        type: object
      maxAssociationLimit:
        description: The maximum number of commitment associations that can be children of this commitment plan.
        format: int32
        readOnly: true
        type: integer
      maxCapacityLimit:
        description: The maximum scale-out capacity for this commitment plan.
        format: int32
        readOnly: true
        type: integer
      minCapacityLimit:
        description: The minimum scale-out capacity for this commitment plan.
        format: int32
        readOnly: true
        type: integer
      planMeter:
        description: The Azure meter which will be used to charge for this commitment plan.
        readOnly: true
        type: string
      refillFrequencyInDays:
        description: The frequency at which this commitment plan's included quantities are refilled.
        format: int32
        readOnly: true
        type: integer
      suspendPlanOnOverage:
        description: Indicates whether this commitment plan will be moved into a suspended state if usage goes beyond the commitment plan's included quantities.
        readOnly: true
        type: boolean
    type: object
  MoveCommitmentAssociationRequest:
    description: Specifies the destination Azure ML commitment plan for a move operation.
    properties:
      destinationPlanId:
        description: The ARM ID of the commitment plan to re-parent the commitment association to.
        type: string
    type: object
  OperationDisplayInfo:
    description: The API operation info.
    properties:
      description:
        description: The description of the operation.
        readOnly: true
        type: string
      operation:
        description: The action that users can perform, based on their permission level.
        readOnly: true
        type: string
      provider:
        description: The service provider.
        readOnly: true
        type: string
      resource:
        description: The resource on which the operation is performed.
        readOnly: true
        type: string
    type: object
  OperationEntity:
    description: An API operation.
    properties:
      display:
        $ref: "#/definitions/OperationDisplayInfo"
        description: The API operation info.
      name:
        description: "Operation name: {provider}/{resource}/{operation}."
        readOnly: true
        type: string
    type: object
  OperationEntityListResult:
    description: The list of REST API operations.
    properties:
      value:
        description: The list of operations.
        items:
          $ref: "#/definitions/OperationEntity"
        readOnly: true
        type: array
    type: object
  PlanQuantity:
    description: Represents the quantity a commitment plan provides of a metered resource.
    properties:
      allowance:
        description: The quantity added to the commitment plan at an interval specified by its allowance frequency.
        format: double
        readOnly: true
        type: number
      amount:
        description: The quantity available to the plan the last time usage was calculated.
        format: double
        readOnly: true
        type: number
      includedQuantityMeter:
        description: The Azure meter for usage against included quantities.
        readOnly: true
        type: string
      overageMeter:
        description: The Azure meter for usage which exceeds included quantities.
        readOnly: true
        type: string
    type: object
  PlanUsageHistory:
    description: Represents historical information about usage of the Azure resources associated with a commitment plan.
    properties:
      planDeletionOverage:
        additionalProperties:
          format: double
          type: number
        description: Overage incurred as a result of deleting a commitment plan.
        type: object
      planMigrationOverage:
        additionalProperties:
          format: double
          type: number
        description: Overage incurred as a result of migrating a commitment plan from one SKU to another.
        type: object
      planQuantitiesAfterUsage:
        additionalProperties:
          format: double
          type: number
        description: Included quantities remaining after usage against the commitment plan's associated resources was calculated.
        type: object
      planQuantitiesBeforeUsage:
        additionalProperties:
          format: double
          type: number
        description: Included quantities remaining before usage against the commitment plan's associated resources was calculated.
        type: object
      planUsageOverage:
        additionalProperties:
          format: double
          type: number
        description: Usage against the commitment plan's associated resources which was not covered by included quantities and is therefore overage.
        type: object
      usage:
        additionalProperties:
          format: double
          type: number
        description: Usage against the commitment plan's associated resources.
        type: object
      usageDate:
        description: The date of usage, in ISO 8601 format.
        format: date-time
        type: string
    type: object
  PlanUsageHistoryListResult:
    description: A page of usage history.
    properties:
      nextLink:
        description: A URI to retrieve the next page of results.
        type: string
      value:
        description: The set of results for this page.
        items:
          $ref: "#/definitions/PlanUsageHistory"
        type: array
    type: object
  Resource:
    description: Common properties of an ARM resource.
    properties:
      id:
        description: Resource Id.
        readOnly: true
        type: string
      location:
        description: Resource location.
        type: string
      name:
        description: Resource name.
        readOnly: true
        type: string
      tags:
        $ref: "#/definitions/Tags"
        description: User-defined tags for the resource.
      type:
        description: Resource type.
        readOnly: true
        type: string
    required:
      - location
    x-ms-azure-resource: true
  ResourceSku:
    description: The SKU of a resource.
    properties:
      capacity:
        description: The scale-out capacity of the resource. 1 is 1x, 2 is 2x, etc. This impacts the quantities and cost of any commitment plan resource.
        format: int32
        type: integer
      name:
        description: The SKU name. Along with tier, uniquely identifies the SKU.
        type: string
      tier:
        description: The SKU tier. Along with name, uniquely identifies the SKU.
        type: string
    type: object
  SkuCapability:
    description: Describes The SKU capabilities object.
    properties:
      name:
        description: The capability name.
        readOnly: true
        type: string
      value:
        description: The capability value.
        readOnly: true
        type: string
    type: object
  SkuCapacity:
    description: Describes scaling information of a SKU.
    properties:
      default:
        description: The default capacity.
        format: int64
        readOnly: true
        type: integer
      maximum:
        description: The maximum capacity that can be set.
        format: int64
        readOnly: true
        type: integer
      minimum:
        description: The minimum capacity.
        format: int64
        readOnly: true
        type: integer
      scaleType:
        description: The scale type applicable to the sku.
        enum:
          - Automatic
          - Manual
          - None
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: SkuCapacityScaleType
    type: object
  SkuCost:
    description: Describes metadata for SKU cost info.
    properties:
      extendedUnit:
        description: The overall duration represented by the quantity.
        readOnly: true
        type: string
      meterID:
        description: The meter used for this part of a SKU's cost.
        readOnly: true
        type: string
      quantity:
        description: The multiplier for the meter ID.
        format: int64
        readOnly: true
        type: integer
    type: object
  SkuListResult:
    description: The list of commitment plan SKUs.
    properties:
      value:
        items:
          $ref: "#/definitions/CatalogSku"
        readOnly: true
        type: array
    type: object
  SkuRestrictions:
    description: Describes restrictions which would prevent a SKU from being used.
    properties:
      reasonCode:
        description: The reason for restriction.
        enum:
          - QuotaId
          - NotAvailableForSubscription
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: ResourceSkuRestrictionsReasonCode
      type:
        description: The type of restrictions.
        enum:
          - location
          - zone
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: ResourceSkuRestrictionsType
      values:
        description: The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
        items:
          type: string
        readOnly: true
        type: array
  Tags:
    additionalProperties:
      type: string
    description: Resource tags
    type: object
