diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/Marketplace.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/Marketplace.json new file mode 100644 index 000000000000..31e1786825ce --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/Marketplace.json @@ -0,0 +1,1070 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-12-01", + "title": "MarketplaceManagementClient", + "description": "REST APIs for Azure Marketplace" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/queryNotificationsState": { + "parameters": [ + { + "$ref": "#/parameters/PrivateStoreIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "post": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_QueryNotificationsState", + "description": "Get private store notifications state", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrivateStoreNotificationsState" + } + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "NotificationsState": { + "$ref": "./examples/NotificationsState.json" + } + } + } + }, + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/offers/{offerId}/acknowledgeNotification": { + "parameters": [ + { + "$ref": "#/parameters/PrivateStoreIdParameter" + }, + { + "$ref": "#/parameters/OfferIdPathParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "post": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_AcknowledgeOfferNotification", + "description": "Acknowledge notification for offer", + "parameters": [ + { + "in": "body", + "name": "payload", + "schema": { + "$ref": "#/definitions/AcknowledgeOfferNotificationProperties" + } + } + ], + "responses": { + "200": { + "description": "OK, notification was acknowledged by the RP" + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "AcknowledgeNotification": { + "$ref": "./examples/AcknowledgeNotification.json" + } + } + } + }, + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/requestApprovals": { + "parameters": [ + { + "$ref": "#/parameters/PrivateStoreIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "get": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_GetApprovalRequestsList", + "description": "Get all open approval requests of current user", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RequestApprovalsList" + } + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetApprovalRequestsList": { + "$ref": "./examples/GetApprovalRequestsList.json" + } + } + } + }, + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/requestApprovals/{requestApprovalId}": { + "parameters": [ + { + "$ref": "#/parameters/PrivateStoreIdParameter" + }, + { + "$ref": "#/parameters/RequestApprovalIdPathParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "get": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_GetRequestApproval", + "description": "Get open request approval details", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RequestApprovalResource" + } + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetApprovalRequest": { + "$ref": "./examples/GetRequestApproval.json" + } + } + }, + "put": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_CreateApprovalRequest", + "description": "Create approval request", + "parameters": [ + { + "in": "body", + "name": "payload", + "schema": { + "$ref": "#/definitions/RequestApprovalResource" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RequestApprovalResource" + } + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CreateApprovalRequest": { + "$ref": "./examples/CreateApprovalRequest.json" + } + } + } + }, + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/requestApprovals/{requestApprovalId}/query": { + "parameters": [ + { + "$ref": "#/parameters/PrivateStoreIdParameter" + }, + { + "$ref": "#/parameters/RequestApprovalIdPathParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "post": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_QueryRequestApproval", + "description": "Get request statuses foreach plan, this api is used as a complex GET action.", + "parameters": [ + { + "in": "body", + "name": "payload", + "schema": { + "$ref": "#/definitions/QueryRequestApprovalProperties" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QueryRequestApproval" + } + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueryRequestApproval": { + "$ref": "./examples/QueryRequestApproval.json" + } + } + } + }, + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/requestApprovals/{requestApprovalId}/withdrawPlan": { + "parameters": [ + { + "$ref": "#/parameters/PrivateStoreIdParameter" + }, + { + "$ref": "#/parameters/RequestApprovalIdPathParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "post": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_WithdrawPlan", + "description": "Withdraw a user request approval on specific plan", + "parameters": [ + { + "in": "body", + "name": "payload", + "schema": { + "$ref": "#/definitions/WithdrawProperties" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "WithdrawPlan": { + "$ref": "./examples/WithdrawPlan.json" + } + } + } + }, + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/adminRequestApprovals": { + "parameters": [ + { + "$ref": "#/parameters/PrivateStoreIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "get": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_AdminRequestApprovalsList", + "description": "Get list of admin request approvals", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AdminRequestApprovalsList" + } + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "AdminRequestApprovalsList": { + "$ref": "./examples/AdminRequestApprovalsList.json" + } + } + } + }, + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/adminRequestApprovals/{adminRequestApprovalId}": { + "parameters": [ + { + "$ref": "#/parameters/PrivateStoreIdParameter" + }, + { + "$ref": "#/parameters/AdminRequestApprovalIdPathParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "get": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_GetAdminRequestApproval", + "description": "Get open approval requests", + "parameters": [ + { + "$ref": "#/parameters/PublisherIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AdminRequestApprovalsResource" + } + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetAdminRequestApproval": { + "$ref": "./examples/GetAdminRequestApproval.json" + } + } + }, + "put": { + "tags": [ + "PrivateStores" + ], + "operationId": "PrivateStore_UpdateAdminRequestApproval", + "description": "Update the admin action, weather the request is approved or rejected and the approved plans", + "parameters": [ + { + "in": "body", + "name": "payload", + "schema": { + "$ref": "#/definitions/AdminRequestApprovalsResource" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AdminRequestApprovalsResource" + } + }, + "default": { + "description": "Microsoft.Marketplace error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "UpdateAdminRequestApproval": { + "$ref": "./examples/UpdateAdminRequestApproval.json" + } + } + } + } + }, + "parameters": { + "PrivateStoreIdParameter": { + "name": "privateStoreId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The store ID - must use the tenant ID" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the request." + }, + "PublisherIdParameter": { + "name": "publisherId", + "in": "query", + "required": true, + "x-ms-parameter-location": "method", + "type": "string", + "description": "The publisher id of this offer." + }, + "OfferIdPathParameter": { + "in": "path", + "name": "offerId", + "type": "string", + "x-ms-parameter-location": "method", + "required": true, + "description": "The offer ID to update or delete" + }, + "AdminRequestApprovalIdPathParameter": { + "in": "path", + "name": "adminRequestApprovalId", + "type": "string", + "x-ms-parameter-location": "method", + "required": true, + "description": "The admin request approval ID to get create or update" + }, + "RequestApprovalIdPathParameter": { + "in": "path", + "name": "requestApprovalId", + "type": "string", + "x-ms-parameter-location": "method", + "required": true, + "description": "The request approval ID to get create or update" + } + }, + "definitions": { + "ErrorResponse": { + "description": "Error response indicates Microsoft.Marketplace service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "PrivateStoreNotificationsState": { + "description": "Get private store notifications state", + "type": "object", + "properties": { + "stopSellNotifications": { + "type": "array", + "items": { + "$ref": "#/definitions/StopSellNotifications" + } + }, + "newNotifications": { + "type": "array", + "items": { + "$ref": "#/definitions/NewNotifications" + } + }, + "approvalRequests": { + "type": "array", + "items": { + "$ref": "#/definitions/RequestApprovalsDetails" + } + } + } + }, + "AcknowledgeOfferNotificationProperties": { + "description": "Notification update request payload", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/AcknowledgeOfferNotificationDetails", + "description": "Notification update request payload details", + "x-ms-client-flatten": true + } + } + }, + "AcknowledgeOfferNotificationDetails": { + "description": "Notification update request payload details", + "type": "object", + "properties": { + "acknowledge": { + "description": "Gets or sets a value indicating whether acknowledge action flag is enabled", + "type": "boolean" + }, + "dismiss": { + "description": "Gets or sets a value indicating whether dismiss action flag is enabled", + "type": "boolean" + }, + "removeOffer": { + "description": "Gets or sets a value indicating whether remove offer action flag is enabled", + "type": "boolean" + }, + "addPlans": { + "description": "Gets or sets added plans", + "type": "array", + "items": { + "type": "string" + } + }, + "removePlans": { + "description": "Gets or sets remove plans", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "NewNotifications": { + "description": "New plans notification details", + "type": "object", + "properties": { + "offerId": { + "description": "Gets offer id", + "type": "string" + }, + "displayName": { + "description": "Gets offer display name", + "type": "string" + }, + "isFuturePlansEnabled": { + "description": "Gets a value indicating whether future plans is enabled.", + "type": "boolean" + }, + "messageCode": { + "description": "Gets or sets the notification message id", + "type": "integer", + "format": "int64" + }, + "icon": { + "description": "Gets or sets the icon url", + "type": "string" + }, + "plans": { + "description": "Gets or sets removed plans notifications", + "type": "array", + "items": { + "$ref": "#/definitions/PlanNotificationDetails" + } + } + } + }, + "StopSellNotifications": { + "description": "Stop sell notification details", + "type": "object", + "properties": { + "offerId": { + "description": "Gets offer id", + "type": "string" + }, + "displayName": { + "description": "Gets offer display name", + "type": "string" + }, + "isEntire": { + "description": "Gets a value indicating whether entire offer is in stop sell or only few of its plans", + "type": "boolean" + }, + "messageCode": { + "description": "Gets or sets the notification message id", + "type": "integer", + "format": "int64" + }, + "icon": { + "description": "Gets or sets the icon url", + "type": "string" + }, + "plans": { + "description": "Gets or sets removed plans notifications", + "type": "array", + "items": { + "$ref": "#/definitions/PlanNotificationDetails" + } + } + } + }, + "PlanNotificationDetails": { + "description": "Plan notification details", + "type": "object", + "properties": { + "planId": { + "description": "Gets or sets the plan id", + "type": "string" + }, + "planDisplayName": { + "description": "Gets or sets the plan display name", + "type": "string" + } + } + }, + "RequestApprovalsDetails": { + "description": "Request approvals details", + "type": "object", + "properties": { + "offerId": { + "description": "Gets offer id", + "type": "string" + }, + "displayName": { + "description": "Gets offer display name", + "type": "string" + }, + "publisherId": { + "description": "Gets or sets publisher id", + "type": "string" + }, + "messageCode": { + "description": "Gets or sets the notification message id", + "type": "integer", + "format": "int64" + }, + "icon": { + "description": "Gets or sets the icon url", + "type": "string" + }, + "plans": { + "description": "Gets or sets removed plans notifications", + "type": "array", + "items": { + "$ref": "#/definitions/PlanNotificationDetails" + } + } + } + }, + "AdminRequestApprovalsList": { + "description": "List of admin request approval resources", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/AdminRequestApprovalsResource" + } + }, + "nextLink": { + "description": "URL to get the next set of notifications list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "AdminRequestApprovalsResource": { + "description": "Admin request approval resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/AdminRequestApprovalProperties", + "description": "The privateStore admin Approval request data structure.", + "x-ms-client-flatten": true + } + } + }, + "AdminRequestApprovalProperties": { + "description": "Admin approval request resource properties", + "type": "object", + "properties": { + "offerId": { + "description": "Gets or sets offer Id", + "type": "string" + }, + "displayName": { + "description": "Gets display name", + "type": "string", + "readOnly": true + }, + "publisherId": { + "description": "Gets or sets publisher Id", + "type": "string" + }, + "adminAction": { + "description": "Gets or sets admin action", + "type": "string", + "enum": [ + "Approved", + "Rejected" + ], + "x-ms-enum": { + "name": "adminAction", + "modelAsString": true + } + }, + "approvedPlans": { + "description": "Gets or sets Approved plans ids, empty in case of rejected", + "type": "array", + "items": { + "type": "string" + } + }, + "comment": { + "description": "Gets or sets admin comment", + "type": "string" + }, + "administrator": { + "description": "Gets or sets admin details", + "type": "string" + }, + "plans": { + "description": "Gets list of plans with requesters details", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/PlanRequesterDetails" + } + } + } + }, + "PlanRequesterDetails": { + "description": "Plan with requesters details", + "properties": { + "planId": { + "description": "Gets the plan id", + "type": "string", + "readOnly": true + }, + "planDisplayName": { + "description": "Gets the plan display name", + "type": "string", + "readOnly": true + }, + "requesters": { + "description": "Gets requesters details list", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/UserRequestDetails" + } + } + } + }, + "UserRequestDetails": { + "description": "user request details", + "type": "object", + "properties": { + "user": { + "description": "Gets user id", + "type": "string", + "readOnly": true + }, + "date": { + "description": "Gets request date", + "type": "string", + "readOnly": true + }, + "justification": { + "description": "Gets justification", + "type": "string", + "readOnly": true + } + } + }, + "RequestApprovalsList": { + "description": "List of admin request approval resources", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RequestApprovalResource" + } + }, + "nextLink": { + "description": "URL to get the next set of notifications list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "RequestApprovalResource": { + "description": "Request approval resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RequestApprovalProperties", + "description": "The privateStore approval request data structure.", + "x-ms-client-flatten": true + } + } + }, + "RequestApprovalProperties": { + "description": "Approval request resource properties", + "type": "object", + "properties": { + "offerId": { + "description": "Gets or sets unique offer id.", + "type": "string" + }, + "offerDisplayName": { + "description": "Gets offer display name", + "type": "string", + "readOnly": true + }, + "publisherId": { + "description": "The offer's publisher id", + "type": "string" + }, + "plansDetails": { + "description": "Gets or sets the plans details", + "type": "array", + "items": { + "$ref": "#/definitions/planDetails" + } + }, + "isClosed": { + "description": "Gets a value indicating whether the request is closed", + "type": "boolean", + "readOnly": true + }, + "messageCode": { + "description": "Gets or sets the request approval message code", + "type": "integer", + "format": "int64" + } + } + }, + "planDetails": { + "description": "Return plan with request details", + "type": "object", + "properties": { + "planId": { + "description": "Gets or sets Plan Id ", + "type": "string" + }, + "status": { + "description": "Gets the plan status", + "type": "string", + "readOnly": true, + "enum": [ + "Pending", + "Rejected", + "Approved", + "None" + ], + "x-ms-enum": { + "name": "status", + "modelAsString": true + } + }, + "requestDate": { + "description": "Gets request date", + "format": "date-time", + "readOnly": true + }, + "justification": { + "description": "Gets or sets user's justification for the plan's request", + "type": "string" + } + } + }, + "QueryRequestApproval": { + "description": "Gets the request plans with indication on each plan whether is approved by the admin, has pending request or not requested yet", + "type": "object", + "properties": { + "uniqueOfferId": { + "description": "Gets or sets unique offer id.", + "type": "string" + }, + "plansDetails": { + "description": "Gets or sets the plans details", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/planDetails" + } + }, + "etag": { + "description": "Gets or sets e-tag field ", + "type": "string" + }, + "messageCode": { + "description": "Gets or sets the notification message id", + "type": "integer", + "format": "int64" + } + } + }, + "QueryRequestApprovalProperties": { + "description": "The details to get the request plans statuses", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/RequestDetails", + "description": "The details to get the request plans statuses" + } + } + }, + "RequestDetails": { + "description": "Request details needed to get the plans statuses", + "type": "object", + "properties": { + "publisherId": { + "description": "The offer's publisher id", + "type": "string" + }, + "planIds": { + "description": "Current plans list", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "WithdrawProperties": { + "description": "Withdraw properties", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/WithdrawDetails", + "description": "Withdraw properties details", + "x-ms-client-flatten": true + } + } + }, + "WithdrawDetails": { + "description": "Withdraw properties details", + "type": "object", + "properties": { + "planId": { + "description": "Gets or sets Plan Id ", + "type": "string" + }, + "publisherId": { + "description": "The offer's publisher id", + "type": "string" + } + } + }, + "Resource": { + "description": "An Azure resource.", + "properties": { + "id": { + "description": "The resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of the resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the resource.", + "type": "string", + "readOnly": true + }, + "systemData": { + "$ref": "#/definitions/SystemData", + "readOnly": true, + "description": "Metadata pertaining to creation and last modification of the resource" + } + }, + "x-ms-azure-resource": true + }, + "SystemData": { + "description": "Read only system data", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "$ref": "#/definitions/IdentityType", + "description": "The type of identity that created the resource" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)" + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "$ref": "#/definitions/IdentityType", + "description": "The type of identity that last modified the resource" + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } + }, + "IdentityType": { + "description": "The type of identity that creates/modifies resources", + "type": "string", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/AcknowledgeNotification.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/AcknowledgeNotification.json new file mode 100644 index 000000000000..6346e8478da4 --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/AcknowledgeNotification.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "offerId": "marketplacetestthirdparty.md-test-third-party-2", + "api-version": "2020-12-01", + "AcknowledgeOfferNotificationProperties": { + "parameters": { + "properties": { + "RemovePlans": [ + "testPlanA" + ], + "AddPlans": null, + "Acknowledge": false, + "Dismiss": false, + "RemoveOffer": false + } + } + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/AdminRequestApprovalsList.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/AdminRequestApprovalsList.json new file mode 100644 index 000000000000..a2b3a102bf28 --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/AdminRequestApprovalsList.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "api-version": "2020-12-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "systemData": { + "createdBy": "user@somedoamin.com", + "createdByType": "User", + "createdAt": "2021-02-01T10:23:17.6571572+02:00", + "lastModifiedBy": "user@somedoamin.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-02-01T10:23:17.6571572+02:00" + }, + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406/adminRequestApprovals/marketplacetestthirdparty.md-test-third-party-2", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "type": "/providers/Microsoft.Marketplace/privateStores/adminRequestApprovals", + "properties": { + "publisherId": "marketplacetestthirdparty", + "offerId": "marketplacetestthirdparty.md-test-third-party-2", + "displayName": "Offer display name", + "plans": [ + { + "planId": "testA", + "planDisplayName": "Plan display name A", + "requesters": [ + { + "user": "testUser3", + "date": "2021-02-01T11:42:12.9526511+02:00", + "justification": "Because I want to...." + } + ] + }, + { + "planId": "*", + "planDisplayName": "* (this means the user requested any plan, here you will get only *)", + "requesters": [ + { + "user": "testUser3", + "date": "2021-02-01T11:42:12.9526511+02:00", + "justification": "try me :)" + } + ] + } + ], + "adminAction": "Pending", + "approvedPlans": null, + "comment": null, + "administrator": null + } + } + ] + } + } + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/CreateApprovalRequest.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/CreateApprovalRequest.json new file mode 100644 index 000000000000..565ce8fdce13 --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/CreateApprovalRequest.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "requestApprovalId": "marketplacetestthirdparty.md-test-third-party-2", + "api-version": "2020-12-01", + "RequestApprovalResource": { + "parameters": { + "properties": { + "publisherId": "marketplacetestthirdparty", + "plansDetails": [ + { + "planId": "testPlanA", + "justification": "Because I want to...." + }, + { + "planId": "*", + "justification": "try me :)" + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "user@somedoamin.com", + "createdByType": "User", + "lastModifiedBy": "user@somedoamin.com", + "lastModifiedByType": "User", + "createdAt": "2021-02-01T10:23:17.6571572+02:00", + "lastModifiedAt": "2021-02-01T10:23:17.6571572+02:00" + }, + "id": "/providers/Microsoft.Marketplace/privateStores/9afd3c45-5230-4d58-9469-2cacc00bba68/requestApprovals/marketplacetestthirdparty.md-test-third-party-2", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "type": "Microsoft.Marketplace/privateStores/requestApprovals", + "properties": { + "offerId": "marketplacetestthirdparty.md-test-third-party-2", + "publisherId": "marketplacetestthirdparty", + "offerDisplayName": "Offer Display name", + "plansDetails": [ + { + "planId": "testPlanA", + "requestDate": "2021-02-01T10:23:17.6571572+02:00", + "justification": "Because I want to....", + "status": "Pending" + }, + { + "planId": "*", + "requestDate": "2021-02-01T10:23:17.6571572+02:00", + "justification": "try me :)", + "status": "Pending" + } + ], + "isClosed": false, + "messageCode": 0 + } + } + } + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/GetAdminRequestApproval.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/GetAdminRequestApproval.json new file mode 100644 index 000000000000..0761786fde6a --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/GetAdminRequestApproval.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "adminRequestApprovalId": "marketplacetestthirdparty.md-test-third-party-2", + "publisherId": "marketplacetestthirdparty", + "api-version": "2020-12-01" + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "user@somedoamin.com", + "createdByType": "User", + "createdAt": "2021-02-01T10:23:17.6571572+02:00", + "lastModifiedBy": "user@somedoamin.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-02-01T10:23:17.6571572+02:00" + }, + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406/adminRequestApprovals/marketplacetestthirdparty.md-test-third-party-2", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "type": "/providers/Microsoft.Marketplace/privateStores/adminRequestApprovals", + "properties": { + "publisherId": "marketplacetestthirdparty", + "offerId": "marketplacetestthirdparty.md-test-third-party-2", + "displayName": "Offer display name", + "plans": [ + { + "planId": "testA", + "planDisplayName": "Plan display name A", + "requesters": [ + { + "user": "testUser3", + "date": "2021-02-01T11:42:12.9526511+02:00", + "justification": "Because I want to...." + } + ] + }, + { + "planId": "*", + "planDisplayName": "* (this means the user requested any plan, here you will get only *)", + "requesters": [ + { + "user": "testUser3", + "date": "2021-02-01T11:42:12.9526511+02:00", + "justification": "try me :)" + } + ] + } + ], + "adminAction": "Pending", + "approvedPlans": null, + "comment": null, + "administrator": null + } + } + } + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/GetApprovalRequestsList.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/GetApprovalRequestsList.json new file mode 100644 index 000000000000..1e6aedcc0d9c --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/GetApprovalRequestsList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "offerId": "marketplacetestthirdparty.md-test-third-party-2", + "api-version": "2020-12-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "systemData": { + "createdBy": "user@somedoamin.com", + "createdByType": "User", + "lastModifiedBy": "user@somedoamin.com", + "lastModifiedByType": "User", + "createdAt": "2021-02-01T10:23:17.6571572+02:00", + "lastModifiedAt": "2021-02-01T10:23:17.6571572+02:00" + }, + "id": "/providers/Microsoft.Marketplace/privateStores/9afd3c45-5230-4d58-9469-2cacc00bba68/requestApprovals/marketplacetestthirdparty.md-test-third-party-2", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "type": "Microsoft.Marketplace/privateStores/requestApprovals", + "properties": { + "offerId": "marketplacetestthirdparty.md-test-third-party-2", + "publisherId": "marketplacetestthirdparty", + "offerDisplayName": "Offer Display name", + "plansDetails": [ + { + "planId": "testPlanA", + "requestDate": "2021-02-01T10:23:17.6571572+02:00", + "justification": "Because I want to....", + "status": "Pending" + }, + { + "planId": "*", + "requestDate": "2021-02-01T10:23:17.6571572+02:00", + "justification": "try me :)", + "status": "Pending" + } + ], + "isClosed": false, + "messageCode": 0 + } + } + ] + } + } + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/GetRequestApproval.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/GetRequestApproval.json new file mode 100644 index 000000000000..a578673aeb14 --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/GetRequestApproval.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "requestApprovalId": "marketplacetestthirdparty.md-test-third-party-2", + "api-version": "2020-12-01" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406/requestApprovals/marketplacetestthirdparty.md-test-third-party-2", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "type": "Microsoft.Marketplace/privateStores/requestApprovals", + "systemData": { + "createdBy": "test@somedomain.com", + "createdByType": "User", + "createdAt": "2020-10-05T17:18:19.1234567Z", + "lastModifiedBy": "testuser@somedomail.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-10-05T17:18:19.1234567Z" + }, + "properties": { + "offerId": "marketplacetestthirdparty.md-test-third-party-2", + "publisherId": "marketplacetestthirdparty", + "offerDisplayName": "Offer display Name", + "plansDetails": [ + { + "planId": "testPlanA", + "justification": "Because I want to....", + "requestDate": "2020-10-05T17:18:19.1234567Z", + "status": "Pending" + }, + { + "planId": "testPlanB", + "justification": "Because I want to....", + "requestDate": "2020-10-05T17:18:19.1234567Z", + "status": "Pending" + } + ], + "isClosed": false, + "messageCode": 0 + } + } + } + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/NotificationsState.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/NotificationsState.json new file mode 100644 index 000000000000..aad1626c2451 --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/NotificationsState.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "api-version": "2020-12-01" + }, + "responses": { + "200": { + "body": { + "stopSellNotifications": [ + { + "offerId": "publisherId.legacyId", + "displayName": "Offer display name", + "isEntire": false, + "plans": [ + { + "planDisplayName": "test123", + "planId": "aaa" + } + ], + "messageCode": 10002, + "icon": "https://some-images.someDomail.com/image/apps.12345678-4321" + }, + { + "offerId": "publisherIdB.legacyIdB", + "displayName": "Offer display name B", + "isEntire": true, + "plans": null, + "messageCode": 10003, + "icon": "https://some-images.someDomail.com/image/apps.12345678-7654" + } + ], + "newNotifications": [ + { + "offerId": "publisherIdC.legacyIdC", + "displayName": "Offer display name C", + "isFuturePlansEnabled": false, + "plans": [ + { + "planDisplayName": "Display Name Test", + "planId": "plan-test" + } + ], + "messageCode": 10000, + "icon": "https://some-images.someDomail.com/image/apps.12345678-76545678" + } + ], + "approvalRequests": [ + { + "publisherId": "publisherId", + "offerId": "publisherId.legacyId", + "displayName": "Offer display name", + "plans": [ + { + "planDisplayName": "Plan Test display name", + "planId": "test-plan" + }, + { + "planDisplayName": "Plan Test display name B", + "planId": "test-planB" + } + ], + "icon": "https://some-images.someDomail.com/image/apps.12345678-09876567894321", + "messageCode": 0 + } + ] + } + } + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/QueryRequestApproval.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/QueryRequestApproval.json new file mode 100644 index 000000000000..72732f53e8d1 --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/QueryRequestApproval.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "requestApprovalId": "marketplacetestthirdparty.md-test-third-party-2", + "api-version": "2020-12-01", + "QueryRequestApprovalProperties": { + "parameters": { + "properties": { + "publisherId": "marketplacetestthirdparty", + "planIds": [ + "testPlanA", + "testPlanB", + "*" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "uniqueOfferId": "marketplacetestthirdparty.md-test-third-party-2", + "plansDetails": { + "*": { + "planId": "*", + "status": "None", + "requestDate": null, + "justification": null + }, + "byol": { + "planId": "testPlanA", + "status": "None", + "requestDate": null, + "justification": "" + }, + "hourly": { + "planId": "testPlanB", + "status": "ApprovedByAdmin", + "requestDate": null, + "justification": "" + } + }, + "etag": null, + "messageCode": 0 + } + } + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/UpdateAdminRequestApproval.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/UpdateAdminRequestApproval.json new file mode 100644 index 000000000000..ba075737e2ac --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/UpdateAdminRequestApproval.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "adminRequestApprovalId": "marketplacetestthirdparty.md-test-third-party-2", + "api-version": "2020-12-01", + "AdminRequestApprovalResource": { + "parameters": { + "properties": { + "publisherId": "marketplacetestthirdparty", + "adminAction": "Approved", + "approvedPlans": [ + "testAlan" + ], + "comment": "I'm ok with that", + "user": "" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406/adminRequestApprovals/marketplacetestthirdparty.md-test-third-party-2", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "type": "/providers/Microsoft.Marketplace/privateStores/adminRequestApprovals", + "systemData": { + "createdBy": "test@somedomain.com", + "createdByType": "User", + "createdAt": "2020-10-05T17:18:19.1234567Z", + "lastModifiedBy": "testuser@somedomail.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-10-05T17:18:19.1234567Z" + }, + "properties": { + "publisherId": "marketplacetestthirdparty", + "offerId": "marketplacetestthirdparty.md-test-third-party-2", + "displayName": "Offer display name", + "plans": null, + "adminAction": "Approved", + "approvedPlans": [ + "testPlanId", + "*" + ], + "comment": "I'm ok with that", + "administrator": "admin@someDomain.com" + } + } + } + } +} diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/WithdrawPlan.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/WithdrawPlan.json new file mode 100644 index 000000000000..51d92f9cd84c --- /dev/null +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-12-01/examples/WithdrawPlan.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "requestApprovalId": "marketplacetestthirdparty.md-test-third-party-2", + "api-version": "2020-12-01", + "WithdrawProperties": { + "parameters": { + "properties": { + "publisherId": "marketplacetestthirdparty", + "planId": "*" + } + } + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/marketplace/resource-manager/readme.azureresourceschema.md b/specification/marketplace/resource-manager/readme.azureresourceschema.md index 6c051e0c1b66..040e6ae795ef 100644 --- a/specification/marketplace/resource-manager/readme.azureresourceschema.md +++ b/specification/marketplace/resource-manager/readme.azureresourceschema.md @@ -6,6 +6,7 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: + - tag: schema-marketplace-2020-12-01 - tag: schema-marketplace-2020-01-01 - tag: schema-marketplace-2019-12-01 @@ -13,6 +14,17 @@ batch: Please also specify `--azureresourceschema-folder=`. +### Tag: schema-marketplace-2020-12-01 and azureresourceschema + +``` yaml $(tag) == 'schema-marketplace-2020-12-01' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.Marketplace/stable/2020-12-01/Marketplace.json + +``` + ### Tag: schema-marketplace-2020-01-01 and azureresourceschema ``` yaml $(tag) == 'schema-marketplace-2020-01-01' && $(azureresourceschema) diff --git a/specification/marketplace/resource-manager/readme.md b/specification/marketplace/resource-manager/readme.md index ee69458b990f..d22756204e5d 100644 --- a/specification/marketplace/resource-manager/readme.md +++ b/specification/marketplace/resource-manager/readme.md @@ -28,7 +28,27 @@ These are the global settings for the Marketplace API. openapi-type: arm tag: package-2020-01-01 ``` +### Composite packages +The following packages may be composed from multiple api-versions. + +### Tag: package-composite-v1 + +These settings apply only when `--tag=package-composite-v1` is specified on the command line. + +This section contains the "composite-v1" set of APIs, which is composed from a selection of api-versions that will remain backwards compatible with "v1" clients. + +APIs must only be added to this section when the API is publicly available in at least 1 production region and at least 1 generated client has been tested end-to-end. + +``` yaml $(tag) == 'package-composite-v1' +input-file: +- Microsoft.Marketplace/stable/2020-01-01/Marketplace.json +- Microsoft.Marketplace/stable/2020-12-01/Marketplace.json + +# Needed when there is more than one input file +override-info: + title: MarketplaceManagementClient +``` ### Tag: package-2019-12-01 @@ -58,8 +78,6 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-net - after_scripts: - - bundle install && rake arm:regen_all_profiles['azure_mgmt_marketplace'] - repo: azure-resource-manager-schemas after_scripts: - node sdkauto_afterscript.js marketplace/resource-manager