-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 21565 in Azure/azure-rest-api-specs
Dev reservations microsoft.capacity 2022 11 01 (#21565) * Adds base for updating Microsoft.Capacity from version stable/2022-03-01 to version 2022-11-01 * Updates readme * Updates API version in new specs and examples * 2022-02-16-privatepreview CalculateExchange and Exchange, 2022-06-02-privatepreview Reservation properties change * Add appliedScopeProperties to purchase and patch request. Add reviewDateTime to purchase patch request and get response for reservationOrder * Add reviewDateTime to Reservation Response * Update operationId to clean up doc heirarchy * Modified examples to address property changes. Added back quota.json. Add readonly to property definitions * Add 202 headers for Split, Merge, Patch. Add back AppliedScopes in reservation response to match request. * Add nextlink and totaItems, filter, skip, take to GetCatalogs * Fix lint error * Add back publisherId, offerId, planId for GetCatalog API * Revert "Update operationId to clean up doc heirarchy" This reverts commit 31826f8e7ee40e30f099d5d95bf8b5fccf728819. * Add back expiryDate and purchaseDate Add back expiryDate and purchaseDate for backward compatibility * Revert string to enum change * Remove readOnly for existing definition to fix breaking change * change expand to $expand * Address comments from ARMReview * Revert "Address comments from ARMReview" This reverts commit cdeda23a6a666d79991b369bfc0aea31edd9d54e. * Address comments for arm review * Added x-ms-pageable for catalog api * Fix spellcheck unknown words * address comments and legacy lint errors and warnings * add location for return. address some lint warnings. use proxyResource * address legacy lint error and warnings * Add descriptions for objects and fix typo * fix spell error and missing description * Fix comment * Add back long running operations true to available scopes * Add more description for appliedScopeProperties Co-authored-by: chchen3 <[email protected]>
- Loading branch information
Showing
2 changed files
with
283 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,280 @@ | ||
{ | ||
"id": "https://schema.management.azure.com/schemas/2022-11-01/Microsoft.Capacity.json#", | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Microsoft.Capacity", | ||
"description": "Microsoft Capacity Resource Types", | ||
"resourceDefinitions": {}, | ||
"tenant_resourceDefinitions": { | ||
"reservationOrders": { | ||
"type": "object", | ||
"properties": { | ||
"apiVersion": { | ||
"type": "string", | ||
"enum": [ | ||
"2022-11-01" | ||
] | ||
}, | ||
"location": { | ||
"type": "string", | ||
"description": "The Azure region where the reserved resource lives." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "Order Id of the reservation" | ||
}, | ||
"properties": { | ||
"oneOf": [ | ||
{ | ||
"$ref": "#/definitions/PurchaseRequestProperties" | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Properties of reservation purchase request" | ||
}, | ||
"sku": { | ||
"oneOf": [ | ||
{ | ||
"$ref": "#/definitions/SkuName" | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "The name of sku" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"Microsoft.Capacity/reservationOrders" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"apiVersion", | ||
"name", | ||
"properties", | ||
"type" | ||
], | ||
"description": "Microsoft.Capacity/reservationOrders" | ||
} | ||
}, | ||
"definitions": { | ||
"AppliedScopeProperties": { | ||
"type": "object", | ||
"properties": { | ||
"displayName": { | ||
"type": "string", | ||
"description": "Display name" | ||
}, | ||
"managementGroupId": { | ||
"type": "string", | ||
"description": "Fully-qualified identifier of the management group where the benefit must be applied." | ||
}, | ||
"resourceGroupId": { | ||
"type": "string", | ||
"description": "Fully-qualified identifier of the resource group." | ||
}, | ||
"subscriptionId": { | ||
"type": "string", | ||
"description": "Fully-qualified identifier of the subscription." | ||
}, | ||
"tenantId": { | ||
"type": "string", | ||
"description": "Tenant ID where the savings plan should apply benefit." | ||
} | ||
}, | ||
"description": "Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup" | ||
}, | ||
"PurchaseRequestProperties": { | ||
"type": "object", | ||
"properties": { | ||
"appliedScopeProperties": { | ||
"oneOf": [ | ||
{ | ||
"$ref": "#/definitions/AppliedScopeProperties" | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup" | ||
}, | ||
"appliedScopes": { | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared." | ||
}, | ||
"appliedScopeType": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"enum": [ | ||
"Single", | ||
"Shared", | ||
"ManagementGroup" | ||
] | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
] | ||
}, | ||
"billingPlan": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"enum": [ | ||
"Upfront", | ||
"Monthly" | ||
] | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
] | ||
}, | ||
"billingScopeId": { | ||
"type": "string", | ||
"description": "Subscription that will be charged for purchasing reservation or savings plan" | ||
}, | ||
"displayName": { | ||
"type": "string", | ||
"description": "Friendly name of the reservation" | ||
}, | ||
"quantity": { | ||
"oneOf": [ | ||
{ | ||
"type": "integer" | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Quantity of the skus that are part of the reservation. Must be greater than zero." | ||
}, | ||
"renew": { | ||
"oneOf": [ | ||
{ | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Setting this to true will automatically purchase a new reservation on the expiration date time." | ||
}, | ||
"reservedResourceProperties": { | ||
"oneOf": [ | ||
{ | ||
"$ref": "#/definitions/PurchaseRequestPropertiesReservedResourceProperties" | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Properties specific to each reserved resource type. Not required if not applicable." | ||
}, | ||
"reservedResourceType": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"enum": [ | ||
"VirtualMachines", | ||
"SqlDatabases", | ||
"SuseLinux", | ||
"CosmosDb", | ||
"RedHat", | ||
"SqlDataWarehouse", | ||
"VMwareCloudSimple", | ||
"RedHatOsa", | ||
"Databricks", | ||
"AppService", | ||
"ManagedDisk", | ||
"BlockBlob", | ||
"RedisCache", | ||
"AzureDataExplorer", | ||
"MySql", | ||
"MariaDb", | ||
"PostgreSql", | ||
"DedicatedHost", | ||
"SapHana", | ||
"SqlAzureHybridBenefit", | ||
"AVS", | ||
"DataFactory", | ||
"NetAppStorage", | ||
"AzureFiles", | ||
"SqlEdge", | ||
"VirtualMachineSoftware" | ||
] | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
] | ||
}, | ||
"reviewDateTime": { | ||
"type": "string", | ||
"format": "date-time", | ||
"description": "This is the date-time when the Azure hybrid benefit needs to be reviewed." | ||
}, | ||
"term": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"enum": [ | ||
"P1Y", | ||
"P3Y", | ||
"P5Y" | ||
] | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
] | ||
} | ||
}, | ||
"description": "Properties of reservation purchase request" | ||
}, | ||
"PurchaseRequestPropertiesReservedResourceProperties": { | ||
"type": "object", | ||
"properties": { | ||
"instanceFlexibility": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"enum": [ | ||
"On", | ||
"Off" | ||
] | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
] | ||
} | ||
}, | ||
"description": "Properties specific to each reserved resource type. Not required if not applicable." | ||
}, | ||
"SkuName": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
} | ||
}, | ||
"description": "The name of sku" | ||
} | ||
} | ||
} |