-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating Settings.json spec under preview (#21723)
* Creating Settings.json spec under preview * Adding settings.json into readme.md * Prettier fix * Review comments
- Loading branch information
Showing
3 changed files
with
628 additions
and
0 deletions.
There are no files selected for viewing
313 changes: 313 additions & 0 deletions
313
...gement/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/settings.json
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,313 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "CostManagementClient", | ||
"version": "2022-10-01-preview" | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"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" | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/{scope}/providers/Microsoft.CostManagement/settings": { | ||
"get": { | ||
"tags": [ | ||
"Settings" | ||
], | ||
"operationId": "Settings_List", | ||
"description": "List all cost management settings in the requested scope.", | ||
"externalDocs": { | ||
"url": "https://docs.microsoft.com/rest/api/cost-management/" | ||
}, | ||
"x-ms-examples": { | ||
"SettingsList": { | ||
"$ref": "./examples/settingsList.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/scopeSettingParameter" | ||
}, | ||
{ | ||
"$ref": "common-types.json#/parameters/apiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK. The request has succeeded.", | ||
"schema": { | ||
"$ref": "#/definitions/SettingsListResult" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "common-types.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/{scope}/providers/Microsoft.CostManagement/settings/{type}": { | ||
"put": { | ||
"tags": [ | ||
"Settings" | ||
], | ||
"operationId": "Settings_CreateOrUpdateByScope", | ||
"description": "Create or update a setting within the given scope.", | ||
"x-ms-examples": { | ||
"CreateOrUpdateSettingByScope": { | ||
"$ref": "./examples/settings-createOrUpdate.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/scopeSettingParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/settingTypeParameter" | ||
}, | ||
{ | ||
"$ref": "common-types.json#/parameters/apiVersionParameter" | ||
}, | ||
{ | ||
"name": "setting", | ||
"description": "Setting to be created or updated.", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/Setting" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"description": "Setting Created.", | ||
"schema": { | ||
"$ref": "#/definitions/Setting" | ||
} | ||
}, | ||
"200": { | ||
"description": "Setting Updated.", | ||
"schema": { | ||
"$ref": "#/definitions/Setting" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "common-types.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"get": { | ||
"tags": [ | ||
"Settings" | ||
], | ||
"operationId": "Settings_GetByScope", | ||
"description": "Get the setting from the given scope by name.", | ||
"externalDocs": { | ||
"url": "https://docs.microsoft.com/rest/api/cost-management/" | ||
}, | ||
"x-ms-examples": { | ||
"SettingByScope": { | ||
"$ref": "./examples/setting-get.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/scopeSettingParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/settingTypeParameter" | ||
}, | ||
{ | ||
"$ref": "common-types.json#/parameters/apiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK. The request has succeeded.", | ||
"schema": { | ||
"$ref": "#/definitions/Setting" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "common-types.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"tags": [ | ||
"Settings" | ||
], | ||
"operationId": "Settings_DeleteByScope", | ||
"description": "Delete a setting within the given scope.", | ||
"externalDocs": { | ||
"url": "https://docs.microsoft.com/rest/api/cost-management/" | ||
}, | ||
"x-ms-examples": { | ||
"SettingDeleteByScope": { | ||
"$ref": "./examples/setting-delete.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/scopeSettingParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/settingTypeParameter" | ||
}, | ||
{ | ||
"$ref": "common-types.json#/parameters/apiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK. The request has succeeded." | ||
}, | ||
"204": { | ||
"description": "OK. The request has succeeded." | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "common-types.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"Setting": { | ||
"description": "Setting definition.", | ||
"discriminator": "kind", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "common-types.json#/definitions/ProxyResource" | ||
} | ||
], | ||
"properties": { | ||
"kind": { | ||
"type": "string", | ||
"description": "Specifies the kind of settings.", | ||
"enum": [ | ||
"taginheritance" | ||
], | ||
"x-ms-enum": { | ||
"name": "SettingsKind", | ||
"modelAsString": true | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"kind" | ||
] | ||
}, | ||
"TagInheritanceSetting": { | ||
"description": "Tag Inheritance Setting definition.", | ||
"type": "object", | ||
"x-ms-discriminator-value": "taginheritance", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/Setting" | ||
} | ||
], | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/TagInheritanceProperties", | ||
"title": "Tag Inheritance properties" | ||
} | ||
} | ||
}, | ||
"SettingsListResult": { | ||
"description": "Setting list result. It contains a list of settings.", | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"description": "The list of settings.", | ||
"type": "array", | ||
"readOnly": true, | ||
"items": { | ||
"$ref": "#/definitions/Setting" | ||
} | ||
} | ||
} | ||
}, | ||
"TagInheritanceProperties": { | ||
"type": "object", | ||
"description": "The properties of the tag inheritance setting.", | ||
"required": [ | ||
"preferContainerTags" | ||
], | ||
"properties": { | ||
"preferContainerTags": { | ||
"description": "Prefer Container tags to override container tags with resource tags in case of conflicts.", | ||
"type": "boolean" | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
"scopeSettingParameter": { | ||
"name": "scope", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The scope associated with setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"settingTypeParameter": { | ||
"name": "type", | ||
"in": "path", | ||
"description": "Setting type.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method", | ||
"enum": [ | ||
"taginheritance" | ||
], | ||
"x-ms-enum": { | ||
"name": "SettingType", | ||
"modelAsString": true, | ||
"values": [ | ||
{ | ||
"value": "taginheritance", | ||
"description": "Tag Inheritance Settings is to inherit user defined tags from container(subscription/resource group) to its respective resources.", | ||
"name": "TagInheritance" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.