Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hub Generated] Review request for Microsoft.Consumption to add version stable/2023-03-01 #23914

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
53d7e60
EA Pricesheet download documentation.
pthippeswamy May 10, 2023
d802b6d
Model validation error fix
pthippeswamy May 10, 2023
5e79725
readme edit to add consumption_pricesheet.json
pthippeswamy May 10, 2023
dfa6a5c
corrections
pthippeswamy May 10, 2023
b88151e
Proper braces
pthippeswamy May 11, 2023
73d80d0
corrections
pthippeswamy May 11, 2023
17a19ec
corrections
pthippeswamy May 11, 2023
6a47fe4
edits
pthippeswamy May 11, 2023
bcdd833
corrections
pthippeswamy May 11, 2023
4ef23f4
edit
pthippeswamy May 11, 2023
b19299e
Removed unwanted path and example file
pthippeswamy May 11, 2023
c7b4448
Added error response back
pthippeswamy May 11, 2023
14815b1
Call method correction
pthippeswamy May 17, 2023
f403086
validating Linter error - testing
pthippeswamy May 17, 2023
50e099e
Removed errorResponse to common file
pthippeswamy May 17, 2023
38ed9dd
errorResponse
pthippeswamy May 17, 2023
5a2614e
Adding common-types json to readme
pthippeswamy May 17, 2023
079af5a
ErrorDetail addition
pthippeswamy May 17, 2023
5054dc7
Removed common-types. Edits to correct Linter issues.
pthippeswamy May 18, 2023
5d30090
removed the reference to old file
pthippeswamy May 18, 2023
bb11c77
CI issues fixed
pthippeswamy May 23, 2023
5729531
Corrections based on PR comment
pthippeswamy May 24, 2023
24eb944
rename
pthippeswamy May 31, 2023
e0d3154
SDK error fix
pthippeswamy Jun 1, 2023
135dd5f
Delete consumption.json
pthippeswamy Jun 1, 2023
f86b658
Revert "SDK error fix"
pthippeswamy Jun 1, 2023
76bd16f
Merge branch 'pthippeswamy-consumption-Microsoft.Consumption-2023-03-…
pthippeswamy Jun 1, 2023
79d167e
Suppression for Linter error
pthippeswamy Jun 6, 2023
0b79606
supression
pthippeswamy Jun 6, 2023
1691e36
supression
pthippeswamy Jun 7, 2023
943ddd8
supression error
pthippeswamy Jun 7, 2023
35c8b2b
resolve go duplicate schema issue
tadelesh Jun 7, 2023
b679f83
Changes per - https://nam06.safelinks.protection.outlook.com/?url=htt…
pthippeswamy Jun 7, 2023
e826806
Merge branch 'pthippeswamy-consumption-Microsoft.Consumption-2023-03-…
pthippeswamy Jun 7, 2023
eab544d
correction
pthippeswamy Jun 7, 2023
aba9d50
correcting suppression format
pthippeswamy Jun 7, 2023
b48c7ef
revert suppression
tadelesh Jun 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"swagger": "2.0",
"info": {
"version": "2023-03-01",
"title": "ConsumptionManagementClient",
"description": "Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions."
},
"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": {
"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/download": {
tadelesh marked this conversation as resolved.
Show resolved Hide resolved
"post": {
"tags": [
"PriceSheet"
],
"operationId": "PriceSheet_DownloadByBillingAccountPeriod",
"description": "Generates the pricesheet for the provided billing period asynchronously based on the enrollment id",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/"
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"EAPriceSheetForBillingPeriod": {
"$ref": "./examples/EAPriceSheetForBillingPeriod.json"
}
},
"parameters": [
{
"$ref": "#/parameters/billingAccountIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/billingPeriodNameParameter"
}
],
"responses": {
"200": {
"description": "Request processing completed.",
"schema": {
"$ref": "#/definitions/OperationStatus"
}
},
"202": {
"description": "Accepted",
"headers": {
"Location": {
"type": "string"
},
"Retry-After": {
"type": "integer",
"format": "int64"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
tadelesh marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
}
}
},
"definitions": {
"OperationStatus": {
"description": "The status of the long running operation.",
"type": "object",
"properties": {
"status": {
"description": "The status of the long running operation.",
"type": "string",
"enum": [
"Running",
"Completed",
"Failed"
],
"x-ms-enum": {
"name": "OperationStatusType",
"modelAsString": true
}
},
"properties": {
"x-ms-client-flatten": true,
"description": "The properties of the resource generated.",
"$ref": "#/definitions/PricesheetDownloadProperties"
}
}
},
"PricesheetDownloadProperties": {
"description": "The properties of the price sheet download.",
"type": "object",
"properties": {
"downloadUrl": {
"description": "The link (url) to download the pricesheet.",
"type": "string",
"readOnly": true
},
"validTill": {
"description": "Download link validity.",
"type": "string",
Copy link
Contributor

@visingla-ms visingla-ms May 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be date-time format? #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added it.

"format": "date-time",
"readOnly": true
}
}
}
},
"parameters": {
"billingAccountIdParameter": {
"name": "billingAccountId",
"in": "path",
"description": "BillingAccount ID",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
"billingPeriodNameParameter": {
"name": "billingPeriodName",
"in": "path",
"description": "Billing Period Name.",
"required": true,
"type": "string",
"pattern": "^[0-9]*$",
"x-ms-parameter-location": "method"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"api-version": "2023-03-01",
"billingAccountId": "0000000",
"billingPeriodName": "202305"
},
"responses": {
"202": {
"headers": {
"Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/0000000/providers/Microsoft.Consumption/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01",
"Retry-After": 10
}
},
"200": {
"body": {
"status": "Completed",
"properties": {
"downloadUrl": "https://xxxxxx.blob.core.windows.net/armpricesheetreportdownloadcontainer/20230510/00000000-0000-0000-0000-000000000000",
"validTill": "2023-05-11T05:12:50.4266333Z"
}
}
}
}
}
7 changes: 6 additions & 1 deletion specification/consumption/resource-manager/readme.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ module-name: sdk/resourcemanager/consumption/armconsumption
module: github.com/Azure/azure-sdk-for-go/$(module-name)
output-folder: $(go-sdk-folder)/$(module-name)
azure-arm: true
directive:
- from: consumption_pricesheet.json
where: $.paths["/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/download"].post.responses.default.schema
transform: >
$["$ref"] = "consumption.json#/definitions/ErrorResponse";
```

### Go multi-api
Expand Down Expand Up @@ -121,4 +126,4 @@ Please also specify `--go-sdk-folder=<path to the root directory of your azure-s

``` yaml $(tag) == 'package-2019-01' && $(go)
output-folder: $(go-sdk-folder)/services/consumption/mgmt/2019-01-01/consumption
```
```
1 change: 1 addition & 0 deletions specification/consumption/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ These settings apply only when `--tag=package-2023-03` is specified on the comma
```yaml $(tag) == 'package-2023-03'
input-file:
- Microsoft.Consumption/stable/2023-03-01/consumption.json
- Microsoft.Consumption/stable/2023-03-01/consumption_pricesheet.json
```
### Tag: package-2022-09

Expand Down