{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Azure software plans let users create and manage licenses for various software used in Azure.",
    "title": "Software Plan RP",
    "version": "2019-06-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-ms-code-generation-settings": {
      "name": "SoftwareplanClient"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/softwareplan/resource-manager/Microsoft.SoftwarePlan/preview/2019-06-01-preview/softwareplan.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "softwareplan",
    "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": {
    "ApiVersionParameter": {
      "description": "The api-version to be used by the service",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "client"
    },
    "PlanIdParameter": {
      "description": "This is a unique identifier for a plan. Should be a guid.",
      "in": "path",
      "name": "planId",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "PutBodyParameter": {
      "description": "Request body for creating a hybrid use benefit",
      "in": "body",
      "name": "body",
      "required": true,
      "schema": {
        "$ref": "#/definitions/HybridUseBenefitModel"
      },
      "x-ms-parameter-location": "method"
    },
    "ScopeParameter": {
      "description": "The scope at which the operation is performed. This is limited to Microsoft.Compute/virtualMachines and Microsoft.Compute/hostGroups/hosts for now",
      "in": "path",
      "name": "scope",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/providers/Microsoft.SoftwarePlan/register": {
      "post": {
        "description": "Register to Microsoft.SoftwarePlan resource provider.",
        "operationId": "SoftwarePlan_Register",
        "parameters": [
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "204": {
            "description": "OK - Microsoft.SoftwarePlan is registered"
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "tags": [
          "Software plan"
        ],
        "x-ms-examples": {
          "HybridUseBenefitListResult": {
            "parameters": {
              "api-version": "2019-06-01-preview",
              "subscriptionId": "98df3792-7962-4f18-8be2-d5576f122de3 "
            },
            "responses": {
              "204": {}
            }
          }
        }
      }
    },
    "/{scope}/providers/Microsoft.SoftwarePlan/hybridUseBenefits": {
      "get": {
        "description": "Get all hybrid use benefits associated with an ARM resource.",
        "operationId": "HybridUseBenefit_List",
        "parameters": [
          {
            "$ref": "#/parameters/ScopeParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "description": "Supports applying filter on the type of SKU",
            "in": "query",
            "name": "$filter",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK - returns an array of plans at that scope",
            "schema": {
              "$ref": "#/definitions/HybridUseBenefitListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "tags": [
          "Hybrid use benefits"
        ],
        "x-ms-examples": {
          "HybridUseBenefitListResult": {
            "parameters": {
              "$filter": "SQL_Server_EE_AHB",
              "api-version": "2019-06-01-preview",
              "scope": "subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "etag": 1,
                      "id": "/subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}/providers/Microsoft.SoftwarePlan/hybridUseBenefits/SQL_hostGroup_hostName",
                      "name": "SQL_hostGroup_hostName",
                      "properties": {
                        "createdDate": "2019-06-05T21:50:07.846Z",
                        "lastUpdatedDate": "2019-06-05T21:50:07.846Z",
                        "provisioningState": "Succeeded"
                      },
                      "sku": {
                        "name": "SQL_Server_EE_AHB"
                      },
                      "type": "Microsoft.SoftwarePlans/hybridUseBenefits"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/{scope}/providers/Microsoft.SoftwarePlan/hybridUseBenefits/{planId}": {
      "delete": {
        "description": "Deletes a given plan ID",
        "operationId": "HybridUseBenefit_Delete",
        "parameters": [
          {
            "$ref": "#/parameters/ScopeParameter"
          },
          {
            "$ref": "#/parameters/PlanIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK - successfully deleted the given plan"
          },
          "204": {
            "description": "OK - there was no plan to delete"
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "tags": [
          "Hybrid use benefit"
        ],
        "x-ms-examples": {
          "HybridUseBenefit": {
            "parameters": {
              "api-version": "2019-06-01-preview",
              "planId": "94f46eda-45f8-493a-8425-251921463a89",
              "scope": "subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}"
            },
            "responses": {
              "200": {},
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets a given plan ID",
        "operationId": "HybridUseBenefit_Get",
        "parameters": [
          {
            "$ref": "#/parameters/ScopeParameter"
          },
          {
            "$ref": "#/parameters/PlanIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK - returns the plan that is created",
            "schema": {
              "$ref": "#/definitions/HybridUseBenefitModel"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "tags": [
          "Hybrid use benefit"
        ],
        "x-ms-examples": {
          "HybridUseBenefit": {
            "parameters": {
              "api-version": "2019-06-01-preview",
              "planId": "94f46eda-45f8-493a-8425-251921463a89",
              "scope": "subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}"
            },
            "responses": {
              "200": {
                "body": {
                  "etag": 1,
                  "id": "/subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}/providers/Microsoft.SoftwarePlan/hybridUseBenefits/SQL_{hostGroupName}_{hostName}",
                  "name": "SQL_{hostGroupName}_{hostName}",
                  "properties": {
                    "createdDate": "2019-06-05T21:50:07.846Z",
                    "lastUpdatedDate": "2019-06-05T21:50:07.846Z",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "name": "SQL_Server_EE_AHB"
                  },
                  "type": "Microsoft.SoftwarePlans/hybridUseBenefits"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates an existing hybrid use benefit",
        "operationId": "HybridUseBenefit_Update",
        "parameters": [
          {
            "$ref": "#/parameters/ScopeParameter"
          },
          {
            "$ref": "#/parameters/PlanIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/PutBodyParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK - successfully updated the given hybrid use benefit",
            "schema": {
              "$ref": "#/definitions/HybridUseBenefitModel"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "tags": [
          "Hybrid use benefit"
        ],
        "x-ms-examples": {
          "HybridUseBenefit": {
            "parameters": {
              "api-version": "2019-06-01-preview",
              "body": {
                "sku": {
                  "name": "SQLBYOLStandardForADH"
                },
                "type": "Microsoft.SoftwarePlan/hybridUseBenefits"
              },
              "planId": "94f46eda-45f8-493a-8425-251921463a89",
              "scope": "subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}"
            },
            "responses": {
              "200": {
                "body": {
                  "etag": 1,
                  "id": "/subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}/providers/Microsoft.SoftwarePlan/hybridUseBenefits/SQL_{hostGroupName}_{hostName}",
                  "name": "SQL_{hostGroupName}_{hostName}",
                  "properties": {
                    "createdDate": "2019-06-05T21:50:07.846Z",
                    "lastUpdatedDate": "2019-06-05T21:50:07.846Z",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "name": "SQLBYOLStandardForADH"
                  },
                  "type": "Microsoft.SoftwarePlans/hybridUseBenefits"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Create a new hybrid use benefit under a given scope",
        "operationId": "HybridUseBenefit_Create",
        "parameters": [
          {
            "$ref": "#/parameters/ScopeParameter"
          },
          {
            "$ref": "#/parameters/PlanIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/PutBodyParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK - returns the plan that is created",
            "schema": {
              "$ref": "#/definitions/HybridUseBenefitModel"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "tags": [
          "Hybrid use benefit"
        ],
        "x-ms-examples": {
          "HybridUseBenefit": {
            "parameters": {
              "api-version": "2019-06-01-preview",
              "body": {
                "sku": {
                  "name": "SQL_Server_Perpetual"
                },
                "type": "Microsoft.SoftwarePlan/hybridUseBenefits"
              },
              "planId": "94f46eda-45f8-493a-8425-251921463a89",
              "scope": "subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}"
            },
            "responses": {
              "200": {
                "body": {
                  "etag": 1,
                  "id": "/subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}/providers/Microsoft.SoftwarePlan/hybridUseBenefits/SQL_{hostGroupName}_{hostName}",
                  "name": "SQL_{hostGroupName}_{hostName}",
                  "properties": {
                    "createdDate": "2019-06-05T21:50:07.846Z",
                    "lastUpdatedDate": "2019-06-05T21:50:07.846Z",
                    "provisioningState": "Succeeded"
                  },
                  "sku": {
                    "name": "SQL_Server_Perpetual"
                  },
                  "type": "Microsoft.SoftwarePlans/hybridUseBenefits"
                }
              }
            }
          }
        }
      }
    },
    "/{scope}/providers/Microsoft.SoftwarePlan/hybridUseBenefits/{planId}/revisions": {
      "get": {
        "description": "Gets the version history of a hybrid use benefit",
        "operationId": "HybridUseBenefitRevision_List",
        "parameters": [
          {
            "$ref": "#/parameters/ScopeParameter"
          },
          {
            "$ref": "#/parameters/PlanIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK - returns an array of plans ordered by revision",
            "schema": {
              "$ref": "#/definitions/HybridUseBenefitListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "tags": [
          "Hybrid use benefit revisions"
        ],
        "x-ms-examples": {
          "HybridUseBenefitRevisionsResponse": {
            "parameters": {
              "api-version": "2019-06-01-preview",
              "planId": "94f46eda-45f8-493a-8425-251921463a89",
              "scope": "subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "etag": 1,
                      "id": "/subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}/providers/Microsoft.SoftwarePlan/hybridUseBenefits/SQL_{hostGroupName}_{hostName}",
                      "name": "SQL_{hostGroupName}_{hostName}",
                      "properties": {
                        "createdDate": "2019-06-05T21:50:07.846Z",
                        "lastUpdatedDate": "2019-06-05T21:50:07.846Z",
                        "provisioningState": "Succeeded"
                      },
                      "sku": {
                        "name": "SQL_Server_EE_AHB"
                      },
                      "type": "Microsoft.SoftwarePlans/hybridUseBenefits"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/{scope}/providers/Microsoft.SoftwarePlan/operations": {
      "get": {
        "description": "List all the operations.",
        "operationId": "Operations_List",
        "parameters": [
          {
            "$ref": "#/parameters/ScopeParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "List all the operations.",
            "schema": {
              "$ref": "#/definitions/OperationList"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "summary": "Get operations.",
        "tags": [
          "Software plan operations"
        ],
        "x-ms-examples": {
          "GetOperations": {
            "parameters": {
              "api-version": "2019-06-01-preview",
              "scope": "subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "display": {
                        "description": "Read all hybrid use benefits",
                        "operation": "Get hybrid use benefit",
                        "provider": "Microsoft Software Plan",
                        "resource": "hybridUseBenefits"
                      },
                      "name": "Microsoft.SoftwarePlan/hybridUseBenefits/read"
                    },
                    {
                      "display": {
                        "description": "Create a hybrid use benefit",
                        "operation": "Create hybrid use benefit",
                        "provider": "Microsoft Software Plan",
                        "resource": "hybridUseBenefits"
                      },
                      "name": "Microsoft.SoftwarePlan/hybridUseBenefits/write"
                    },
                    {
                      "display": {
                        "description": "Update a hybrid use benefit",
                        "operation": "Update hybrid use benefit",
                        "provider": "Microsoft Software Plan",
                        "resource": "hybridUseBenefits"
                      },
                      "name": "Microsoft.SoftwarePlan/hybridUseBenefits/action"
                    },
                    {
                      "display": {
                        "description": "Delete a hybrid use benefit",
                        "operation": "Delete hybrid use benefit",
                        "provider": "Microsoft Software Plan",
                        "resource": "hybridUseBenefits"
                      },
                      "name": "Microsoft.SoftwarePlan/hybridUseBenefits/delete"
                    },
                    {
                      "display": {
                        "description": "Read all hybrid use benefit revisions",
                        "operation": "Get hybrid use benefit",
                        "provider": "Microsoft Software Plan",
                        "resource": "hybridUseBenefits"
                      },
                      "name": "Microsoft.SoftwarePlan/hybridUseBenefits/revisions/read"
                    },
                    {
                      "display": {
                        "description": "Registers the SoftwarePlan resource provider and enables the creation of SoftwarePlan resources.",
                        "operation": "Registers the SoftwarePlan Resource Provider.",
                        "provider": "Microsoft Software Plan",
                        "resource": "SoftwarePlan"
                      },
                      "name": "Microsoft.SoftwarePlan/register/action"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    }
  },
  "definitions": {
    "Error": {
      "description": "Error object returned by the RP",
      "properties": {
        "code": {
          "$ref": "#/definitions/ErrorCode",
          "description": "Error code"
        },
        "message": {
          "description": "A user readable error message. Localized based on x-ms-effective-locale header in the request",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ErrorCode": {
      "description": "Defined error codes to be returned to the client.",
      "enum": [
        "InvalidRequestParameter",
        "MissingRequestParameter"
      ],
      "type": "string",
      "x-ms-enum": {
        "modelAsString": true,
        "name": "ErrorCode"
      }
    },
    "HybridUseBenefitListResult": {
      "description": "List of hybrid use benefits",
      "properties": {
        "nextLink": {
          "description": "Url to get the next page of items.",
          "type": "string"
        },
        "value": {
          "description": "List of hybrid use benefits",
          "items": {
            "$ref": "#/definitions/HybridUseBenefitModel"
          },
          "type": "array"
        }
      }
    },
    "HybridUseBenefitModel": {
      "allOf": [
        {
          "properties": {
            "id": {
              "description": "Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}",
              "readOnly": true,
              "type": "string"
            },
            "name": {
              "description": "The name of the resource",
              "readOnly": true,
              "type": "string"
            },
            "type": {
              "description": "The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.",
              "readOnly": true,
              "type": "string"
            }
          },
          "x-ms-azure-resource": true
        }
      ],
      "description": "Response on GET of a hybrid use benefit",
      "properties": {
        "etag": {
          "description": "Indicates the revision of the hybrid use benefit",
          "format": "int32",
          "readOnly": true,
          "type": "integer"
        },
        "properties": {
          "$ref": "#/definitions/HybridUseBenefitProperties",
          "description": "Property bag for a hybrid use benefit response",
          "x-ms-client-flatten": true
        },
        "sku": {
          "$ref": "#/definitions/Sku",
          "description": "Hybrid use benefit SKU"
        }
      },
      "required": [
        "sku"
      ]
    },
    "HybridUseBenefitProperties": {
      "description": "Hybrid use benefit properties",
      "properties": {
        "createdDate": {
          "description": "Created date",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "lastUpdatedDate": {
          "description": "Last updated date",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "provisioningState": {
          "$ref": "#/definitions/ProvisioningState",
          "description": "Provisioning state",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "OperationDisplay": {
      "description": "Display fields for an operation.",
      "properties": {
        "description": {
          "description": "Description of the operation",
          "type": "string"
        },
        "operation": {
          "description": "Operation to be performed",
          "type": "string"
        },
        "provider": {
          "description": "Resource Provider name",
          "type": "string"
        },
        "resource": {
          "description": "Resource that is acted upon",
          "type": "string"
        }
      },
      "type": "object"
    },
    "OperationList": {
      "description": "List all the operations.",
      "properties": {
        "nextLink": {
          "description": "Url to get the next page of items.",
          "type": "string"
        },
        "value": {
          "description": "List of all operations",
          "items": {
            "$ref": "#/definitions/OperationResponse"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "OperationResponse": {
      "description": "Operation response.",
      "properties": {
        "display": {
          "$ref": "#/definitions/OperationDisplay",
          "description": "Display properties for the operation"
        },
        "name": {
          "description": "Name of the operation",
          "type": "string"
        },
        "origin": {
          "description": "Origin of the response",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ProvisioningState": {
      "description": "Represent the current state of the Reservation.",
      "enum": [
        "Succeeded",
        "Cancelled",
        "Failed"
      ],
      "type": "string",
      "x-ms-enum": {
        "modelAsString": true,
        "name": "ProvisioningState"
      }
    },
    "Sku": {
      "description": "The SKU to be applied for this resource",
      "properties": {
        "name": {
          "description": "Name of the SKU to be applied",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}