From 165b6c9512ff457535502d8ae5df11f00eb2cd96 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 28 Feb 2022 08:28:25 +0000 Subject: [PATCH] CodeGen from PR 17051 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.Marketplace to add version stable/2021-12-01 (#17051) * Adds base for updating Microsoft.Marketplace from version stable/2021-06-01 to version 2021-12-01 * Updates readme * Updates API version in new specs and examples * Adding new apis * Fix failed tests * revert parameters changes * missing object type * prettier * Fix review comments * fix semanticValidations test * fix to nextLink * changing fetchAllSubscriptions to post. Fix more comments * change to post and remove the pageable tag * revert changes in package-lock.json * Add x-ms-identifiers property --- .../2019-08-01/tenantDeploymentTemplate.json | 15 + schemas/2021-12-01/Microsoft.Marketplace.json | 758 ++++++++++++++++++ 2 files changed, 773 insertions(+) create mode 100644 schemas/2021-12-01/Microsoft.Marketplace.json diff --git a/schemas/2019-08-01/tenantDeploymentTemplate.json b/schemas/2019-08-01/tenantDeploymentTemplate.json index a2a2b3b5d4..635a2f1373 100644 --- a/schemas/2019-08-01/tenantDeploymentTemplate.json +++ b/schemas/2019-08-01/tenantDeploymentTemplate.json @@ -748,6 +748,21 @@ { "$ref": "https://schema.management.azure.com/schemas/2021-06-01/Microsoft.Marketplace.json#/tenant_resourceDefinitions/privateStores_requestApprovals" }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-12-01/Microsoft.Marketplace.json#/tenant_resourceDefinitions/privateStores" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-12-01/Microsoft.Marketplace.json#/tenant_resourceDefinitions/privateStores_adminRequestApprovals" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-12-01/Microsoft.Marketplace.json#/tenant_resourceDefinitions/privateStores_collections" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-12-01/Microsoft.Marketplace.json#/tenant_resourceDefinitions/privateStores_collections_offers" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-12-01/Microsoft.Marketplace.json#/tenant_resourceDefinitions/privateStores_requestApprovals" + }, { "$ref": "https://schema.management.azure.com/schemas/2019-01-01-preview/Microsoft.Portal.json#/tenant_resourceDefinitions/tenantConfigurations" }, diff --git a/schemas/2021-12-01/Microsoft.Marketplace.json b/schemas/2021-12-01/Microsoft.Marketplace.json new file mode 100644 index 0000000000..3ff094209f --- /dev/null +++ b/schemas/2021-12-01/Microsoft.Marketplace.json @@ -0,0 +1,758 @@ +{ + "id": "https://schema.management.azure.com/schemas/2021-12-01/Microsoft.Marketplace.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Marketplace", + "description": "Microsoft Marketplace Resource Types", + "resourceDefinitions": {}, + "tenant_resourceDefinitions": { + "privateStores": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-12-01" + ] + }, + "name": { + "type": "string", + "description": "The store ID - must use the tenant ID" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateStoreProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes the json payload on whether or not the private store is enabled for a given tenant" + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/privateStores_requestApprovals_childResource" + }, + { + "$ref": "#/definitions/privateStores_adminRequestApprovals_childResource" + }, + { + "$ref": "#/definitions/privateStores_collections_childResource" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Marketplace/privateStores" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Marketplace/privateStores" + }, + "privateStores_adminRequestApprovals": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-12-01" + ] + }, + "name": { + "type": "string", + "description": "The admin request approval ID to get create or update" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/AdminRequestApprovalProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Admin approval request resource properties" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Marketplace/privateStores/adminRequestApprovals" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Marketplace/privateStores/adminRequestApprovals" + }, + "privateStores_collections": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-12-01" + ] + }, + "name": { + "type": "string", + "description": "The collection ID" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/CollectionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The collection details" + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/privateStores_collections_offers_childResource" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Marketplace/privateStores/collections" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Marketplace/privateStores/collections" + }, + "privateStores_collections_offers": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-12-01" + ] + }, + "name": { + "type": "string", + "description": "The offer ID to update or delete" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/OfferProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Marketplace/privateStores/collections/offers" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Marketplace/privateStores/collections/offers" + }, + "privateStores_requestApprovals": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-12-01" + ] + }, + "name": { + "type": "string", + "description": "The request approval ID to get create or update" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RequestApprovalProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Approval request resource properties" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Marketplace/privateStores/requestApprovals" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Marketplace/privateStores/requestApprovals" + } + }, + "definitions": { + "AdminRequestApprovalProperties": { + "type": "object", + "properties": { + "adminAction": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Approved", + "Rejected" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets admin action." + }, + "administrator": { + "type": "string", + "description": "Gets or sets admin details" + }, + "approvedPlans": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets Approved plans ids, empty in case of rejected" + }, + "collectionIds": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets list of associated collection ids" + }, + "comment": { + "type": "string", + "description": "Gets or sets admin comment" + }, + "offerId": { + "type": "string", + "description": "Gets or sets offer Id" + }, + "publisherId": { + "type": "string", + "description": "Gets or sets publisher Id" + } + }, + "description": "Admin approval request resource properties" + }, + "CollectionProperties": { + "type": "object", + "properties": { + "allSubscriptions": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicating whether all subscriptions are selected (=true) or not (=false)." + }, + "claim": { + "type": "string", + "description": "Gets or sets the association with Commercial's Billing Account." + }, + "collectionName": { + "type": "string", + "description": "Gets or sets collection name." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicating whether the collection is enabled or disabled." + }, + "subscriptionsList": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets subscription ids list. Empty list indicates all subscriptions are selected, null indicates no update is done, explicit list indicates the explicit selected subscriptions. On insert, null is considered as bad request" + } + }, + "description": "The collection details" + }, + "NotificationsSettingsProperties": { + "type": "object", + "properties": { + "recipients": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Recipient" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets list of notified recipients for new requests" + }, + "sendToAllMarketplaceAdmins": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets whether to send email to all marketplace admins for new requests" + } + }, + "description": "Describes the json payload for notifications settings" + }, + "OfferProperties": { + "type": "object", + "properties": { + "eTag": { + "type": "string", + "description": "Identifier for purposes of race condition" + }, + "iconFileUris": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Icon File Uris" + }, + "plans": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Plan" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Offer plans" + }, + "specificPlanIdsLimitation": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Plan ids limitation for this offer" + }, + "updateSuppressedDueIdempotence": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicating whether the offer was not updated to db (true = not updated). If the allow list is identical to the existed one in db, the offer would not be updated." + } + } + }, + "Plan": { + "type": "object", + "properties": { + "accessibility": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Unknown", + "Public", + "PrivateTenantOnLevel", + "PrivateSubscriptionOnLevel" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Plan accessibility." + } + } + }, + "PlanDetails": { + "type": "object", + "properties": { + "justification": { + "type": "string", + "description": "Gets or sets user's justification for the plan's request" + }, + "planId": { + "type": "string", + "description": "Gets or sets Plan Id " + }, + "subscriptionId": { + "type": "string", + "description": "Gets or sets the subscription id that the user is requesting to add the plan to" + }, + "subscriptionName": { + "type": "string", + "description": "Gets or sets the subscription name that the user is requesting to add the plan to" + } + }, + "description": "Return plan with request details" + }, + "PrivateStoreProperties": { + "type": "object", + "properties": { + "availability": { + "oneOf": [ + { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicates private store availability." + }, + "branding": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets list of branding characteristics" + }, + "eTag": { + "type": "string", + "description": "Identifier for purposes of race condition" + }, + "isGov": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Is government" + }, + "notificationsSettings": { + "oneOf": [ + { + "$ref": "#/definitions/NotificationsSettingsProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes the json payload for notifications settings" + }, + "privateStoreName": { + "type": "string", + "description": "Private Store Name" + }, + "tenantId": { + "type": "string", + "description": "Tenant id" + } + }, + "description": "Describes the json payload on whether or not the private store is enabled for a given tenant" + }, + "privateStores_adminRequestApprovals_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-12-01" + ] + }, + "name": { + "type": "string", + "description": "The admin request approval ID to get create or update" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/AdminRequestApprovalProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Admin approval request resource properties" + }, + "type": { + "type": "string", + "enum": [ + "adminRequestApprovals" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Marketplace/privateStores/adminRequestApprovals" + }, + "privateStores_collections_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-12-01" + ] + }, + "name": { + "type": "string", + "description": "The collection ID" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/CollectionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The collection details" + }, + "type": { + "type": "string", + "enum": [ + "collections" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Marketplace/privateStores/collections" + }, + "privateStores_collections_offers_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-12-01" + ] + }, + "name": { + "type": "string", + "description": "The offer ID to update or delete" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/OfferProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "offers" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Marketplace/privateStores/collections/offers" + }, + "privateStores_requestApprovals_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-12-01" + ] + }, + "name": { + "type": "string", + "description": "The request approval ID to get create or update" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RequestApprovalProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Approval request resource properties" + }, + "type": { + "type": "string", + "enum": [ + "requestApprovals" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Marketplace/privateStores/requestApprovals" + }, + "Recipient": { + "type": "object", + "properties": { + "principalId": { + "type": "string", + "description": "Principal ID" + } + }, + "description": "Describes the json payload for a notified recipient for new requests" + }, + "RequestApprovalProperties": { + "type": "object", + "properties": { + "messageCode": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets the request approval message code" + }, + "offerId": { + "type": "string", + "description": "Gets or sets unique offer id." + }, + "plansDetails": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/PlanDetails" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets the plans details" + }, + "publisherId": { + "type": "string", + "description": "The offer's publisher id" + } + }, + "description": "Approval request resource properties" + } + } +} \ No newline at end of file