From 5531f8e55ab3f39f8184a73e39e273950f4c39a5 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Wed, 3 Nov 2021 13:03:19 -0700 Subject: [PATCH] Ported Microsoft.Billing 20211001 from master to main --- .../2021-10-01/billingSubscription.json | 1243 +++++++++++++++++ .../examples/BillingSubscription.json | 44 + .../examples/BillingSubscriptionAlias.json | 45 + ...SubscriptionAliasListByBillingAccount.json | 118 ++ ...lingSubscriptionsListByBillingAccount.json | 115 ++ .../examples/DeleteBillingSubscription.json | 17 + .../examples/MergeSubscription.json | 56 + .../examples/MoveBillingSubscription.json | 53 + .../PaymentMethodAtBillingProfile_Delete.json | 48 + .../examples/PutBillingSubscriptionAlias.json | 57 + .../examples/SplitSubscription.json | 50 + .../examples/UpdateBillingSubscription.json | 55 + .../ValidateSubscriptionMoveFailure.json | 21 + .../ValidateSubscriptionMoveSuccess.json | 17 + .../stable/2021-10-01/payment.json | 124 +- .../stable/2021-10-01/types.json | 118 ++ 16 files changed, 2080 insertions(+), 101 deletions(-) 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/BillingSubscriptionAlias.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAliasListByBillingAccount.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/DeleteBillingSubscription.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MergeSubscription.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MoveBillingSubscription.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PaymentMethodAtBillingProfile_Delete.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PutBillingSubscriptionAlias.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/SplitSubscription.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/UpdateBillingSubscription.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveFailure.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveSuccess.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.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..44d61428e6bc --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json @@ -0,0 +1,1243 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-10-01", + "title": "BillingManagementClient", + "description": "The billing client allows you to view and manage your billing details programmatically." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_ListByBillingAccount", + "description": "Lists the subscriptions for a billing account. The operation is currently supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement and Microsoft Online Services Program.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionsListByBillingAccount": { + "$ref": "./examples/BillingSubscriptionsListByBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "./types.json#/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": "./types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}": { + "get": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_Get", + "description": "Gets a subscription by its ID. The operation is currently supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement and Microsoft Online Services Program.", + "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/billingSubscriptionNameParameter" + }, + { + "$ref": "./types.json#/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": "./types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_Update", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options":{ + "final-state-via" : "location" + }, + "description": "Updates the properties of a billing subscription.", + "x-ms-examples": { + "UpdateBillingProperty": { + "$ref": "./examples/UpdateBillingSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionNameParameter" + }, + { + "$ref": "./types.json#/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" + } + }, + "202": { + "description": "Accepted", + "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": "int64" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_Delete", + "description": "Cancels a billing subscription.", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options":{ + "final-state-via" : "location" + }, + "x-ms-examples": { + "DeleteBillingSubscription": { + "$ref": "./examples/DeleteBillingSubscription.json" + } + }, + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionNameParameter" + }, + { + "$ref": "./types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "202": { + "description": "Accepted", + "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": "int64" + } + } + }, + "204": { + "description": "Billing subscription not found." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/move": { + "post": { + "description": "Moves a subscription's charges 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/" + }, + "operationId": "BillingSubscriptions_Move", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options":{ + "final-state-via" : "location" + }, + "x-ms-examples": { + "MoveBillingSubscription": { + "$ref": "./examples/MoveBillingSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionNameParameter" + }, + { + "$ref": "./types.json#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MoveBillingSubscriptionRequest" + }, + "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": "./types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/validateMoveEligibility": { + "post": { + "x-ms-examples": { + "SubscriptionMoveValidateSuccess": { + "$ref": "./examples/ValidateSubscriptionMoveSuccess.json" + }, + "SubscriptionMoveValidateFailure": { + "$ref": "./examples/ValidateSubscriptionMoveFailure.json" + } + }, + "operationId": "BillingSubscriptions_ValidateMoveEligibility", + "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/billingSubscriptionNameParameter" + }, + { + "$ref": "./types.json#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MoveBillingSubscriptionRequest" + }, + "description": "Request parameters that are provided to the validate move eligibility operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ValidateMoveBillingSubscriptionEligibilityResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/merge": { + "post": { + "operationId": "BillingSubscriptions_Merge", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options":{ + "final-state-via" : "location" + }, + "description": "Merges the billing subscription provided in the request with a target billing subscription.", + "x-ms-examples": { + "MergeSubscription": { + "$ref": "./examples/MergeSubscription.json" + } + }, + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionNameParameter" + }, + { + "$ref": "./types.json#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BillingSubscriptionMergeRequest" + }, + "description": "Request parameters that are provided to merge the two billing subscriptions." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscription" + } + }, + "202": { + "description": "Accepted. Billing subscription merge 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": "int64" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/split": { + "post": { + "operationId": "BillingSubscriptions_Split", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options":{ + "final-state-via" : "location" + }, + "description": "Splits a subscription into a new subscription with quantity less than current subscription quantity and not equal to 0.", + "x-ms-examples": { + "SplitSubscription": { + "$ref": "./examples/SplitSubscription.json" + } + }, + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionNameParameter" + }, + { + "$ref": "./types.json#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BillingSubscriptionSplitRequest" + }, + "description": "Request parameters that are provided to split the billing subscription." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscription" + } + }, + "202": { + "description": "Accepted. Billing subscription split 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": "int64" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptionAliases": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_ListByBillingAccount", + "description": "Lists the subscription aliases for a billing account. The operation is supported for seat based billing subscriptions.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionAliasListByBillingAccount": { + "$ref": "./examples/BillingSubscriptionAliasListByBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "./types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionAliasListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptionAliases/{aliasName}": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_Get", + "description": "Gets a subscription by its alias ID. The operation is supported for seat based billing subscriptions.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionAlias": { + "$ref": "./examples/BillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionAliasNameParameter" + }, + { + "$ref": "./types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionAlias" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_CreateOrUpdate", + "x-ms-long-running-operation": true, + "description": "Creates or updates a billing subscription by its alias ID. The operation is supported for seat based billing subscriptions.", + "x-ms-examples": { + "PutBillingSubscription": { + "$ref": "./examples/PutBillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionAliasNameParameter" + }, + { + "$ref": "./types.json#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BillingSubscriptionAlias" + }, + "description": "New or updated billing subscription alias." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionAlias" + } + }, + "202": { + "description": "Accepted", + "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": "int64" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "Amount": { + "description": "The amount.", + "type": "object", + "readOnly": true, + "properties": { + "currency": { + "description": "The currency for the amount value.", + "type": "string", + "readOnly": true + }, + "value": { + "description": "Amount value.", + "type": "number", + "readOnly": true + } + } + }, + "BillingSubscriptionsListResult": { + "description": "The list of billing subscriptions.", + "type": "object", + "properties": { + "value": { + "description": "The list of billing subscriptions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/BillingSubscription" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "BillingSubscription": { + "description": "A billing subscription.", + "type": "object", + "allOf": [ + { + "$ref": "./types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/BillingSubscriptionProperties", + "title": "Billing subscription properties" + } + } + }, + "BillingSubscriptionProperties": { + "description": "The billing properties of a subscription.", + "type": "object", + "properties": { + "autoRenew": { + "description": "Indicates whether auto renewal is turned on or off for a subscription.", + "type": "string", + "enum": [ + "Off", + "On" + ], + "x-ms-enum": { + "name": "AutoRenew", + "modelAsString": true + } + }, + "beneficiaryTenantId": { + "description": "The provisioning tenant of the subscription.", + "type": "string" + }, + "billingFrequency": { + "description": "The billing frequency of the subscription in the ISO8601 format. Example: P1M, P3M, P1Y", + "type": "string" + }, + "billingProfileId": { + "description": "The ID of the billing profile to which the subscription is billed. This field is only applicable for Microsoft Customer Agreement billing accounts.", + "type": "string" + }, + "billingPolicies": { + "type": "object", + "description": "Dictionary of billing policies associated with the subscription.", + "additionalProperties": { + "type": "string" + }, + "maxItems": 50, + "readOnly": true + }, + "billingProfileDisplayName": { + "description": "The display name of the billing profile to which the subscription is billed. This field is only applicable for Microsoft Customer Agreement billing accounts.", + "type": "string", + "readOnly": true + }, + "billingProfileName": { + "description": "The name of the billing profile to which the subscription is billed. This field is only applicable for Microsoft Customer Agreement billing accounts.", + "type": "string", + "readOnly": true + }, + "consumptionCostCenter": { + "description": "The cost center applied to the subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement Type billing accounts.", + "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 accounts.", + "type": "string" + }, + "customerDisplayName": { + "description": "The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "The name of the subscription.", + "type": "string" + }, + "enrollmentAccountId": { + "description": "The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement billing accounts.", + "type": "string", + "readOnly": true + }, + "enrollmentAccountDisplayName": { + "description": "The enrollment Account name associated with the subscription. This field is available only for the Enterprise Agreement billing accounts.", + "type": "string", + "readOnly": true + }, + "enrollmentAccountSubscriptionDetails": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/EnrollmentAccountSubscriptionDetails", + "title": "Enrollment Account Subscription details. This field is available only for the Enterprise Agreement billing accounts." + }, + "invoiceSectionId": { + "description": "The ID of the invoice section to which the subscription is billed. The field is applicable only for Microsoft Partner Agreement billing accounts.", + "type": "string" + }, + "invoiceSectionDisplayName": { + "description": "The display name of the invoice section to which the subscription is billed. The field is applicable only for Microsoft Partner Agreement billing accounts.", + "type": "string", + "readOnly": true + }, + "invoiceSectionName": { + "description": "The name of the invoice section to which the subscription is billed. The field is applicable only for Microsoft Partner Agreement billing accounts.", + "type": "string", + "readOnly": true + }, + "lastMonthCharges": { + "description": "The last month's charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts.", + "$ref": "#/definitions/Amount" + }, + "monthToDateCharges": { + "description": "The current month to date charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts.", + "$ref": "#/definitions/Amount" + }, + "nextBillingCycleDetails": { + "description": "Next billing cycle details of the subscription.", + "$ref": "#/definitions/NextBillingCycleDetails" + }, + "offerId": { + "description": "The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts.", + "type": "string", + "readOnly": true + }, + "productCategory": { + "description": "The category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, Software, UsageBased, Other", + "type": "string", + "readOnly": true + }, + "productType": { + "description": "The type of the product for which the subscription is purchased", + "type": "string", + "readOnly": true + }, + "productTypeId": { + "description": "The ID of the product for which the subscription is purchased", + "type": "string" + }, + "purchaseDate": { + "type": "string", + "format": "date-time", + "description": "The purchase date of the subscription in UTC time.", + "readOnly": true + }, + "quantity": { + "description": "The number of licenses purchased for the subscription", + "type": "integer", + "format": "int64" + }, + "reseller": { + "description": "The reseller for which the subscription is created. The field is available for Microsoft Partner Agreement billing accounts.", + "$ref": "#/definitions/Reseller" + }, + "renewalTermDetails": { + "description": "The term details of the subscription at the next renewal.", + "$ref": "#/definitions/RenewalTermDetails" + }, + "skuDescription": { + "description": "The SKU description of the product for which the subscription is purchased. This field is only available for Microsoft Customer Agreement billing accounts.", + "type": "string", + "readOnly": true + }, + "skuId": { + "description": "The SKU ID of the product for which the subscription is purchased. This field is only available for Microsoft Customer Agreement billing accounts.", + "type": "string" + }, + "status": { + "description": "The status of the subscription. This field is not available for Enterprise Agreement billing accounts.", + "type": "string", + "enum": [ + "Unknown", + "Active", + "Disabled", + "Deleted", + "Warned", + "Expiring", + "Expired", + "AutoRenew", + "Cancelled", + "Suspended" + ], + "readOnly": true, + "x-ms-enum": { + "name": "BillingSubscriptionStatus", + "modelAsString": true + } + }, + "subscriptionId": { + "description": "The ID of the usage-based subscription. This field is only available for usage-based subscriptions of Microsoft Customer Agreement billing accounts.", + "type": "string", + "readOnly": true + }, + "suspensionReasons": { + "description": "The suspension reason for the subscription. This field is not available for Enterprise Agreement billing accounts.", + "type": "array", + "readOnly": true, + "items": { + "type": "string" + } + }, + "termDuration": { + "description": "The duration for which you can use the subscription. Example P1Y and P1M", + "type": "string" + }, + "termStartDate": { + "type": "string", + "format": "date-time", + "description": "The start date of the term in UTC time.", + "readOnly": true + }, + "termEndDate": { + "type": "string", + "format": "date-time", + "description": "The end date of the term in UTC time.", + "readOnly": true + } + } + }, + "BillingSubscriptionMergeRequest": { + "description": "Request to merge two billing subscriptions", + "type": "object", + "properties": { + "targetBillingSubscriptionName": { + "description": "The ID of the target billing subscription that will be merged with the source subscription provided in the request.", + "type": "string" + }, + "quantity": { + "description": "The quantity of the source billing subscription that will be merged with the target billing subscription.", + "type": "integer", + "format": "int32" + } + } + }, + "BillingSubscriptionSplitRequest": { + "description": "Request to split a billing subscription", + "type": "object", + "properties": { + "billingFrequency": { + "description": "The billing frequency of the target subscription in the ISO8601 format. Example: P1M, P3M, P1Y", + "type": "string" + }, + "quantity": { + "description": "The quantity of the target product to which the subscription needs to be split into.", + "type": "integer", + "format": "int32" + }, + "targetProductTypeId": { + "description": "The ID of the target product to which the subscription needs to be split into. This value is not same as the value returned in Get API call and can be retrieved from Catalog API to know the product id to split into.", + "type": "string" + }, + "targetSkuId": { + "description": "The ID of the target product to which the subscription needs to be split into. This value is not same as the value returned in Get API call and can be retrieved from Catalog API to know the sku id to split into.", + "type": "string" + }, + "termDuration": { + "description": "The term duration of the target in ISO8601 format product to which the subscription needs to be split into. Example: P1M, P1Y", + "type": "string" + } + } + }, + "EnrollmentAccountSubscriptionDetails": { + "description": "The billing properties that can be modified. This field is available only for the Enterprise Agreement billing accounts.", + "type": "object", + "readOnly": true, + "properties": { + "subscriptionEnrollmentAccountStatus": { + "description": "The current enrollment account status of the subscription. This field is available only for the Enterprise Agreement billing accounts.", + "type": "string", + "readOnly": true, + "enum": [ + "Active", + "Cancelled", + "Expired", + "Deleted", + "TransferredOut", + "Transferring" + ], + "x-ms-enum": { + "name": "SubscriptionEnrollmentAccountStatus", + "modelAsString": true + } + }, + "enrollmentAccountStartDate": { + "description": "The enrollment Account and the subscription association start date. This field is available only for the Enterprise Agreement billing accounts.", + "format": "date-time", + "type": "string", + "readOnly": true + } + } + }, + "NextBillingCycleDetails": { + "description": "The next billing cycle details of the subscription.", + "type": "object", + "readOnly": true, + "properties": { + "billingFrequency": { + "description": "The billing frequency of the subscription in the next billing cycle.", + "type": "string", + "readOnly": true + } + } + }, + "RenewalTermDetails": { + "description": "The term details of the subscription at renewal.", + "type": "object", + "readOnly": true, + "properties": { + "billingFrequency": { + "description": "The billing frequency of the subscription.", + "type": "string", + "readOnly": true + }, + "productTypeId": { + "description": "The ID of the product.", + "type": "string", + "readOnly": true + }, + "quantity": { + "description": "The number of licenses", + "type": "integer", + "format": "int64" + }, + "skuId": { + "description": "The SKU ID of the product", + "type": "string", + "readOnly": true + }, + "termDuration": { + "description": "The term duration of the subscription. Example P1M and P1Y", + "type": "string", + "readOnly": true + } + } + }, + "Reseller": { + "description": "Details of the reseller.", + "type": "object", + "readOnly": true, + "properties": { + "resellerId": { + "description": "The MPN ID of the reseller.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The name of the reseller.", + "type": "string", + "readOnly": true + } + } + }, + "MoveBillingSubscriptionEligibilityErrorCode": { + "type": "string", + "description": "Error code of the transfer validation response.", + "enum": [ + "AccountIsLocked", + "AssetNotActive", + "AssetHasCap", + "BillingAccountInactive", + "BillingProfilePastDue", + "CrossBillingAccountNotAllowed", + "DestinationBillingProfileNotFound", + "DestinationBillingProfileInactive", + "DestinationBillingProfilePastDue", + "DestinationInvoiceSectionNotFound", + "DestinationInvoiceSectionInactive", + "InvalidDestination", + "InvalidSource", + "InvoiceSectionIsRestricted", + "InsufficientPermissionOnDestination", + "InsufficientPermissionOnSource", + "MarketplaceNotEnabledOnDestination", + "ProductNotFound", + "ProductInactive", + "ProductTypeNotSupported", + "SourceBillingProfilePastDue", + "SourceInvoiceSectionInactive", + "SubscriptionNotActive", + "SubscriptionTypeNotSupported" + ], + "x-ms-enum": { + "name": "subscriptionTransferValidationErrorCode", + "modelAsString": true + } + }, + "MoveBillingSubscriptionRequest": { + "type": "object", + "description": "Request parameters to transfer billing subscription.", + "properties": { + "destinationEnrollmentAccountId": { + "type": "string", + "description": "The destination enrollment account id." + }, + "destinationInvoiceSectionId": { + "type": "string", + "description": "The destination invoice section id." + } + } + }, + "ValidateMoveBillingSubscriptionEligibilityResult": { + "type": "object", + "description": "Result of the transfer eligibility validation.", + "properties": { + "isMoveEligible": { + "description": "Specifies whether the subscription is eligible to move.", + "type": "boolean", + "readOnly": true + }, + "errorDetails": { + "description": "Validation error details.", + "$ref": "#/definitions/ValidateMoveBillingSubscriptionEligibilityError" + } + } + }, + "ValidateMoveBillingSubscriptionEligibilityError": { + "type": "object", + "description": "Error details of the transfer eligibility validation", + "properties": { + "code": { + "description": "Error code for the billing subscription move validation.", + "$ref": "#/definitions/MoveBillingSubscriptionEligibilityErrorCode" + }, + "message": { + "description": "The error message.", + "type": "string" + }, + "details": { + "description": "Detailed error message explaining the error.", + "type": "string" + } + } + }, + "BillingSubscriptionAliasListResult": { + "description": "The list of billing subscription aliases.", + "type": "object", + "properties": { + "value": { + "description": "The list of billing subscription aliases.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/BillingSubscriptionAlias" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "BillingSubscriptionAlias": { + "description": "A billing subscription alias.", + "type": "object", + "allOf": [ + { + "$ref": "./types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/BillingSubscriptionAliasProperties", + "title": "Billing subscription alias properties." + } + } + }, + "BillingSubscriptionAliasProperties": { + "description": "Billing subscription alias properties.", + "type": "object", + "properties": { + "billingSubscriptionId": { + "description": "The ID of the billing subscription with the subscription alias.", + "type": "string", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/BillingSubscriptionProperties" + } + ] + } + }, + "parameters": { + "billingAccountNameParameter": { + "name": "billingAccountName", + "in": "path", + "description": "The ID that uniquely identifies a billing account.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "transferTrackingGuidParameter": { + "name": "transferTrackingGuid", + "in": "path", + "description": "The ID that uniquely identifies a billing subscription transfer request.", + "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" + }, + "billingSubscriptionAliasNameParameter": { + "name": "aliasName", + "in": "path", + "description": "The ID that uniquely identifies a subscription alias.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingSubscriptionNameParameter": { + "name": "billingSubscriptionName", + "in": "path", + "description": "The ID that uniquely identifies a subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "costCenterNameParameter": { + "name": "costCenterName", + "x-ms-parameter-location": "method", + "in": "query", + "required": true, + "description": "Request parameters that are provided to the update cost center operation.", + "type": "string" + }, + "customerNameParameter": { + "name": "customerName", + "in": "path", + "description": "The ID that uniquely identifies a customer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "enrollmentAccountNameParameter": { + "name": "enrollmentAccountName", + "in": "path", + "description": "The ID that uniquely identifies an enrollment account.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "departmentNameParameter": { + "name": "departmentName", + "in": "path", + "description": "The ID that uniquely identifies a department.", + "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" + } + }, + "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..575e352b6e52 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscription.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "name": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "displayName": "Subscription 1", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBased", + "productType": "Usage based", + "productTypeId": "DZH318Z0BPS6", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3" + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAlias.json new file mode 100644 index 000000000000..d0507bf6741a --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAlias.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "aliasName": "c356b7c7-7545-4686-b843-c1a49cf853fc" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/c356b7c7-7545-4686-b843-c1a49cf853fc", + "name": "c356b7c7-7545-4686-b843-c1a49cf853fc", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptionAliases", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "displayName": "Subscription 1", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBased", + "productType": "Usage based", + "productTypeId": "DZH318Z0BPS6", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3" + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAliasListByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAliasListByBillingAccount.json new file mode 100644 index 000000000000..11c3df25c5dc --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAliasListByBillingAccount.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/c356b7c7-7545-4686-b843-c1a49cf853fc", + "name": "c356b7c7-7545-4686-b843-c1a49cf853fc", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptionAliases", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "displayName": "Subscription 1", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBased", + "productType": "Usage Based", + "productTypeId": "DZH318Z0BPS6", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/ec16a54e-e8ad-4c14-8e87-e30e75fa800e", + "name": "ec16a54e-e8ad-4c14-8e87-e30e75fa800e", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptionAliases", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "displayName": "Subscription 2", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 1000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 400 + }, + "productCategory": "UsageBased", + "productType": "Usage based", + "productTypeId": "DZH318Z0BPS6", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/2ee97fe0-efca-4960-a9af-98a30c2c497c", + "name": "2ee97fe0-efca-4960-a9af-98a30c2c497c", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptionAliases", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "displayName": "Subscription 3", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd0730", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 6000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 900 + }, + "productCategory": "SeatBased", + "productType": "Microsoft 365 Business Standard", + "productTypeId": "CFQ7TTC0LDPB", + "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", + "quantity": 4, + "skuId": "0001", + "skuDescription": "Microsoft 365 Business Standard", + "status": "Active", + "termDuration": "P1Y", + "termStartDate": "2021-10-01T00:00:00Z", + "termEndDate": "2022-09-30T00:00:00Z" + } + } + ] + } + } + } +} 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..1dd47b33c44a --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingAccount.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "name": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "displayName": "Subscription 1", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBased", + "productType": "Usage based", + "productTypeId": "DZH318Z0BPS6", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "displayName": "Subscription 2", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 1000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 400 + }, + "productCategory": "UsageBased", + "productType": "Usage based", + "productTypeId": "DZH318Z0BPS6", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}billingSubscriptions/7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "name": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "displayName": "Subscription 3", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd0730", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 6000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 900 + }, + "productCategory": "SeatBased", + "productType": "Microsoft 365 Business Standard", + "productTypeId": "CFQ7TTC0LDPB", + "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", + "quantity": 4, + "skuId": "0001", + "skuDescription": "Microsoft 365 Business Standard", + "status": "Active", + "termDuration": "P1Y", + "termStartDate": "2021-10-01T00:00:00Z", + "termEndDate": "2022-09-30T00:00:00Z" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/DeleteBillingSubscription.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/DeleteBillingSubscription.json new file mode 100644 index 000000000000..da9f98cf161c --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/DeleteBillingSubscription.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/deleteBillingSubscription_7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2021-10-01", + "Retry-After": "60" + } + }, + "204": {} + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MergeSubscription.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MergeSubscription.json new file mode 100644 index 000000000000..a15218591370 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MergeSubscription.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "parameters": { + "quantity": 4, + "targetBillingSubscriptionName": "9e030ae5-51ed-4e02-8e17-d51b3aa55980" + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "displayName": "Subscription 3", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd0730", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 6000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 900 + }, + "productCategory": "SeatBased", + "productType": "Microsoft 365 Business Standard", + "productTypeId": "CFQ7TTC0LDPB", + "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", + "quantity": 5, + "skuId": "0001", + "skuDescription": "Microsoft 365 Business Standard", + "status": "Active", + "termDuration": "P1Y", + "termStartDate": "2021-10-01T00:00:00Z", + "termEndDate": "2022-09-30T00:00:00Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/mergeBillingSubscription_9e030ae5-51ed-4e02-8e17-d51b3aa55980:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2021-10-01", + "Retry-After": "30" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MoveBillingSubscription.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MoveBillingSubscription.json new file mode 100644 index 000000000000..3ebd0af36600 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MoveBillingSubscription.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "parameters": { + "destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/06febd6b-3cb7-47fe-ac7d-7b4e83e80f53" + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "name": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "displayName": "Subscription 1", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/06febd6b-3cb7-47fe-ac7d-7b4e83e80f53", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBased", + "productType": "Usage based", + "productTypeId": "DZH318Z0BPS6", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/moveBillingSubscription_2b72f936-0166-47d6-91a3-ef9f84f36664:06febd6b-3cb7-47fe-ac7d-7b4e83e80f53:6b96d3f2-9008-4a9d-912f-f87744185aa3:418b0e9c-5dc3-4260-918f-30b90619fe07:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2021-10-01", + "Retry-After": "30" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PaymentMethodAtBillingProfile_Delete.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PaymentMethodAtBillingProfile_Delete.json new file mode 100644 index 000000000000..21c9c6534f3b --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PaymentMethodAtBillingProfile_Delete.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31", + "billingProfileName": "ABC1-A1CD-AB1-BP1", + "paymentMethodName": "ABCDABCDABC0" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethodLinks/operationResults/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2021-10-01", + "Retry-After": "60" + } + }, + "200": {}, + "204": {}, + "409": { + "body": { + "error": { + "code": "PaymentMethodNotEligibleForDetach", + "message": "Payment method cannot be detached from billing group.", + "details": [ + { + "code": "AzureSubscriptions", + "message": "Payment method cannot be detached as there are active or disabled azure subscriptions on this billing profile." + }, + { + "code": "RecurringCharges", + "message": "Payment method cannot be detached as there are recurring charges on this billing profile." + }, + { + "code": "ReservedInstances", + "message": "Payment method cannot be detached as there are reserved instances on this billing profile." + }, + { + "code": "OutstandingCharges", + "message": "Payment method cannot be detached as there are unpaid outstanding charges on this billing profile." + }, + { + "code": "PendingCharges", + "message": "Payment method cannot be detached as there are pending charges accumulating on this billing profile." + } + ] + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PutBillingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PutBillingSubscriptionAlias.json new file mode 100644 index 000000000000..73a168ce2975 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PutBillingSubscriptionAlias.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "aliasName": "c356b7c7-7545-4686-b843-c1a49cf853fc", + "parameters": { + "properties": { + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "customerId": "e259ec08-fc9f-481c-a052-8b0c83a3a051", + "displayName": "Subscription 3", + "invoiceSectionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "productTypeId": "CFQ7TTC0LDPB", + "quantity": 4, + "skuId": "0001", + "termDuration": "P1Y" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/aliases/c356b7c7-7545-4686-b843-c1a49cf853fc", + "name": "c356b7c7-7545-4686-b843-c1a49cf853fc", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions/aliases", + "properties": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "billingFrequency": "P1M", + "displayName": "Subscription 3", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "productCategory": "SeatBased", + "productType": "Microsoft 365 Business Standard", + "productTypeId": "CFQ7TTC0LDPB", + "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", + "quantity": 4, + "skuId": "0001", + "skuDescription": "Microsoft 365 Business Standard", + "status": "Active", + "termDuration": "P1Y", + "termStartDate": "2021-10-01T00:00:00Z", + "termEndDate": "2022-09-30T00:00:00Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/putBillingSubscriptionAlias_c356b7c7-7545-4686-b843-c1a49cf853fc:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2021-10-01", + "Retry-After": "30" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/SplitSubscription.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/SplitSubscription.json new file mode 100644 index 000000000000..7168b12f8d27 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/SplitSubscription.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "parameters": { + "billingFrequency": "P1M", + "quantity": 4, + "targetProductTypeId": "CFQ7TTC0LDPB", + "targetSkuId": "0001", + "termDuration": "P1Y" + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "name": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingFrequency": "P1M", + "displayName": "Subscription 3", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "productCategory": "SeatBased", + "productType": "Microsoft 365 Business Standard", + "productTypeId": "CFQ7TTC0LDPB", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 4, + "skuId": "0001", + "skuDescription": "Microsoft 365 Business Standard", + "status": "Active", + "termDuration": "P1Y", + "termStartDate": "2021-10-01T00:00:00Z", + "termEndDate": "2022-09-30T00:00:00Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/splitBillingSubscription_7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2021-10-01", + "Retry-After": "30" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/UpdateBillingSubscription.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/UpdateBillingSubscription.json new file mode 100644 index 000000000000..b8102b934946 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/UpdateBillingSubscription.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "parameters": { + "properties": { + "displayName": "Subscription 1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "name": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "displayName": "Subscription 1", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBased", + "productType": "Usage based", + "productTypeId": "DZH318Z0BPS6", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/manageBillingSubscription_418b0e9c-5dc3-4260-918f-30b90619fe07:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2021-10-01", + "Retry-After": "30" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveFailure.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveFailure.json new file mode 100644 index 000000000000..0a91f0ad8ec6 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveFailure.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "parameters": { + "destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/e004d7ce-feca-4341-97c9-9f11cae37858/invoiceSections/06febd6b-3cb7-47fe-ac7d-7b4e83e80f53" + } + }, + "responses": { + "200": { + "body": { + "isMoveEligible": false, + "errorDetails": { + "code": "SubscriptionNotActive", + "message": "Invoice Sections can only be changed for active subscriptions." + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveSuccess.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveSuccess.json new file mode 100644 index 000000000000..e28debceb2be --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveSuccess.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "parameters": { + "destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/e004d7ce-feca-4341-97c9-9f11cae37858/invoiceSections/06febd6b-3cb7-47fe-ac7d-7b4e83e80f53" + } + }, + "responses": { + "200": { + "body": { + "isMoveEligible": true + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/payment.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/payment.json index e3f38ae0d797..4a8da9742ba6 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/payment.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/payment.json @@ -3,7 +3,7 @@ "info": { "version": "2021-10-01", "title": "PaymentManagementClient", - "description": "Payment management client provides access to payment resources for Azure." + "description": "The billing client allows you to view and manage your billing details programmatically." }, "host": "management.azure.com", "schemes": [ @@ -21,7 +21,7 @@ "tags": [ "PaymentMethods" ], - "operationId": "PaymentMethodOwnedByUser_List.", + "operationId": "PaymentMethods_ListByUser", "description": "Lists the payment methods owned by the caller.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -46,7 +46,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -60,7 +60,7 @@ "tags": [ "PaymentMethods" ], - "operationId": "PaymentMethodOwnedByUser_Get", + "operationId": "PaymentMethods_GetByUser", "description": "Gets a payment method owned by the caller.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -88,7 +88,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -97,7 +97,7 @@ "tags": [ "PaymentMethods" ], - "operationId": "PaymentMethodOwnedByUser_Delete", + "operationId": "PaymentMethods_DeleteByUser", "description": "Deletes a payment method owned by the caller.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" @@ -125,7 +125,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -164,7 +164,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -178,7 +178,7 @@ "tags": [ "PaymentMethods" ], - "operationId": "PaymentMethodAtBillingAccount_Get", + "operationId": "PaymentMethods_GetByBillingAccount", "description": "Gets a payment method available for a billing account. 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/" @@ -209,7 +209,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -251,7 +251,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -271,7 +271,7 @@ "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, "x-ms-examples": { - "PaymentMethodsListByBillingProfile": { + "PaymentMethodsGetByBillingProfile": { "$ref": "./examples/PaymentMethodAtBillingProfile_Get.json" } }, @@ -299,7 +299,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -308,15 +308,15 @@ "tags": [ "PaymentMethods" ], - "operationId": "PaymentMethodAtBillingProfile_Remove", + "operationId": "PaymentMethods_DeleteAtBillingProfile", "x-ms-long-running-operation": true, "description": "Deletes a payment method link and removes the payment method from a billing profile. 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": { - "PaymentMethodAtBillingProfileRemove": { - "$ref": "./examples/PaymentMethodAtBillingProfile_Remove.json" + "PaymentMethodAtBillingProfileDelete": { + "$ref": "./examples/PaymentMethodAtBillingProfile_Delete.json" } }, "parameters": [ @@ -364,7 +364,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -395,7 +395,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -430,7 +430,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "./types.json#/definitions/Resource" } ], "properties": { @@ -447,8 +447,7 @@ "properties": { "paymentMethod": { "description": "Projection of a payment method", - "$ref": "#/definitions/PaymentMethodProjectionProperties", - "readOnly": true + "$ref": "#/definitions/PaymentMethodProjectionProperties" } } }, @@ -476,7 +475,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "./types.json#/definitions/Resource" } ], "properties": { @@ -705,87 +704,9 @@ } } }, - "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 - }, - "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 - } - } - } - }, "OperationListResult": { "description": "The list of billing operations and a URL link to get the next set of results.", + "type": "object", "properties": { "value": { "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", @@ -818,6 +739,7 @@ }, "display": { "description": "The object that represents the operation.", + "type": "object", "properties": { "provider": { "description": "Service provider: Microsoft.Billing.", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json new file mode 100644 index 000000000000..dc6c5e641140 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json @@ -0,0 +1,118 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-10-01", + "title": "Common types for Microsoft.Billing" + }, + "paths": {}, + "definitions": { + "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" + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "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 + }, + "details": { + "description": "The sub details of the error.", + "$ref": "#/definitions/ErrorSubDetails" + } + } + }, + "ErrorSubDetails": { + "description": "The sub details of the error.", + "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 + } + } + } + }, + "Resource": { + "description": "The resource model definition.", + "type": "object", + "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 + } + }, + "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 2021-10-01." + } + }, + "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" + } + } + } +}