{ "swagger": "2.0", "info": { "title": "EdgeMarketplaceClient", "version": "2023-08-01", "description": "Edge Market Place Resource Provider management API.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "Offers" } ], "paths": { "/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers": { "get": { "tags": [ "Offers" ], "operationId": "Offers_List", "x-ms-examples": { "List offers": { "$ref": "./examples/ListOffers.json" } }, "description": "List Offer resources by parent", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/Azure.ResourceManager.ResourceUriParameter" }, { "$ref": "#/parameters/Azure.Core.TopQueryParameter" }, { "$ref": "#/parameters/Azure.Core.SkipQueryParameter" }, { "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" }, { "$ref": "#/parameters/Azure.Core.FilterQueryParameter" }, { "$ref": "#/parameters/Azure.Core.SkipTokenParameter" } ], "responses": { "200": { "description": "ARM operation completed successfully.", "schema": { "$ref": "#/definitions/OfferListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeMarketplace/offers": { "get": { "tags": [ "Offers" ], "operationId": "Offers_ListBySubscription", "x-ms-examples": { "List offers by subscription": { "$ref": "./examples/ListOffersBySubscription.json" } }, "description": "List Offer resources by subscription", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/Azure.Core.TopQueryParameter" }, { "$ref": "#/parameters/Azure.Core.SkipQueryParameter" }, { "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" }, { "$ref": "#/parameters/Azure.Core.FilterQueryParameter" }, { "$ref": "#/parameters/Azure.Core.SkipTokenParameter" } ], "responses": { "200": { "description": "ARM operation completed successfully.", "schema": { "$ref": "#/definitions/OfferListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}": { "get": { "tags": [ "Offers" ], "operationId": "Offers_Get", "x-ms-examples": { "Get offer": { "$ref": "./examples/GetOffer.json" } }, "description": "Get a Offer", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/Azure.ResourceManager.ResourceUriParameter" }, { "name": "offerId", "in": "path", "required": true, "description": "Id of the offer", "type": "string" } ], "responses": { "200": { "description": "ARM operation completed successfully.", "schema": { "$ref": "#/definitions/Offer" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } } } }, "/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}/generateAccessToken": { "post": { "tags": [ "Offers" ], "operationId": "Offers_GenerateAccessToken", "x-ms-examples": { "Generate AccessToken": { "$ref": "./examples/GenerateAccessToken.json" } }, "description": "A long-running resource action.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/Azure.ResourceManager.ResourceUriParameter" }, { "name": "offerId", "in": "path", "required": true, "description": "Id of the offer", "type": "string" }, { "name": "body", "in": "body", "required": true, "description": "The content of the action request", "schema": { "$ref": "#/definitions/AccessTokenRequest" } } ], "responses": { "200": { "description": "ARM operation completed successfully.", "schema": { "$ref": "#/definitions/DiskAccessToken" } }, "202": { "description": "Resource operation accepted.", "headers": { "Retry-After": { "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", "format": "int32" }, "Location": { "description": "The Location header contains the URL where the status of the long running operation can be checked.", "type": "string" } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } }, "/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}/getAccessToken": { "post": { "tags": [ "Offers" ], "operationId": "Offers_GetAccessToken", "x-ms-examples": { "Get AccessToken": { "$ref": "./examples/GetAccessToken.json" } }, "description": "get access token.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/Azure.ResourceManager.ResourceUriParameter" }, { "name": "offerId", "in": "path", "required": true, "description": "Id of the offer", "type": "string" }, { "name": "body", "in": "body", "required": true, "description": "The content of the action request", "schema": { "$ref": "#/definitions/AccessTokenReadRequest" } } ], "responses": { "200": { "description": "ARM operation completed successfully.", "schema": { "$ref": "#/definitions/DiskAccessToken" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } } } } }, "definitions": { "AccessTokenReadRequest": { "type": "object", "properties": { "requestId": { "type": "string", "description": "The name of the publisher." } }, "description": "Access token request object", "required": [ "requestId" ] }, "AccessTokenRequest": { "type": "object", "properties": { "publisherName": { "type": "string", "description": "The name of the publisher." }, "edgeMarketPlaceRegion": { "type": "string", "description": "The region where the disk will be created." }, "egeMarketPlaceResourceId": { "type": "string", "description": "The region where the disk will be created." }, "hypervGeneration": { "type": "string", "description": "The hyperv version." }, "marketPlaceSku": { "type": "string", "description": "The marketplace sku." }, "marketPlaceSkuVersion": { "type": "string", "description": "The marketplace sku version." }, "deviceSku": { "type": "string", "description": "The device sku." }, "deviceVersion": { "type": "string", "description": "The device sku version." } }, "description": "Access token request object", "required": [ "edgeMarketPlaceRegion" ] }, "Azure.ResourceManager.ResourceProvisioningState": { "type": "string", "description": "The provisioning state of a resource type.", "enum": [ "Succeeded", "Failed", "Canceled" ], "x-ms-enum": { "name": "ResourceProvisioningState", "modelAsString": true, "values": [ { "name": "Succeeded", "value": "Succeeded", "description": "Resource has been created." }, { "name": "Failed", "value": "Failed", "description": "Resource creation failed." }, { "name": "Canceled", "value": "Canceled", "description": "Resource creation was canceled." } ] } }, "DiskAccessToken": { "type": "object", "properties": { "diskId": { "type": "string", "description": "The disk id." }, "status": { "type": "string", "description": "The access token creation status." }, "accessToken": { "type": "string", "description": "The access token." } }, "description": "The disk access token", "required": [ "accessToken" ] }, "IconFileUris": { "type": "object", "properties": { "small": { "type": "string", "description": "uri of small icon" }, "medium": { "type": "string", "description": "uri of medium icon" }, "wide": { "type": "string", "description": "uri of wide icon" }, "large": { "type": "string", "description": "uri of large icon" } }, "description": "Icon files" }, "MarketplaceSku": { "type": "object", "properties": { "catalogPlanId": { "type": "string", "description": "The catalog plan id" }, "marketplaceSkuId": { "type": "string", "description": "The marketplace sku id" }, "type": { "type": "string", "description": "The type of marketplace sku" }, "displayName": { "type": "string", "description": "The display name of marketplace sku" }, "summary": { "type": "string", "description": "The summary" }, "longSummary": { "type": "string", "description": "The long summary" }, "description": { "type": "string", "description": "The description" }, "generation": { "type": "string", "description": "The generation" }, "displayRank": { "type": "integer", "format": "int32", "description": "The display rank of the sku" }, "operatingSystem": { "$ref": "#/definitions/SkuOperatingSystem", "description": "The operating system supported" }, "marketplaceSkuVersions": { "type": "array", "items": { "$ref": "#/definitions/MarketplaceSkuVersion" }, "x-ms-identifiers": [], "description": "The marketplace sku version", "x-typespec-name": "MarketplaceSkuVersion[]" } }, "description": "The marketplace sku", "required": [ "catalogPlanId", "marketplaceSkuId" ] }, "MarketplaceSkuVersion": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of sku version" }, "sizeOnDiskInMb": { "type": "integer", "format": "int32", "description": "The size of the image" }, "minimumDownloadSizeInMb": { "type": "integer", "format": "int32", "description": "The size of the download" }, "stageName": { "type": "string", "description": "The stage name" } }, "description": "The marketplace sku version", "required": [ "name" ] }, "Offer": { "type": "object", "properties": { "properties": { "$ref": "#/definitions/OfferProperties", "description": "The resource-specific properties for this resource.", "x-ms-client-flatten": true, "x-ms-mutability": [ "read", "create" ] } }, "description": "An offer.", "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, "OfferAvailability": { "type": "string", "description": "Says if the offer is public/private", "enum": [ "Private", "Public" ], "x-ms-enum": { "name": "OfferAvailability", "modelAsString": true, "values": [ { "name": "Private", "value": "Private", "description": "The offer availability is private" }, { "name": "Public", "value": "Public", "description": "The offer availability is public" } ] } }, "OfferContent": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of the offer" }, "summary": { "type": "string", "description": "The summary" }, "longSummary": { "type": "string", "description": "The long summary" }, "description": { "type": "string", "description": "The description" }, "offerId": { "type": "string", "description": "The offer id" }, "offerType": { "type": "string", "description": "The offer type" }, "supportUri": { "type": "string", "description": "The support uri" }, "popularity": { "type": "integer", "format": "int32", "description": "The popularity of the offer" }, "offerPublisher": { "$ref": "#/definitions/OfferPublisher", "description": "The publisher of the offer" }, "availability": { "$ref": "#/definitions/OfferAvailability", "description": "The availability of the offer" }, "releaseType": { "$ref": "#/definitions/OfferReleaseType", "description": "The release type of the offer" }, "iconFileUris": { "$ref": "#/definitions/IconFileUris", "description": "The icon files" }, "termsAndConditions": { "$ref": "#/definitions/TermsAndConditions", "description": "The terms and conditions" }, "categoryIds": { "type": "array", "items": { "type": "string" }, "description": "The category ids ", "x-typespec-name": "string[]" }, "operatingSystems": { "type": "array", "items": { "type": "string" }, "description": "The operating systems", "x-typespec-name": "string[]" } }, "description": "The offer content", "required": [ "displayName", "offerId" ] }, "OfferListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/Offer" }, "description": "The Offer items on this page", "x-typespec-name": "Offer[]" }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items", "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "The response of a Offer list operation.", "required": [ "value" ] }, "OfferProperties": { "type": "object", "properties": { "contentVersion": { "type": "string", "description": "The content version" }, "contentUrl": { "type": "string", "description": "The content url" }, "offerContent": { "$ref": "#/definitions/OfferContent", "description": "The offer content" }, "provisioningState": { "$ref": "#/definitions/Azure.ResourceManager.ResourceProvisioningState", "description": "The resource provisioning state" }, "marketplaceSkus": { "type": "array", "items": { "$ref": "#/definitions/MarketplaceSku" }, "x-ms-identifiers": [], "description": "The marketplace skus", "x-typespec-name": "MarketplaceSku[]" } }, "description": "The offer properties", "required": [ "offerContent" ] }, "OfferPublisher": { "type": "object", "properties": { "publisherId": { "type": "string", "description": "The publisher Id" }, "publisherDisplayName": { "type": "string", "description": "The publisher name" } }, "description": "The offer publisher", "required": [ "publisherId", "publisherDisplayName" ] }, "OfferReleaseType": { "type": "string", "description": "Offer release type", "enum": [ "Preview", "GA" ], "x-ms-enum": { "name": "OfferReleaseType", "modelAsString": true, "values": [ { "name": "Preview", "value": "Preview", "description": "The offer in preview" }, { "name": "GA", "value": "GA", "description": "The offer in GA" } ] } }, "SkuOperatingSystem": { "type": "object", "properties": { "family": { "type": "string", "description": "The family of the operating system" }, "type": { "type": "string", "description": "The type of the operating system" }, "name": { "type": "string", "description": "The name of the operating system" } }, "description": "The sku operating system", "required": [ "name" ] }, "TermsAndConditions": { "type": "object", "properties": { "legalTermsUri": { "type": "string", "description": "The legal terms and conditions uri" }, "legalTermsType": { "type": "string", "description": "The type of legal terms" }, "privacyPolicyUri": { "type": "string", "description": "The privacy policy uri" } }, "description": "Terms and conditions" } }, "parameters": { "Azure.Core.FilterQueryParameter": { "name": "$filter", "in": "query", "required": false, "description": "Filter the result list using the given expression.", "type": "string", "x-ms-parameter-location": "method" }, "Azure.Core.MaxPageSizeQueryParameter": { "name": "maxpagesize", "in": "query", "required": false, "description": "The maximum number of result items per page.", "type": "integer", "format": "int32", "x-ms-parameter-location": "method" }, "Azure.Core.SkipQueryParameter": { "name": "skip", "in": "query", "required": false, "description": "The number of result items to skip.", "default": 0, "type": "integer", "format": "int32", "x-ms-parameter-location": "method" }, "Azure.Core.TopQueryParameter": { "name": "$top", "in": "query", "required": false, "description": "The number of result items to return.", "type": "integer", "format": "int32", "x-ms-parameter-location": "method" }, "Azure.Core.SkipTokenParameter": { "name": "$skipToken", "in": "query", "required": false, "description": "Skip over when retrieving results.", "type": "string", "x-ms-parameter-location": "method" }, "Azure.ResourceManager.ResourceUriParameter": { "name": "resourceUri", "in": "path", "required": true, "description": "The fully qualified Azure Resource manager identifier of the resource.", "type": "string", "x-ms-skip-url-encoding": true, "x-ms-parameter-location": "method" } } }