From 6e445719cb783d08414ee4e58dfb590a3aad9edd Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Wed, 1 Sep 2021 19:11:25 -0700 Subject: [PATCH] GA 2020-05-01 billing subscriptions baseline --- .../2021-10-01/billingSubscription.json | 791 ++++++++++++++++++ .../examples/BillingSubscription.json | 36 + ...lingSubscriptionsListByBillingAccount.json | 89 ++ ...lingSubscriptionsListByBillingProfile.json | 90 ++ .../BillingSubscriptionsListByCustomer.json | 69 ++ ...lingSubscriptionsListByInvoiceSection.json | 91 ++ 6 files changed, 1166 insertions(+) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscription.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingAccount.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingProfile.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByCustomer.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByInvoiceSection.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json new file mode 100644 index 000000000000..d8c5f5283208 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json @@ -0,0 +1,791 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-05-01", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_ListByCustomer", + "description": "Lists the subscriptions for a customer. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionsListByCustomer": { + "$ref": "./examples/BillingSubscriptionsListByCustomer.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/customerNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_ListByBillingAccount", + "description": "Lists the subscriptions for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionsListByBillingAccount": { + "$ref": "./examples/BillingSubscriptionsListByBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_ListByBillingProfile", + "description": "Lists the subscriptions that are billed to a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionsListByBillingProfile": { + "$ref": "./examples/BillingSubscriptionsListByBillingProfile.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_ListByInvoiceSection", + "description": "Lists the subscriptions that are billed to an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionsListByInvoiceSection": { + "$ref": "./examples/BillingSubscriptionsListByInvoiceSection.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "$ref": "#/parameters/invoiceSectionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_Get", + "description": "Gets a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscription": { + "$ref": "./examples/BillingSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscription" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_Update", + "description": "Updates the properties of a billing subscription. Currently, cost center can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.", + "x-ms-examples": { + "UpdateBillingProperty": { + "$ref": "./examples/UpdateBillingSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BillingSubscription" + }, + "description": "Request parameters that are provided to the update billing subscription operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscription" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/move": { + "post": { + "description": "Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing profile as the existing invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "operationId": "BillingSubscriptions_Move", + "x-ms-long-running-operation": true, + "x-ms-examples": { + "MoveBillingSubscription": { + "$ref": "./examples/MoveBillingSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TransferBillingSubscriptionRequestProperties" + }, + "description": "Request parameters that are provided to the move subscription operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscription" + } + }, + "202": { + "description": "Accepted. Billing Subscription transfer is in progress.", + "headers": { + "Location": { + "description": "Location URI to poll for result.", + "type": "string" + }, + "Retry-After": { + "description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.", + "type": "integer", + "format": "int32" + } + } + }, + "default": { + "description": "Unexpected error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/validateMoveEligibility": { + "post": { + "x-ms-examples": { + "SubscriptionMoveValidateSuccess": { + "$ref": "./examples/ValidateSubscriptionMoveSuccess.json" + }, + "SubscriptionMoveValidateFailure": { + "$ref": "./examples/ValidateSubscriptionMoveFailure.json" + } + }, + "operationId": "BillingSubscriptions_ValidateMove", + "description": "Validates if a subscription's charges can be moved to a new invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TransferBillingSubscriptionRequestProperties" + }, + "description": "Request parameters that are provided to the validate move eligibility operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ValidateSubscriptionTransferEligibilityResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "TransferBillingSubscriptionRequestProperties": { + "type": "object", + "description": "Request parameters to transfer billing subscription.", + "required": [ + "destinationInvoiceSectionId" + ], + "properties": { + "destinationInvoiceSectionId": { + "type": "string", + "description": "The destination invoice section id." + } + } + }, + "ValidateSubscriptionTransferEligibilityResult": { + "type": "object", + "description": "Result of the transfer eligibility validation.", + "properties": { + "isMoveEligible": { + "description": "Specifies whether the subscription is eligible to be transferred.", + "type": "boolean", + "readOnly": true + }, + "errorDetails": { + "description": "Validation error details.", + "$ref": "#/definitions/ValidateSubscriptionTransferEligibilityError" + } + } + }, + "ValidateSubscriptionTransferEligibilityError": { + "type": "object", + "description": "Error details of the transfer eligibility validation", + "properties": { + "code": { + "description": "Error code for the product transfer validation.", + "$ref": "#/definitions/SubscriptionTransferValidationErrorCode" + }, + "message": { + "description": "The error message.", + "type": "string" + }, + "details": { + "description": "Detailed error message explaining the error.", + "type": "string" + } + } + }, + "SubscriptionTransferValidationErrorCode": { + "type": "string", + "description": "Error code of the transfer validation response.", + "enum": [ + "BillingAccountInactive", + "CrossBillingAccountNotAllowed", + "DestinationBillingProfileInactive", + "DestinationBillingProfileNotFound", + "DestinationBillingProfilePastDue", + "DestinationInvoiceSectionInactive", + "DestinationInvoiceSectionNotFound", + "InsufficientPermissionOnDestination", + "InsufficientPermissionOnSource", + "InvalidDestination", + "InvalidSource", + "MarketplaceNotEnabledOnDestination", + "NotAvailableForDestinationMarket", + "ProductInactive", + "ProductNotFound", + "ProductTypeNotSupported", + "SourceBillingProfilePastDue", + "SourceInvoiceSectionInactive", + "SubscriptionNotActive", + "SubscriptionTypeNotSupported" + ], + "x-ms-enum": { + "name": "subscriptionTransferValidationErrorCode", + "modelAsString": true + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "The sub details of the error.", + "readOnly": true, + "$ref": "#/definitions/ErrorSubDetails" + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "ErrorSubDetails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + } + }, + "Reseller": { + "description": "Details of the reseller.", + "properties": { + "resellerId": { + "description": "The MPN ID of the reseller.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The name of the reseller.", + "type": "string", + "readOnly": true + } + } + }, + "Resource": { + "description": "The Resource model definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + } + }, + "x-ms-azure-resource": true + }, + "BillingSubscriptionsListResult": { + "description": "The list of billing subscriptions.", + "properties": { + "value": { + "description": "The list of billing subscriptions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/BillingSubscription" + } + }, + "totalCount": { + "description": "Total number of records.", + "type": "number", + "format": "int32", + "readOnly": true + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "BillingSubscription": { + "description": "A billing subscription.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/BillingSubscriptionProperties", + "title": "Billing subscription properties" + } + } + }, + "BillingSubscriptionProperties": { + "description": "The billing properties of a subscription.", + "properties": { + "displayName": { + "description": "The name of the subscription.", + "type": "string", + "readOnly": true + }, + "subscriptionId": { + "description": "The ID of the subscription.", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "subscriptionBillingStatus": { + "description": "The current billing status of the subscription.", + "type": "string", + "enum": [ + "Active", + "Inactive", + "Abandoned", + "Deleted", + "Warning" + ], + "x-ms-enum": { + "name": "BillingSubscriptionStatusType", + "modelAsString": true + } + }, + "lastMonthCharges": { + "description": "The last month charges.", + "readOnly": true, + "$ref": "#/definitions/Amount" + }, + "monthToDateCharges": { + "description": "The current month to date charges.", + "readOnly": true, + "$ref": "#/definitions/Amount" + }, + "billingProfileId": { + "description": "The ID of the billing profile to which the subscription is billed.", + "type": "string", + "readOnly": true + }, + "billingProfileDisplayName": { + "description": "The name of the billing profile to which the subscription is billed.", + "type": "string", + "readOnly": true + }, + "costCenter": { + "description": "The cost center applied to the subscription.", + "type": "string" + }, + "customerId": { + "description": "The ID of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing account.", + "type": "string", + "readOnly": true + }, + "customerDisplayName": { + "description": "The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing account.", + "type": "string", + "readOnly": true + }, + "invoiceSectionId": { + "description": "The ID of the invoice section to which the subscription is billed.", + "type": "string", + "readOnly": true + }, + "invoiceSectionDisplayName": { + "description": "The name of the invoice section to which the subscription is billed.", + "type": "string", + "readOnly": true + }, + "reseller": { + "description": "Reseller for this subscription.", + "readOnly": true, + "$ref": "#/definitions/Reseller" + }, + "skuId": { + "description": "The sku ID of the Azure plan for the subscription.", + "type": "string" + }, + "skuDescription": { + "description": "The sku description of the Azure plan for the subscription.", + "type": "string", + "readOnly": true + }, + "suspensionReasons": { + "description": "The suspension reason for a subscription. Applies only to subscriptions in Microsoft Online Services Program billing accounts.", + "type": "array", + "readOnly": true, + "items": { + "type": "string" + } + } + } + }, + "Amount": { + "description": "The amount.", + "properties": { + "currency": { + "description": "The currency for the amount value.", + "type": "string", + "readOnly": true + }, + "value": { + "description": "Amount value.", + "type": "number" + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The version of the API to be used with the client request. The current version is 2020-05-01." + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The ID that uniquely identifies an Azure subscription.", + "required": true, + "type": "string" + }, + "billingAccountNameParameter": { + "name": "billingAccountName", + "in": "path", + "description": "The ID that uniquely identifies a billing account.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "invoiceSectionNameParameter": { + "name": "invoiceSectionName", + "in": "path", + "description": "The ID that uniquely identifies an invoice section.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingProfileNameParameter": { + "name": "billingProfileName", + "in": "path", + "description": "The ID that uniquely identifies a billing profile.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "customerNameParameter": { + "name": "customerName", + "in": "path", + "description": "The ID that uniquely identifies a customer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscription.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscription.json new file mode 100644 index 000000000000..82f9307e93a9 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscription.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}", + "name": "{subscriptionId}", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "My Subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingAccount.json new file mode 100644 index 000000000000..93283f3627e2 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingAccount.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/90000000-0000-0000-0000-000000000000", + "name": "90000000-0000-0000-0000-000000000000", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "My subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/90000000-0000-0000-0000-000000000001", + "name": "90000000-0000-0000-0000-000000000001", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "Test subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 1000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 400 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/90000000-0000-0000-0000-000000000002", + "name": "90000000-0000-0000-0000-000000000002", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "Dev Subscription", + "subscriptionId": "6b96d3f2-4a9d-9008-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 6000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 900 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + } + ] + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingProfile.json new file mode 100644 index 000000000000..ac88af9bc396 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingProfile.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId1", + "name": "billingSubscriptionId1", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "My subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId2", + "name": "billingSubscriptionId2", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "Test subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 1000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 400 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId3", + "name": "billingSubscriptionId3", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "Dev Subscription", + "subscriptionId": "6b96d3f2-4a9d-9008-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 6000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 900 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + } + ] + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByCustomer.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByCustomer.json new file mode 100644 index 000000000000..966ab091b901 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByCustomer.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "customerName": "{customerName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId1", + "name": "billingSubscriptionId1", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "My subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600.00 + }, + "costCenter": "ABC1234", + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer1", + "reseller": { + "resellerId": "89e87bdf-a2a2-4687-925f-4c18b27bccfd", + "description": "Reseller1" + }, + "skuId": "0002", + "skuDescription": "Microsoft Azure Plan for DevTest" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId2", + "name": "billingSubscriptionId2", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "Test subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 1000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 400 + }, + "costCenter": "ABC1234", + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + "customerDisplayName": "Customer1", + "reseller": { + "resellerId": "3b65b5a8-bd4f-4084-90e9-e1bd667a2b19", + "description": "Reseller3" + }, + "skuId": "0002", + "skuDescription": "Microsoft Azure Plan for DevTest" + } + } + ] + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByInvoiceSection.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByInvoiceSection.json new file mode 100644 index 000000000000..b2f82cede0d2 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByInvoiceSection.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}", + "invoiceSectionName": "{invoiceSectionName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId1", + "name": "billingSubscriptionId1", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "My subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId2", + "name": "billingSubscriptionId2", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "Test subscription", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 1000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 400 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId3", + "name": "billingSubscriptionId3", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "displayName": "Dev Subscription", + "subscriptionId": "6b96d3f2-4a9d-9008-912f-f87744185aa3", + "subscriptionBillingStatus": "Active", + "lastMonthCharges": { + "currency": "USD", + "value": 6000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 900 + }, + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + "invoiceSectionDisplayName": "Contoso operations invoiceSection", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "costCenter": "ABC1234", + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + } + } + ] + } + } + } +}