diff --git a/custom-words.txt b/custom-words.txt index b5a301b2cad8..fa51d74e9023 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1123,6 +1123,7 @@ mypath mypicture mypictures myregistry +myscope myshopify mysite mysquare diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/costmanagement.json index 8a62002e0d69..0973cb70735e 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/costmanagement.json @@ -33,6 +33,167 @@ } }, "paths": { + "/providers/Microsoft.CostManagement/settings": { + "get": { + "tags": [ + "Settings" + ], + "operationId": "Settings_List", + "description": "Lists all of the settings that have been customized.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SettingList": { + "$ref": "./examples/SettingsList.json" + } + }, + "parameters": [ + { + "$ref": "#/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": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.CostManagement/settings/{settingName}": { + "get": { + "tags": [ + "Settings" + ], + "operationId": "Settings_Get", + "description": "Retrieves the current value for a specific setting.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "Settings": { + "$ref": "./examples/Setting.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/settingNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Setting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Settings" + ], + "operationId": "Settings_CreateOrUpdate", + "description": "Sets a new value for a specific setting.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CreateOrUpdateSetting": { + "$ref": "./examples/SettingsCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/settingNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Setting" + }, + "description": "Body supplied to the CreateOrUpdate setting operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Setting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Settings" + ], + "operationId": "Settings_Delete", + "description": "Remove the current value for a specific setting and reverts back to the default value, if applicable.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DeleteSetting": { + "$ref": "./examples/SettingsDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/settingNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "OK. The request has succeeded, no content returned." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.CostManagement/views": { "get": { "tags": [ @@ -1547,6 +1708,42 @@ "values" ] }, + "SettingsListResult": { + "description": "Result of listing settings. It contains a list of available settings.", + "type": "object", + "properties": { + "value": { + "description": "The list of settings.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Setting" + }, + "maxItems": 10 + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "Setting": { + "description": "State of Setting", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxySettingResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/SettingsProperties", + "title": "Setting properties" + } + } + }, "ViewListResult": { "description": "Result of listing views. It contains a list of available views.", "type": "object", @@ -1582,6 +1779,16 @@ } } }, + "SettingsProperties": { + "type": "object", + "description": "The properties of the setting.", + "properties": { + "scope": { + "description": "For the myscope setting, sets the default scope the current user will see when they sign into Azure Cost Management in the Azure portal.", + "type": "string" + } + } + }, "ViewProperties": { "type": "object", "description": "The properties of the view.", @@ -1780,6 +1987,33 @@ }, "x-ms-azure-resource": true }, + "ProxySettingResource": { + "description": "The Resource model definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name" + }, + "kind": { + "readOnly": true, + "type": "string", + "description": "Resource kind", + "maxLength": 10 + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type" + } + }, + "x-ms-azure-resource": true + }, "ProxyResource": { "description": "The Resource model definition.", "properties": { @@ -2620,6 +2854,15 @@ } }, "parameters": { + "settingNameParameter": { + "name": "settingName", + "in": "path", + "description": "Name of the setting. Allowed values: myscope", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "maxLength": 32 + }, "viewNameParameter": { "name": "viewName", "in": "path", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/Setting.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/Setting.json new file mode 100644 index 000000000000..89cb25f76c20 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/Setting.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2019-11-01", + "settingName": "myscope" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/settings/myscope", + "name": "myscope", + "kind": "user", + "type": "Microsoft.CostManagement/settings", + "properties": { + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SettingsCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SettingsCreateOrUpdate.json new file mode 100644 index 000000000000..ad93bb023549 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SettingsCreateOrUpdate.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2019-11-01", + "settingName": "myscope", + "parameters": { + "properties": { + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/settings/myscope", + "name": "myscope", + "kind": "user", + "type": "Microsoft.CostManagement/settings", + "properties": { + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SettingsDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SettingsDelete.json new file mode 100644 index 000000000000..e4fdee2cac57 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SettingsDelete.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2019-11-01", + "settingName": "TestSettings" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SettingsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SettingsList.json new file mode 100644 index 000000000000..89fc8eae7f6e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2019-11-01/examples/SettingsList.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2019-11-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/settings/myscope", + "name": "myscope", + "kind": "user", + "type": "Microsoft.CostManagement/settings", + "properties": { + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000" + } + } + ] + } + } + } +}