The source for REST API specifications for Microsoft Azure.
Перейти к файлу
Min Jae Kim 865db29636
[Hub Generated] Review request for Microsoft.PolicyInsights to add version stable/2023-03-01 (#22789)
* Adds base for updating Microsoft.PolicyInsights from version stable/2022-03-01 to version 2023-03-01

* Updates readme

* Updates API version in new specs and examples

* Add new API version (2023-03-01) to Microsoft.PolicyInsights

* Fixed UNRESOLVABLE_REFERENCE issue

* Fixed UNRESOLVABLE_REFERENCE issue

* Fixed UNRESOLVABLE_REFERENCE issue

* Fixed MissingTypeObject issue

* Added reference to PolicyRestrictions_CheckAtSubscriptionScopeIncludeAuditEffect example and set IncludeAuditEffect default to false

* Added PolicyRestrictions_CheckAtResourceGroupScopeIncludeAuditEffect

* update readme Tag: package-2023-03

* Fixed error in PolicyRestrictions_CheckAtSubscriptionScope.json

* Fixed error in PolicyRestrictions_CheckAtResourceGroupScope.json

* Update readme.go.md

* updated examples for checkPolicyRestrictions

* Added tag for java

* Update specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2023-03-01/checkPolicyRestrictions.json

Co-authored-by: Chris Eggert <eggertc@gmail.com>

* Replaced policyEffect type from enum to string and added doc url to description.

* Revert readme.go.md

* Update checkPolicyRestrictions.json

* Update checkPolicyRestrictions.json

* Update checkPolicyRestrictions.json

* undo last commit

---------

Co-authored-by: Minjae Kim <minjaekim@microsoft.com>
Co-authored-by: Chris Eggert <eggertc@gmail.com>
2023-04-14 14:35:16 +08:00
.azure-pipelines Add Supporting Windows Docker Container Hosted API Services (#22587) 2023-03-16 11:06:07 -07:00
.github Update stale links (#23548) 2023-04-13 15:24:07 -07:00
.vscode chore: Restore .vscode config files (#12605) 2021-02-22 14:07:10 +08:00
arm-compute Update Image aliases with new versioned aliases (#23261) 2023-03-31 10:22:38 +08:00
dev/cognitiveservices/data-plane/Language [Language Text] Delete Dynamic Classification from v2022-10-01-preview (#23080) 2023-03-17 13:05:54 -07:00
documentation Update typespec-structure-guidelines.md (#23527) 2023-04-12 16:53:13 -07:00
profile Azurestack-2020-09-01-hybrid profile bug fix - updating Keyvault dataplane api version (#16709) 2021-11-17 07:11:41 -08:00
profiles Dev kubernetesconfiguration microsoft.kubernetes configuration 2021 09 01 (#15593) 2021-09-18 10:54:40 +08:00
scripts Add Supporting Windows Docker Container Hosted API Services (#22587) 2023-03-16 11:06:07 -07:00
specification [Hub Generated] Review request for Microsoft.PolicyInsights to add version stable/2023-03-01 (#22789) 2023-04-14 14:35:16 +08:00
.editorconfig chore: Suppress Conditon in April Network WAF (#6105) 2019-05-31 08:53:25 -07:00
.gitattributes chore: Add initial .gitattributes for line endings (#4746) 2019-04-06 07:51:33 -07:00
.gitignore Delete GitHub Action (#23004) 2023-03-10 16:04:00 +08:00
.markdownlint.json Add markdownlint config (#6408) 2019-07-16 14:33:40 -07:00
.prettierrc.json fix prettier (#19221) 2022-05-29 11:15:39 +08:00
CODEOWNERS Update Codeowners for Language/ SchemaRegistry (#23467) 2023-04-10 10:29:36 -07:00
CONTRIBUTING.md Cadl repo structure guidelines (#20893) 2022-10-25 09:02:54 -07:00
LICENSE Adding semantic and model validator to CI (#910) 2017-02-06 12:37:59 -08:00
README.md Update stale links (#23548) 2023-04-13 15:24:07 -07:00
SECURITY.md Microsoft mandatory file (#19127) 2022-05-19 16:50:59 +08:00
azure-pipelines.yml Update azure-pipelines.yml to use ubuntu-20.04 (#16485) 2021-10-21 16:35:22 +08:00
cSpell.json Adding Definition for Microsoft Translation service (#23231) 2023-04-03 14:09:59 -07:00
custom-words.txt Review request for Microsoft.ContainerInstance to add version stable/2023-05-01 (#23485) 2023-04-13 11:33:04 +08:00
package-lock.json Convert sample project to TypeSpec (#23168) 2023-04-04 16:57:01 -07:00
package.json Convert sample project to TypeSpec (#23168) 2023-04-04 16:57:01 -07:00
specificationRepositoryConfiguration.json Update emitter name in sdk auto config (#23312) 2023-03-28 10:49:18 +08:00
tsconfig.json Bump dependencies (#14987) 2021-06-30 12:36:35 +08:00

README.md

Azure REST API Specifications

Description

This repository is the canonical source for REST API specifications for Microsoft Azure.

Getting started

If you're a Microsoft employee looking for information about all of the repositories and steps for Azure SDK Libraries Releases, go to the Azure SDK - Internal Wiki. To get access to the wiki, you need to request access to the Azure SDK Release Partners security group. This is a MyAccess group and requests to join will need to be approved by your manager.

External Contributors can read Getting Started with OpenAPI Specifications.

Terminology

  • Offerings, Skus, and Features - These are distinct entities represented in Eco Manager and Service Tree. While the Offering/Sku/Feature entities and hierarchy represent the externally marketed product, service/components entities in service tree represent corresponding engineering entities that together power these external products. Refer to Product Taxonomy for details.

  • Resource Provider - When a service onboards new functionality onto ARM, it is required to complete Resource Provider Registration. For existing Resource Provider to Service Mapping, refer to Match resource provider to service*

Directory Structure

The structure of the directory should strictly follow these rules:

  1. Profile: The profile folder contains the profiles' definition files. The profile definition targets for hybrid applications that could run on Azure Stack general availability versions and Azure Cloud.

  2. Specification: This folder is the root folder for all Specs (Management Plane and Data Plane) related documents.

  3. {RP-Name} Folders - each resource provider should have at least one separate folder.

    If multiple folders are required? It depends on the following considerations:

    • An RP folder leads to a separate SDK package. Is it expected to have separate SDK packages for different service/component entities?
    • Service/component entities in one folder share the same versioning cycle. Can service/component entities in one folder share the same version label, and upgrade together in the future?
    • Specification files and AutoRest configuration files in one RP folder are better to refer to files in the same RP folder. Note: Entity type definition that needs to be referred cross RP folders should be placed and maintained under the folder common-types.
    • For more considerations, you may consult the reviewer in API design review. To initiate the review, Please submit an Azure SDK intake questionnaire.

    RP folders may contain resource manager or data plane TypeSpec "specs". TypeSpec is a language for describing cloud service APIs and generating other API description languages, client and service code, documentation, and other assets. Explore more by visiting the tutorial in the TypeSpec repo: TypeSpec tutorial. You can also ask questions for providing feedback in the internal Teams channel TypeSpec Discussion.

    For more information about the structure of TypeSpec files in the repo see TypeSpec repo structure.

  4. 'resource-manager' and 'data-plane' Folders: the RPs can put specs in one of two categories: resource-manager (for ARM resources) and data-plane (for everything else). There should be an AutoRest configuration file (readme.md) for the RP inside both of these folders when present.

  5. 'Microsoft.{ARMNamespace}' Folders: the folders are only required under the 'resource-manager' folder, which means only management-plane API specs require to have ARM Namespace in the file path. For ARM Namespace and ARM onboarding, please refer to the ARM wiki of RP Onboarding.

  6. 'preview' and 'stable' Folders: This maps to the service/component lifecycle stage: Preview and GA. For example, if a service is in Preview stage, no matter Private Preview or Public Preview, the API specs of the service should be placed in the preview folder. If the service is GAed, but a component is in preview, then the API version contains the preview component entity should be placed in the preview folder as well. The stable folder should contain API versions of a GAed service and all GAed components.

    How's the Azure Breaking Change Policy apply to API specs in preview and stable folders? In fact, it is more relevant to if the repo is public or private.

    • API specs with components or resource types in Private Preview, or Limited Public Preview (behind AFEC or managing visible subscriptions) are better to launch PR review in the private repository, aka., azure-rest-api-specs-pr. And these API specs are free of breaking changes.

    • On the other hand, everything public in the main branch of the public repository, aka., azure-rest-api-specs, no matter in the preview folder or in the stable folder, should be treated as contract with Azure customers, must follow Azure Breaking Changes Policy.

  7. API Versions Folders: this folder is the direct child of the preview or stable folder. This folder contains the REST API Specs, and the examples folder.

  8. 'examples' Folders: the example folder will contain the x-ms-examples files. it will reside under the APIs or Resources' version folders as different APIs or Resource types version can have different examples.

Note: some general guidance for folder names, and file names under specification:

  • Folder names should be singular (ie, 'profile' not 'profiles' ) -- this removes ambiguity for some non-english speakers.
  • Generic folder names should be lower-case
  • Namespace folders can be PascalCased (ie, "KeyVault")
  • Files are whatever case you think is good for your soul.

The structure should appear like so:

.
\---specification
|    +---automation
|    |   \---resource-manager
|    |       +---Microsoft.Automation
|    |       |   \---stable
|    |       |       \---2015-10-31
|    |       |           \---examples
|    |       \---readme.md
|    +---batch
|    |   +---data-plane
|    |   |   +---stable
|    |   |   |   +---2016-07-01
|    |   |   |   |   \---examples
|    |   |   |   \---2017-01-01
|    |   |   |       \---examples
|    |   |   +---preview
|    |   |   |   \---2017-05-01-preview
|    |   |   |       \---examples
|    |   |   \---readme.md
|    |   \---resource-manager
|    |       +---Microsoft.Batch
|    |       |   \---stable
|    |       |       +---2015-12-01
|    |       |       |   \---examples
|    |       |       +---2017-01-01
|    |       |       |   \---examples
|    |       |       \---2017-05-01
|    |       |           \---examples
|    |       \---readme.md
|    \---playfab
|        +---Playfab
|        |   \---tspconfig.yaml
|        |   \---main.tsp
|        \--resource-manager
|            +---Microsoft.Playfab
|            |   +---stable
|            |   |   \---2017-02-27-preview
|            |   |       \---examples
|            |   \---preview
|            |       \---2017-04-24-preview
|            |           \---examples
|            \---readme.md

Folder Structure for Service Group

If you are working on API specification of a service group, then you may choose to build a folder structure as below. This folder structure brings more flexibility in multiple service teams collaboration, especially supporting:

  • To collect API definition of multiple components/services with different versioning cycle in one rp folder
  • To share some common entity types among services or components under the same rp folder.

In the following folder structure sample, there is only 'resource-manager' folder. There could be a similar folder structure under 'data-plane' folder, while the sub-component/sub-service folders may not be the same.

Ensure to consult API Spec Review for the first time creating the folder structure or if you want to change current folder structure.

.
\---specification
|    +---compute
|    |   \---resource-manager
|    |      +---Microsoft.Compute
|    |      |     +---compute
|    |      |     |   \---stable
|    |      |     |        \---2021-11-01
|    |      |     |              +---compute.json
|    |      |     |              +---runCommands.json
|    |      |     |              \---examples
|    |      |     +---sku
|    |      |     |   \---stable
|    |      |     |         \---2021-07-01
|    |      |     |              +---skus.json
|    |      |     |              \---examples
|    |      |     +---disk
|    |      |     |  \---stable
|    |      |     |          \---2021-12-01
|    |      |     |              +---disk.json
|    |      |     |              \---examples
|    |      |     +---gallery
|    |      |     |   \---stable
|    |      |     |         \---2021-10-01
|    |      |     |              +---gallery.json
|    |      |     |              \---examples
|    |      |     +---sharedgallery
|    |      |     |   \---stable
|    |      |     |        \---2021-07-01
|    |      |     |            +---sharedGallery.json
|    |      |     |            +---communityGallery.json
|    |      |     |            \---examples
|    |      |     +---cloudService
|    |      |     |   \---stable
|    |      |     |        \---2021-03-01
|    |      |     |            +---cloudService.json
|    |      |     |            \---examples
|    |      |     \---common-types
|    |      |         \---v1
|    |      |              \---entity-types.json
|    |      |
|    |       \---readme.md

If the AutoRest configuration file (aka. the readme.md) is placed out of sub-service/sub-component folders, then there will be only one SDK package that holds all sub-services/sub-components. If the file is placed in each sub-service/sub-component folder, then there will be separate SDK packages of each sub-service/sub-component. Ensure to consult Azure SDK ArchBoard for SDK packaging strategy when consolidating AutoRest configuration file for SDK generation.

common-types

Specification files and AutoRest configuration files in one RP folder are better to refer to files in the same RP folder. Entity type definition that can be shared cross resource providers or services should to be placed and maintained either under the folder common-types under specification, or under common-types folder of service group folder structure. The former supports the entity type sharing cross rp folders, while the latter supports the enitity type sharing cross components or services under the same rp folder.

. Refer to Resource-Management common types for example.

Next steps

The next step in the process after a spec is completed is to generate SDKs and API reference documentation. If you're a Microsoft employee, go to the Azure SDK - Internal Wiki for more information.

External Contributors can read Getting Started with OpenAPI Specifications.


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.