|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "info": { |
| 4 | + "title": "CostManagementClient", |
| 5 | + "version": "2022-10-01-preview" |
| 6 | + }, |
| 7 | + "host": "management.azure.com", |
| 8 | + "schemes": [ |
| 9 | + "https" |
| 10 | + ], |
| 11 | + "consumes": [ |
| 12 | + "application/json" |
| 13 | + ], |
| 14 | + "produces": [ |
| 15 | + "application/json" |
| 16 | + ], |
| 17 | + "security": [ |
| 18 | + { |
| 19 | + "azure_auth": [ |
| 20 | + "user_impersonation" |
| 21 | + ] |
| 22 | + } |
| 23 | + ], |
| 24 | + "securityDefinitions": { |
| 25 | + "azure_auth": { |
| 26 | + "type": "oauth2", |
| 27 | + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", |
| 28 | + "flow": "implicit", |
| 29 | + "description": "Azure Active Directory OAuth2 Flow.", |
| 30 | + "scopes": { |
| 31 | + "user_impersonation": "impersonate your user account" |
| 32 | + } |
| 33 | + } |
| 34 | + }, |
| 35 | + "paths": { |
| 36 | + "/{scope}/providers/Microsoft.CostManagement/settings": { |
| 37 | + "get": { |
| 38 | + "tags": [ |
| 39 | + "Settings" |
| 40 | + ], |
| 41 | + "operationId": "Settings_List", |
| 42 | + "description": "List all cost management settings in the requested scope.", |
| 43 | + "externalDocs": { |
| 44 | + "url": "https://docs.microsoft.com/rest/api/cost-management/" |
| 45 | + }, |
| 46 | + "x-ms-examples": { |
| 47 | + "SettingsList": { |
| 48 | + "$ref": "./examples/settingsList.json" |
| 49 | + } |
| 50 | + }, |
| 51 | + "parameters": [ |
| 52 | + { |
| 53 | + "$ref": "#/parameters/scopeSettingParameter" |
| 54 | + }, |
| 55 | + { |
| 56 | + "$ref": "common-types.json#/parameters/apiVersionParameter" |
| 57 | + } |
| 58 | + ], |
| 59 | + "responses": { |
| 60 | + "200": { |
| 61 | + "description": "OK. The request has succeeded.", |
| 62 | + "schema": { |
| 63 | + "$ref": "#/definitions/SettingsListResult" |
| 64 | + } |
| 65 | + }, |
| 66 | + "default": { |
| 67 | + "description": "Error response describing why the operation failed.", |
| 68 | + "schema": { |
| 69 | + "$ref": "common-types.json#/definitions/ErrorResponse" |
| 70 | + } |
| 71 | + } |
| 72 | + } |
| 73 | + } |
| 74 | + }, |
| 75 | + "/{scope}/providers/Microsoft.CostManagement/settings/{type}": { |
| 76 | + "put": { |
| 77 | + "tags": [ |
| 78 | + "Settings" |
| 79 | + ], |
| 80 | + "operationId": "Settings_CreateOrUpdateByScope", |
| 81 | + "description": "Create or update a setting within the given scope.", |
| 82 | + "x-ms-examples": { |
| 83 | + "CreateOrUpdateSettingByScope": { |
| 84 | + "$ref": "./examples/settings-createOrUpdate.json" |
| 85 | + } |
| 86 | + }, |
| 87 | + "parameters": [ |
| 88 | + { |
| 89 | + "$ref": "#/parameters/scopeSettingParameter" |
| 90 | + }, |
| 91 | + { |
| 92 | + "$ref": "#/parameters/settingTypeParameter" |
| 93 | + }, |
| 94 | + { |
| 95 | + "$ref": "common-types.json#/parameters/apiVersionParameter" |
| 96 | + }, |
| 97 | + { |
| 98 | + "name": "setting", |
| 99 | + "description": "Setting to be created or updated.", |
| 100 | + "in": "body", |
| 101 | + "required": true, |
| 102 | + "schema": { |
| 103 | + "$ref": "#/definitions/Setting" |
| 104 | + } |
| 105 | + } |
| 106 | + ], |
| 107 | + "responses": { |
| 108 | + "201": { |
| 109 | + "description": "Setting Created.", |
| 110 | + "schema": { |
| 111 | + "$ref": "#/definitions/Setting" |
| 112 | + } |
| 113 | + }, |
| 114 | + "200": { |
| 115 | + "description": "Setting Updated.", |
| 116 | + "schema": { |
| 117 | + "$ref": "#/definitions/Setting" |
| 118 | + } |
| 119 | + }, |
| 120 | + "default": { |
| 121 | + "description": "Error response describing why the operation failed.", |
| 122 | + "schema": { |
| 123 | + "$ref": "common-types.json#/definitions/ErrorResponse" |
| 124 | + } |
| 125 | + } |
| 126 | + } |
| 127 | + }, |
| 128 | + "get": { |
| 129 | + "tags": [ |
| 130 | + "Settings" |
| 131 | + ], |
| 132 | + "operationId": "Settings_GetByScope", |
| 133 | + "description": "Get the setting from the given scope by name.", |
| 134 | + "externalDocs": { |
| 135 | + "url": "https://docs.microsoft.com/rest/api/cost-management/" |
| 136 | + }, |
| 137 | + "x-ms-examples": { |
| 138 | + "SettingByScope": { |
| 139 | + "$ref": "./examples/setting-get.json" |
| 140 | + } |
| 141 | + }, |
| 142 | + "parameters": [ |
| 143 | + { |
| 144 | + "$ref": "#/parameters/scopeSettingParameter" |
| 145 | + }, |
| 146 | + { |
| 147 | + "$ref": "#/parameters/settingTypeParameter" |
| 148 | + }, |
| 149 | + { |
| 150 | + "$ref": "common-types.json#/parameters/apiVersionParameter" |
| 151 | + } |
| 152 | + ], |
| 153 | + "responses": { |
| 154 | + "200": { |
| 155 | + "description": "OK. The request has succeeded.", |
| 156 | + "schema": { |
| 157 | + "$ref": "#/definitions/Setting" |
| 158 | + } |
| 159 | + }, |
| 160 | + "default": { |
| 161 | + "description": "Error response describing why the operation failed.", |
| 162 | + "schema": { |
| 163 | + "$ref": "common-types.json#/definitions/ErrorResponse" |
| 164 | + } |
| 165 | + } |
| 166 | + } |
| 167 | + }, |
| 168 | + "delete": { |
| 169 | + "tags": [ |
| 170 | + "Settings" |
| 171 | + ], |
| 172 | + "operationId": "Settings_DeleteByScope", |
| 173 | + "description": "Delete a setting within the given scope.", |
| 174 | + "externalDocs": { |
| 175 | + "url": "https://docs.microsoft.com/rest/api/cost-management/" |
| 176 | + }, |
| 177 | + "x-ms-examples": { |
| 178 | + "SettingDeleteByScope": { |
| 179 | + "$ref": "./examples/setting-delete.json" |
| 180 | + } |
| 181 | + }, |
| 182 | + "parameters": [ |
| 183 | + { |
| 184 | + "$ref": "#/parameters/scopeSettingParameter" |
| 185 | + }, |
| 186 | + { |
| 187 | + "$ref": "#/parameters/settingTypeParameter" |
| 188 | + }, |
| 189 | + { |
| 190 | + "$ref": "common-types.json#/parameters/apiVersionParameter" |
| 191 | + } |
| 192 | + ], |
| 193 | + "responses": { |
| 194 | + "200": { |
| 195 | + "description": "OK. The request has succeeded." |
| 196 | + }, |
| 197 | + "204": { |
| 198 | + "description": "OK. The request has succeeded." |
| 199 | + }, |
| 200 | + "default": { |
| 201 | + "description": "Error response describing why the operation failed.", |
| 202 | + "schema": { |
| 203 | + "$ref": "common-types.json#/definitions/ErrorResponse" |
| 204 | + } |
| 205 | + } |
| 206 | + } |
| 207 | + } |
| 208 | + } |
| 209 | + }, |
| 210 | + "definitions": { |
| 211 | + "Setting": { |
| 212 | + "description": "Setting definition.", |
| 213 | + "discriminator": "kind", |
| 214 | + "type": "object", |
| 215 | + "allOf": [ |
| 216 | + { |
| 217 | + "$ref": "common-types.json#/definitions/ProxyResource" |
| 218 | + } |
| 219 | + ], |
| 220 | + "properties": { |
| 221 | + "kind": { |
| 222 | + "type": "string", |
| 223 | + "description": "Specifies the kind of settings.", |
| 224 | + "enum": [ |
| 225 | + "taginheritance" |
| 226 | + ], |
| 227 | + "x-ms-enum": { |
| 228 | + "name": "SettingsKind", |
| 229 | + "modelAsString": true |
| 230 | + } |
| 231 | + } |
| 232 | + }, |
| 233 | + "required": [ |
| 234 | + "kind" |
| 235 | + ] |
| 236 | + }, |
| 237 | + "TagInheritanceSetting": { |
| 238 | + "description": "Tag Inheritance Setting definition.", |
| 239 | + "type": "object", |
| 240 | + "x-ms-discriminator-value": "taginheritance", |
| 241 | + "allOf": [ |
| 242 | + { |
| 243 | + "$ref": "#/definitions/Setting" |
| 244 | + } |
| 245 | + ], |
| 246 | + "properties": { |
| 247 | + "properties": { |
| 248 | + "$ref": "#/definitions/TagInheritanceProperties", |
| 249 | + "title": "Tag Inheritance properties" |
| 250 | + } |
| 251 | + } |
| 252 | + }, |
| 253 | + "SettingsListResult": { |
| 254 | + "description": "Setting list result. It contains a list of settings.", |
| 255 | + "type": "object", |
| 256 | + "properties": { |
| 257 | + "value": { |
| 258 | + "description": "The list of settings.", |
| 259 | + "type": "array", |
| 260 | + "readOnly": true, |
| 261 | + "items": { |
| 262 | + "$ref": "#/definitions/Setting" |
| 263 | + } |
| 264 | + } |
| 265 | + } |
| 266 | + }, |
| 267 | + "TagInheritanceProperties": { |
| 268 | + "type": "object", |
| 269 | + "description": "The properties of the tag inheritance setting.", |
| 270 | + "required": [ |
| 271 | + "preferContainerTags" |
| 272 | + ], |
| 273 | + "properties": { |
| 274 | + "preferContainerTags": { |
| 275 | + "description": "Prefer Container tags to override container tags with resource tags in case of conflicts.", |
| 276 | + "type": "boolean" |
| 277 | + } |
| 278 | + } |
| 279 | + } |
| 280 | + }, |
| 281 | + "parameters": { |
| 282 | + "scopeSettingParameter": { |
| 283 | + "name": "scope", |
| 284 | + "in": "path", |
| 285 | + "required": true, |
| 286 | + "type": "string", |
| 287 | + "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.", |
| 288 | + "x-ms-parameter-location": "method" |
| 289 | + }, |
| 290 | + "settingTypeParameter": { |
| 291 | + "name": "type", |
| 292 | + "in": "path", |
| 293 | + "description": "Setting type.", |
| 294 | + "required": true, |
| 295 | + "type": "string", |
| 296 | + "x-ms-parameter-location": "method", |
| 297 | + "enum": [ |
| 298 | + "taginheritance" |
| 299 | + ], |
| 300 | + "x-ms-enum": { |
| 301 | + "name": "SettingType", |
| 302 | + "modelAsString": true, |
| 303 | + "values": [ |
| 304 | + { |
| 305 | + "value": "taginheritance", |
| 306 | + "description": "Tag Inheritance Settings is to inherit user defined tags from container(subscription/resource group) to its respective resources.", |
| 307 | + "name": "TagInheritance" |
| 308 | + } |
| 309 | + ] |
| 310 | + } |
| 311 | + } |
| 312 | + } |
| 313 | +} |
0 commit comments