diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/consumption.json index 95bd46ddaab1..ba3fdd74c5d4 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/consumption.json @@ -1622,12 +1622,18 @@ "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" }, "x-ms-examples": { + "EventsGetByBillingAccount-Primary": { + "$ref": "./examples/EventsGetByBillingAccount-Primary.json" + }, "EventsGetByBillingAccount-Contributor": { "$ref": "./examples/EventsGetByBillingAccount-Contributor.json" }, "EventsGetByBillingAccount": { "$ref": "./examples/EventsGetByBillingAccount.json" }, + "EventsGetByBillingAccountWithFilters-Primary": { + "$ref": "./examples/EventsGetByBillingAccountWithFilters-Primary.json" + }, "EventsGetByBillingAccountWithFilters-Contributor.json": { "$ref": "./examples/EventsGetByBillingAccountWithFilters-Contributor.json" }, @@ -5155,6 +5161,16 @@ "readOnly": true, "$ref": "#/definitions/amount" }, + "billingAccountId": { + "description": "Identifier of the billing account.", + "type": "string", + "readOnly": true + }, + "billingAccountDisplayName": { + "description": "Name of the billing account.", + "type": "string", + "readOnly": true + }, "eventType": { "description": "Identifies the type of the event.", "type": "string", @@ -5239,7 +5255,7 @@ "$ref": "#/definitions/AmountWithExchangeRate" }, "closedBalanceInBillingCurrency": { - "description": "The balance in billing currency after the event.", + "description": "The balance in billing currency after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment", "readOnly": true, "$ref": "#/definitions/AmountWithExchangeRate" }, @@ -5293,7 +5309,7 @@ "description": "The lot properties.", "properties": { "originalAmount": { - "description": "The original amount of a lot.", + "description": "The original amount of a lot, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment", "readOnly": true, "$ref": "#/definitions/amount" }, @@ -5367,7 +5383,7 @@ "readOnly": true }, "originalAmountInBillingCurrency": { - "description": "The original amount of a lot in billing currency.", + "description": "The original amount of a lot in billing currency, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment", "readOnly": true, "$ref": "#/definitions/AmountWithExchangeRate" }, @@ -5391,7 +5407,7 @@ "type": "string", "description": "The eTag for the resource." }, - "orgType": { + "OrganizationType": { "description": "The organization type of the lot.", "type": "string", "enum": [ @@ -5400,18 +5416,18 @@ ], "readOnly": true, "x-ms-enum": { - "name": "OrgType", + "name": "OrganizationType", "modelAsString": true, "values": [ { "value": "Primary", "description": "Primary organization type for Multi-Entity consumption commitment.", - "name": "PrimaryOrgType" + "name": "PrimaryOrganizationType" }, { "value": "Contributor", "description": "Contributor organization type for Multi-Entity consumption commitment.", - "name": "ContributorOrgType" + "name": "ContributorOrganizationType" } ] } diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccount-Primary.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccount-Primary.json new file mode 100644 index 000000000000..9dd73be21fc3 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccount-Primary.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2023-11-01", + "billingAccountId": "1234:5678" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/1234:56789/providers/Microsoft.Consumption/events/eventId1", + "name": "eventId1", + "type": "Microsoft.Consumption/events", + "properties": { + "lotSource": "ConsumptionCommitment", + "lotId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/Microsoft.Consumption/lots/G202001083926600XXXXX", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/X3TD-KVTT-BG7-TGB", + "billingProfileDisplayName": "Contoso Operations Billing", + "transactionDate": "2019-07-01T00:00:00Z", + "description": "New MACC Added", + "billingAccountId": "1234:5678", + "billingAccountDisplayName": "TestBillingAccount", + "charges": { + "currency": "USD", + "value": 500 + }, + "newCredit": { + "currency": "USD", + "value": 500 + }, + "closedBalance": { + "currency": "USD", + "value": 500 + }, + "invoiceNumber": "3304", + "eventType": "NewCredit" + } + }, + { + "id": "/providers/Microsoft.Billing/billingAccounts/1234:56789/providers/Microsoft.Consumption/events/eventId2", + "name": "eventId2", + "type": "Microsoft.Consumption/events", + "properties": { + "lotSource": "AzurePrepayment", + "lotId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/Microsoft.Consumption/lots/7004bc39-974d-482e-8e45-caf91dba0870", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/X3TD-KVTT-BG7-TGB", + "billingProfileDisplayName": "Contoso Operations Billing", + "transactionDate": "2019-07-01T00:00:00Z", + "description": "Balance after invoice 3304", + "billingAccountId": "1234:5678", + "billingAccountDisplayName": "TestBillingAccount", + "charges": { + "currency": "USD", + "value": 500 + }, + "closedBalance": { + "currency": "USD", + "value": 500 + }, + "invoiceNumber": "3304", + "eventType": "SettledCharges" + } + } + ] + } + } + } +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccount.json index c43d2327e5a9..e2e854d3f303 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccount.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccount.json @@ -18,6 +18,8 @@ "billingProfileDisplayName": "Contoso Operations Billing", "transactionDate": "2019-07-01T00:00:00Z", "description": "New MACC Added", + "billingAccountId": "1234:5678", + "billingAccountDisplayName": "TestBillingAccount", "charges": { "currency": "USD", "value": 500 diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccountWithFilters-Primary.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccountWithFilters-Primary.json new file mode 100644 index 000000000000..d71bb3cb7662 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccountWithFilters-Primary.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-11-01", + "billingAccountId": "1234:5678", + "$filter": "lotid eq 'G202001083926600XXXXX' AND lotsource eq 'consumptioncommitment'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/1234:56789/providers/Microsoft.Consumption/events/eventId1", + "name": "eventId1", + "type": "Microsoft.Consumption/events", + "properties": { + "lotSource": "ConsumptionCommitment", + "lotId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/Microsoft.Consumption/lots/G202001083926600XXXXX", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/X3TD-KVTT-BG7-TGB", + "billingProfileDisplayName": "Contoso Operations Billing", + "transactionDate": "2019-07-01T00:00:00Z", + "description": "MACC Canceled", + "billingAccountId": "1234:5678", + "billingAccountDisplayName": "TestBillingAccount", + "canceledCredit": { + "currency": "USD", + "value": 200 + }, + "closedBalance": { + "currency": "USD", + "value": 500 + }, + "invoiceNumber": "3304", + "eventType": "CanceledCredit" + } + } + ] + } + } + } +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccountWithFilters.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccountWithFilters.json index 51e0d9097809..d71bb3cb7662 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccountWithFilters.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/EventsGetByBillingAccountWithFilters.json @@ -19,6 +19,8 @@ "billingProfileDisplayName": "Contoso Operations Billing", "transactionDate": "2019-07-01T00:00:00Z", "description": "MACC Canceled", + "billingAccountId": "1234:5678", + "billingAccountDisplayName": "TestBillingAccount", "canceledCredit": { "currency": "USD", "value": 200 diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccount-Contributor.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccount-Contributor.json index d5902fd45483..f855e8a10efa 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccount-Contributor.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccount-Contributor.json @@ -12,15 +12,11 @@ "name": "lot1", "type": "Microsoft.Consumption/lots", "properties": { - "originalAmount": { - "currency": "USD", - "value": 5000.00 - }, "usedAmount": { "currency": "USD", "value": 550.00 }, - "orgType": "Contributor", + "OrganizationType": "Contributor", "source": "ConsumptionCommitment", "startDate": "2019-10-01T00:00:00Z", "expirationDate": "2019-11-01T00:00:00Z", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccount-Primary.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccount-Primary.json index 44e026622265..f89719559cc9 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccount-Primary.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccount-Primary.json @@ -24,7 +24,7 @@ "currency": "USD", "value": 550.00 }, - "orgType": "Primary", + "OrganizationType": "Primary", "source": "ConsumptionCommitment", "startDate": "2019-10-01T00:00:00Z", "expirationDate": "2019-11-01T00:00:00Z", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccountWithFilters-Contributor.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccountWithFilters-Contributor.json index d435f20bd093..891dee72aec7 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccountWithFilters-Contributor.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccountWithFilters-Contributor.json @@ -13,15 +13,11 @@ "name": "lot1", "type": "Microsoft.Consumption/lots", "properties": { - "originalAmount": { - "currency": "USD", - "value": 5000.00 - }, "usedAmount": { "currency": "USD", "value": 550.00 }, - "orgType": "Contributor", + "OrganizationType": "Contributor", "source": "ConsumptionCommitment", "startDate": "2019-10-01T00:00:00Z", "expirationDate": "2019-11-01T00:00:00Z", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccountWithFilters-Primary.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccountWithFilters-Primary.json index 4887f63d0c52..89a00f35b84a 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccountWithFilters-Primary.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/examples/LotsListByBillingAccountWithFilters-Primary.json @@ -25,7 +25,7 @@ "currency": "USD", "value": 550.00 }, - "orgType": "Primary", + "OrganizationType": "Primary", "source": "ConsumptionCommitment", "startDate": "2019-10-01T00:00:00Z", "expirationDate": "2019-11-01T00:00:00Z",