From dc589b10b1b762934c93d58604e6d0efbefcc74c Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Wed, 1 Sep 2021 19:40:16 -0700 Subject: [PATCH 01/36] Billing subscription changes for GA 2021-10-01 --- .../2021-10-01/billingSubscription.json | 1006 ++++++++++++----- .../2021-10-01/billingSubscriptionAlias.json | 260 +++++ .../examples/BillingSubscription.json | 34 +- .../examples/BillingSubscriptionAlias.json | 44 + ...SubscriptionAliasListByBillingAccount.json | 111 ++ ...lingSubscriptionsListByBillingAccount.json | 97 +- ...lingSubscriptionsListByBillingProfile.json | 90 -- .../BillingSubscriptionsListByCustomer.json | 68 +- ...lingSubscriptionsListByInvoiceSection.json | 91 -- .../examples/DeleteBillingSubscription.json | 43 + .../examples/MergeSubscription.json | 46 + .../examples/MoveBillingSubscription.json | 52 + .../examples/PutBillingSubscriptionAlias.json | 55 + .../examples/SplitSubscription.json | 49 + .../examples/TransferAccountOwnership.json | 30 + .../examples/UpdateBillingSubscription.json | 48 + .../ValidateSubscriptionMoveFailure.json | 24 + .../ValidateSubscriptionMoveSuccess.json | 20 + .../stable/2021-10-01/operations.json | 126 +++ .../stable/2021-10-01/types.json | 122 ++ 20 files changed, 1848 insertions(+), 568 deletions(-) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.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 delete mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingProfile.json delete mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByInvoiceSection.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/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/TransferAccountOwnership.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/operations.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 index d8c5f5283208..29b4909511e7 100644 --- 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 @@ -1,9 +1,9 @@ { "swagger": "2.0", "info": { - "version": "2020-05-01", + "version": "2021-10-01", "title": "BillingManagementClient", - "description": "Billing client provides access to billing resources for Azure subscriptions." + "description": "Billing client provides access to billing resources and logs for Azure subscriptions." }, "host": "management.azure.com", "schemes": [ @@ -39,7 +39,7 @@ "$ref": "#/parameters/customerNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" } ], "responses": { @@ -52,7 +52,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -67,7 +67,7 @@ "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.", + "description": "Lists the subscriptions for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement or Enterprise Agreement.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, @@ -81,7 +81,7 @@ "$ref": "#/parameters/billingAccountNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" } ], "responses": { @@ -94,7 +94,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -103,19 +103,19 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}": { "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.", + "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": { - "BillingSubscriptionsListByBillingProfile": { - "$ref": "./examples/BillingSubscriptionsListByBillingProfile.json" + "BillingSubscription": { + "$ref": "./examples/BillingSubscription.json" } }, "parameters": [ @@ -123,44 +123,36 @@ "$ref": "#/parameters/billingAccountNameParameter" }, { - "$ref": "#/parameters/billingProfileNameParameter" + "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/BillingSubscriptionsListResult" + "$ref": "#/definitions/BillingSubscription" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } - } - }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions": { - "get": { + }, + "patch": { "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/" - }, + "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": { - "BillingSubscriptionsListByInvoiceSection": { - "$ref": "./examples/BillingSubscriptionsListByInvoiceSection.json" + "UpdateBillingSubscription": { + "$ref": "./examples/UpdateBillingSubscription.json" } }, "parameters": [ @@ -168,58 +160,74 @@ "$ref": "#/parameters/billingAccountNameParameter" }, { - "$ref": "#/parameters/billingProfileNameParameter" + "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/invoiceSectionNameParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" }, { - "$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/BillingSubscriptionsListResult" + "$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": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } - } - }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}": { - "get": { + }, + "delete": { "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/" - }, + "operationId": "BillingSubscriptions_Delete", + "description": "Cancels a billing subscription.", + "x-ms-long-running-operation": true, "x-ms-examples": { - "BillingSubscription": { - "$ref": "./examples/BillingSubscription.json" + "DeleteBillingSubscription": { + "$ref": "./examples/DeleteBillingSubscription.json" } }, + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, "parameters": [ { "$ref": "#/parameters/billingAccountNameParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" } ], "responses": { @@ -229,23 +237,43 @@ "$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" + } + } + }, + "204": { + "description": "Billing subscription not found." + }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/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.", + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/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": { - "UpdateBillingProperty": { - "$ref": "./examples/UpdateBillingSubscription.json" + "MoveBillingSubscription": { + "$ref": "./examples/MoveBillingSubscription.json" } }, "parameters": [ @@ -253,19 +281,19 @@ "$ref": "#/parameters/billingAccountNameParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/BillingSubscription" + "$ref": "#/definitions/TransferBillingSubscriptionRequestProperties" }, - "description": "Request parameters that are provided to the update billing subscription operation." + "description": "Request parameters that are provided to the move subscription operation." } ], "responses": { @@ -275,46 +303,168 @@ "$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": "Error response describing why the operation failed.", + "description": "Unexpected error.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/move": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/validateMoveEligibility": { "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.", + "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/" }, - "operationId": "BillingSubscriptions_Move", + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionNameParameter" + }, + { + "$ref": "./types.json#/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": "./types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/transferBillingSubscriptions": { + "post": { + "description": "Moves subscriptions to target enrollmentAccount. The target enrollmentAccount and source enrollmentAccount must be associated to the same Billing Account. This operation is supported only for subscriptions that are purchased with a recurring charge and for billing accounts with agreement type Microsoft Enterprise Agreement.", + "operationId": "BillingSubscriptions_AccountOwnershipTransfer", "x-ms-long-running-operation": true, "x-ms-examples": { - "MoveBillingSubscription": { - "$ref": "./examples/MoveBillingSubscription.json" + "TransferBillingSubscription": { + "$ref": "./examples/TransferAccountOwnership.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AccountOwnershipTransferRequest" + }, + "description": "Request parameters that are provided to transfer account ownership." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/AccountOwnershipTransferResult" + } + }, + "202": { + "description": "Accepted. Account Ownership Transfer 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": "int64" + } + } + }, + "default": { + "description": "Unexpected error.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/merge": { + "post": { + "operationId": "BillingSubscriptions_Merge", + "x-ms-long-running-operation": true, + "description": "Merges two existing subscriptions into a new subscription with quantity greater than the existing subscriptions individually.", + "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/subscriptionIdParameter" + "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/TransferBillingSubscriptionRequestProperties" + "$ref": "#/definitions/BillingSubscriptionMergeRequest" }, - "description": "Request parameters that are provided to the move subscription operation." + "description": "Request parameters that are provided to merge the two billing subscriptions." } ], "responses": { @@ -325,7 +475,7 @@ } }, "202": { - "description": "Accepted. Billing Subscription transfer is in progress.", + "description": "Accepted. Billing subscription merge is in progress.", "headers": { "Location": { "description": "Location URI to poll for result.", @@ -334,31 +484,29 @@ "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" + "format": "int64" } } }, "default": { - "description": "Unexpected error.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/validateMoveEligibility": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/split": { "post": { + "operationId": "BillingSubscriptions_Split", + "x-ms-long-running-operation": true, + "description": "Splits a subscription into a new subscription with quantity less than current subscription quantity and not equal to 0.", "x-ms-examples": { - "SubscriptionMoveValidateSuccess": { - "$ref": "./examples/ValidateSubscriptionMoveSuccess.json" - }, - "SubscriptionMoveValidateFailure": { - "$ref": "./examples/ValidateSubscriptionMoveFailure.json" + "SplitSubscription": { + "$ref": "./examples/SplitSubscription.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/" }, @@ -367,32 +515,46 @@ "$ref": "#/parameters/billingAccountNameParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/TransferBillingSubscriptionRequestProperties" + "$ref": "#/definitions/BillingSubscriptionSplitRequest" }, - "description": "Request parameters that are provided to the validate move eligibility operation." + "description": "Request parameters that are provided to split the billing subscription." } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/ValidateSubscriptionTransferEligibilityResult" + "$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": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -400,178 +562,82 @@ } }, "definitions": { - "TransferBillingSubscriptionRequestProperties": { + "AccountOwnershipTransferRequest": { "type": "object", - "description": "Request parameters to transfer billing subscription.", - "required": [ - "destinationInvoiceSectionId" - ], + "description": "Request parameters to transfer account ownership of billing subscription.", "properties": { - "destinationInvoiceSectionId": { + "targetEnrollmentAccountName": { "type": "string", - "description": "The destination invoice section id." + "description": "The destination account to which the subscriptions are transferred." + }, + "transferSubscriptionTenant": { + "description": "This flag is false by default. By not setting this flag, it implies to move the new subscriptions to new account's Azure AD tenant. ", + "enum": [ + "true", + "false" + ], + "type": "string", + "x-ms-enum": { + "name": "transferSubscriptionTenant", + "modelAsString": true + } + }, + "billingSubscriptionId": { + "type": "string", + "description": "This is optional parameter. The ID of the specific billing subscription that needs to be transferred. If this is not provided, all the subscriptions under the account shall be transferred to the destination account." } } }, - "ValidateSubscriptionTransferEligibilityResult": { + "AccountOwnershipTransferResult": { "type": "object", - "description": "Result of the transfer eligibility validation.", + "description": "Result of the transfer subscription operation.", "properties": { - "isMoveEligible": { - "description": "Specifies whether the subscription is eligible to be transferred.", - "type": "boolean", - "readOnly": true + "transferTrackingGuid": { + "type": "string", + "description": "The tracking guid for transfer request." }, - "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" + "billingSubscriptionId": { + "type": "string", + "description": "The billing subscription ID provided in the transfer request. This is an optional field." }, - "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.", + "status": { "type": "string", - "readOnly": true + "description": "The status of the transfer." }, - "message": { - "description": "Error message indicating why the operation failed.", + "errorCode": { "type": "string", - "readOnly": true + "description": "The error code for the transfer request." }, - "target": { - "description": "The target of the particular error.", + "errorMessage": { "type": "string", - "readOnly": true + "description": "The error message for the status of transfer request." }, - "details": { - "description": "The sub details of the error.", - "readOnly": true, - "$ref": "#/definitions/ErrorSubDetails" + "initiationDate": { + "type": "string", + "description": "The date of initiation of transfer request." } } }, - "ErrorResponse": { - "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "Amount": { + "description": "The amount.", "type": "object", + "readOnly": true, "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.", + "currency": { + "description": "The currency for the amount value.", "type": "string", "readOnly": true }, - "description": { - "description": "The name of the reseller.", - "type": "string", + "value": { + "description": "Amount value.", + "type": "number", "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.", + "type": "object", "properties": { "value": { "description": "The list of billing subscriptions.", @@ -581,12 +647,6 @@ "$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", @@ -599,7 +659,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "./types.json#/definitions/Resource" } ], "properties": { @@ -612,131 +672,421 @@ }, "BillingSubscriptionProperties": { "description": "The billing properties of a subscription.", + "type": "object", "properties": { - "displayName": { - "description": "The name of the subscription.", - "type": "string", + "extendedProperties": { + "type": "object", + "description": "Dictionary of additional properties associated with the subscription.", + "additionalProperties": { + "type": "string" + }, + "maxItems": 50, "readOnly": true }, - "subscriptionId": { - "description": "The ID of the subscription.", + "autoRenew": { + "description": "Indicates whether auto renewal is turned on or off for a product.", "type": "string", - "format": "uuid", - "readOnly": true + "enum": [ + "Off", + "On" + ], + "x-ms-enum": { + "name": "AutoRenew", + "modelAsString": true + } + }, + "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" }, - "subscriptionBillingStatus": { - "description": "The current billing status of the subscription.", + "billingProfileDisplayName": { + "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 + }, + "billingFrequency": { + "description": "The billing frequency in ISO8601 format of product in the subscription. Example: P1M, P3M, P1Y", + "type": "string" + }, + "billingProfileSpendingLimit": { + "description": "The spending limit that is set on the billing profile to which the subscription is billed.", "enum": [ - "Active", - "Inactive", - "Abandoned", - "Deleted", - "Warning" + "Off", + "On" ], + "type": "string", "x-ms-enum": { - "name": "BillingSubscriptionStatusType", + "name": "BillingProfileSpendingLimit", "modelAsString": true - } + }, + "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", + "readOnly": true + }, + "enrollmentAccountId": { + "description": "The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement Type 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 Type 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 Type billing accounts.", + "readOnly": true + }, + "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 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 charges.", + "description": "The last month charges. This field is only available for consumption subscriptions of Microsoft Customer Agreement billing accounts.", "readOnly": true, "$ref": "#/definitions/Amount" }, "monthToDateCharges": { - "description": "The current month to date charges.", + "description": "The current month to date charges. This field is only available for consumption subscriptions of Microsoft Customer Agreement billing accounts.", "readOnly": true, "$ref": "#/definitions/Amount" }, - "billingProfileId": { - "description": "The ID of the billing profile to which the subscription is billed.", - "type": "string", - "readOnly": true + "nextBillingCycleDetails": { + "description": "Next billing cycle details of the subscription.", + "type": "object", + "readOnly": true, + "$ref": "#/definitions/NextBillingCycleDetails" }, - "billingProfileDisplayName": { - "description": "The name of the billing profile to which the subscription is billed.", + "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 }, - "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.", + "productCategory": { + "description": "Category of the subscription. Possible values include: Consumption, SaaS, AzureSupport, AzureReservationOrder, AzureSavingsPlan, Hardware, M365", "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.", + "productType": { + "description": "Type of the product for which the subscription is purchased", "type": "string", "readOnly": true }, - "invoiceSectionId": { - "description": "The ID of the invoice section to which the subscription is billed.", + "productTypeId": { + "description": "Id of the product for which the subscription is purchased", + "type": "string" + }, + "publisherName": { + "description": "The organization that published the product for which the subscription is purchased.", "type": "string", "readOnly": true }, - "invoiceSectionDisplayName": { - "description": "The name of the invoice section to which the subscription is billed.", + "purchaseDate": { "type": "string", + "format": "date-time", + "description": "Purchase date of the product in UTC time.", "readOnly": true }, + "quantity": { + "description": "The number of licenses purchased for the subscription", + "type": "integer", + "format": "int64" + }, "reseller": { - "description": "Reseller for this subscription.", + "description": "Reseller for this subscription. The fields is not available for Microsoft Partner Agreement billing accounts.", "readOnly": true, "$ref": "#/definitions/Reseller" }, + "skuDescription": { + "description": "The SKU description of the product for which the subscription is purchased. This field is is only available for Microsoft Customer Agreement billing accounts.", + "type": "string", + "readOnly": true + }, "skuId": { - "description": "The sku ID of the Azure plan for the subscription.", + "description": "The SKU ID of the product for which the subscription is purchased. This field is is only available for Microsoft Customer Agreement billing accounts.", "type": "string" }, - "skuDescription": { - "description": "The sku description of the Azure plan for the subscription.", + "status": { + "description": "The status of the subscription. This field is not available for Enterprise Agreement billing accounts.", + "type": "string", + "enum": [ + "Unknown", + "Active", + "Disabled", + "Deleted", + "PastDue", + "Expiring", + "Expired", + "AutoRenew", + "Cancelled", + "Suspended" + ], + "readOnly": true, + "x-ms-enum": { + "name": "BillingSubscriptionStatus", + "modelAsString": true + } + }, + "consumptionSubscriptionId": { + "description": "The ID of the consumption subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement Type billing accounts.", "type": "string", "readOnly": true }, "suspensionReasons": { - "description": "The suspension reason for a subscription. Applies only to subscriptions in Microsoft Online Services Program billing accounts.", + "description": "The suspension reason for a subscription. This field is not available for Enterprise Agreement billing accounts.", "type": "array", "readOnly": true, "items": { "type": "string" } + }, + "tenantId": { + "description": "The id of the tenant in which the product is used.", + "type": "string", + "readOnly": true + }, + "termDuration": { + "description": "The duration for which you can use the subscription. Example P1Y and P1M", + "type": "string" + }, + "termStartDate": { + "type": "string", + "format": "date-time", + "description": "Start date of the term in UTC time.", + "readOnly": true + }, + "termEndDate": { + "type": "string", + "format": "date-time", + "description": "End date of the term in UTC time.", + "readOnly": true } } }, - "Amount": { - "description": "The amount.", + "BillingSubscriptionMergeRequest": { + "description": "Request to merge two billing subscriptions", + "type": "object", "properties": { - "currency": { - "description": "The currency for the amount value.", + "targetBillingSubscriptionId": { + "description": "The ID of the target billing subscription with which the billing subscription in request will be merged.", + "type": "string" + }, + "quantity": { + "description": "The quantity of the product of target subscription to which the subscription in request needs to be merged into.", + "type": "integer", + "format": "int32" + } + } + }, + "BillingSubscriptionSplitRequest": { + "description": "Request to split a billing subscription", + "type": "object", + "properties": { + "billingFrequency": { + "description": "The billing frequency in ISO8601 format of the target product to which the subscription needs to be split into. 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" + }, + "term": { + "description": "The term 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. Available only for the Enterprise Agreement Type.", + "type": "object", + "readOnly": true, + "properties": { + "subscriptionEnrollmentAccountStatus": { + "description": "The current enrollment account status of the subscription. This field is available only for the Enterprise Agreement Type. ", + "type": "string", + "readOnly": true, + "enum": [ + "Active", + "Cancelled", + "Expired", + "Deleted", + "TransferredOut", + "Transferring" + ], + "x-ms-enum": { + "name": "BillingEnrollmentAccountSubscriptionStatusType", + "modelAsString": true + } + }, + "enrollmentAccountStartDate": { + "description": "The enrollment Account and the subscription association start date. This field is available only for the Enterprise Agreement Type.", + "type": "string", + "readOnly": true + } + } + }, + "NextBillingCycleDetails": { + "description": "Billing cycle details of the product.", + "type": "object", + "readOnly": true, + "properties": { + "billingFrequency": { + "description": "Billing frequency of the product under the subscription.", + "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 }, - "value": { - "description": "Amount value.", - "type": "number" + "description": { + "description": "The name of the reseller.", + "type": "string", + "readOnly": true } } - } - }, - "parameters": { - "apiVersionParameter": { - "name": "api-version", - "in": "query", - "required": 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." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "SubscriptionTransferValidationErrorCode": { "type": "string", - "description": "The version of the API to be used with the client request. The current version is 2020-05-01." + "description": "Error code of the transfer validation response.", + "enum": [ + "InvalidSource", + "SubscriptionNotActive", + "InsufficientPermissionOnSource", + "InsufficientPermissionOnDestination", + "DestinationBillingProfilePastDue", + "SubscriptionTypeNotSupported", + "CrossBillingAccountNotAllowed", + "NotAvailableForDestinationMarket" + ], + "x-ms-enum": { + "name": "subscriptionTransferValidationErrorCode", + "modelAsString": true + } }, - "subscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "description": "The ID that uniquely identifies an Azure subscription.", - "required": true, - "type": "string" + "TransferBillingSubscriptionRequestProperties": { + "type": "object", + "description": "Request parameters to transfer billing subscription.", + "properties": { + "destinationInvoiceSectionId": { + "type": "string", + "description": "The destination invoice section id." + }, + "destinationBillingProfileId": { + "type": "string", + "description": "The destination billing profile id." + } + } }, + "ValidateSubscriptionTransferEligibilityResult": { + "type": "object", + "description": "Result of the transfer eligibility validation.", + "properties": { + "isTransferEligible": { + "description": "Specifies whether the subscription is eligible to be transferred.", + "enum": [ + "true", + "false" + ], + "type": "string", + "x-ms-enum": { + "name": "isTransferEligible", + "modelAsString": true + }, + "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" + } + } + } + }, + "parameters": { "billingAccountNameParameter": { "name": "billingAccountName", "in": "path", @@ -745,10 +1095,10 @@ "type": "string", "x-ms-parameter-location": "method" }, - "invoiceSectionNameParameter": { - "name": "invoiceSectionName", + "transferTrackingGuidParameter": { + "name": "transferTrackingGuid", "in": "path", - "description": "The ID that uniquely identifies an invoice section.", + "description": "The ID that uniquely identifies a billing subscription transfer request.", "required": true, "type": "string", "x-ms-parameter-location": "method" @@ -761,6 +1111,22 @@ "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", @@ -768,6 +1134,30 @@ "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": [ diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json new file mode 100644 index 000000000000..5730bdba3e66 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json @@ -0,0 +1,260 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-10-01", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources and logs for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/aliases": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_ListByBillingAccount", + "description": "Lists the subscription aliases for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement or Enterprise Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionAliasListByBillingAccount": { + "$ref": "./examples/BillingSubscriptionAliasListByBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "./billingSubscription.json#/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}/billingSubscriptions/aliases/{aliasName}": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_Get", + "description": "Gets a subscription by its alias 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": { + "BillingSubscriptionAlias": { + "$ref": "./examples/BillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "./billingSubscription.json#/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_Put", + "x-ms-long-running-operation": true, + "description": "Creates or updates a billing subscription by its alias ID.", + "x-ms-examples": { + "PutBillingSubscription": { + "$ref": "./examples/PutBillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "./billingSubscription.json#/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" + } + }, + "201": { + "description": "Created. Billing subscription creation 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" + } + } + }, + "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": { + "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 of the subscription alias.", + "type": "string", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "./billingSubscription.json#/definitions/BillingSubscriptionProperties" + } + ] + } + }, + "parameters": { + "billingSubscriptionAliasNameParameter": { + "name": "billingSubscriptionAliasName", + "in": "path", + "description": "The ID that uniquely identifies a subscription alias.", + "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 index 82f9307e93a9..599f0b8ece26 100644 --- 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 @@ -1,19 +1,23 @@ { "parameters": { - "api-version": "2020-05-01", + "version": "2021-10-01", "billingAccountName": "{billingAccountName}", - "subscriptionId": "{subscriptionId}" + "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}", - "name": "{subscriptionId}", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "name": "418b0e9c-5dc3-4260-918f-30b90619fe07", "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", "properties": { - "displayName": "My Subscription", - "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", - "subscriptionBillingStatus": "Active", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "consumptionCostCenter": "ABC1234", + "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "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", "lastMonthCharges": { "currency": "USD", "value": 5000.00 @@ -22,15 +26,17 @@ "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", + "productCategory": "UsageBasedSubscription", + "productType": "AzureAccessPass", + "productTypeId": "DZH318Z0BPS6", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, "skuId": "0001", - "skuDescription": "Microsoft Azure Plan" + "skuDescription": "Azure Plan", + "status": "Active" } } } } -} +} \ 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..cc2e821df6cf --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAlias.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionAliasName": "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": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "billingFrequency": "P1M", + "consumptionCostCenter": "ABC1234", + "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "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", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBasedSubscription", + "productType": "AzureAccessPass", + "productTypeId": "DZH318Z0BPS6", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Azure Plan", + "status": "Active" + } + } + } + } +} 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..762302053e0b --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAliasListByBillingAccount.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073/billingSubscriptionAliases/c356b7c7-7545-4686-b843-c1a49cf853fc", + "name": "c356b7c7-7545-4686-b843-c1a49cf853fc", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptionAliases", + "properties": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/c356b7c7-7545-4686-b843-c1a49cf853fc", + "billingFrequency": "P1M", + "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "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", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBasedSubscription", + "productType": "AzureAccessPass", + "productTypeId": "DZH318Z0BPS6", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Azure Plan", + "status": "Active" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073/billingSubscriptionAliases/ec16a54e-e8ad-4c14-8e87-e30e75fa800e", + "name": "ec16a54e-e8ad-4c14-8e87-e30e75fa800e", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptionAliases", + "properties": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "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", + "lastMonthCharges": { + "currency": "USD", + "value": 1000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 400 + }, + "productCategory": "UsageBasedSubscription", + "productType": "AzureAccessPass", + "productTypeId": "DZH318Z0BPS6", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Azure Plan", + "status": "Active" + } + }, + { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073/billingSubscriptionAliases/2ee97fe0-efca-4960-a9af-98a30c2c497c", + "name": "2ee97fe0-efca-4960-a9af-98a30c2c497c", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptionAliases", + "properties": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "consumptionSubscriptionId": "6b96d3f2-4a9d-9008-912f-f87744185aa3", + "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", + "lastMonthCharges": { + "currency": "USD", + "value": 6000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 900 + }, + "productCategory": "M365", + "productType": "PASS", + "productTypeId": "CFQ7TTC0LDPB", + "publisherName": "Microsoft Corporation", + "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 index 93283f3627e2..6001c6c8ec3c 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2020-05-01", + "version": "2021-10-01", "billingAccountName": "{billingAccountName}" }, "responses": { @@ -8,13 +8,17 @@ "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", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "name": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptions", "properties": { - "displayName": "My subscription", - "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", - "subscriptionBillingStatus": "Active", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingFrequency": "P1M", + "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "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", "lastMonthCharges": { "currency": "USD", "value": 5000.00 @@ -23,23 +27,29 @@ "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", + "productCategory": "UsageBasedSubscription", + "productType": "AzureAccessPass", + "productTypeId": "DZH318Z0BPS6", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, "skuId": "0001", - "skuDescription": "Microsoft Azure Plan" + "skuDescription": "Azure Plan", + "status": "Active" } }, { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/90000000-0000-0000-0000-000000000001", - "name": "90000000-0000-0000-0000-000000000001", - "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "type": "Microsoft.Billing/billingSubscriptions", "properties": { - "displayName": "Test subscription", - "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", - "subscriptionBillingStatus": "Active", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingFrequency": "P1M", + "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "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", "lastMonthCharges": { "currency": "USD", "value": 1000.00 @@ -48,23 +58,29 @@ "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", + "productCategory": "UsageBasedSubscription", + "productType": "AzureAccessPass", + "productTypeId": "DZH318Z0BPS6", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, "skuId": "0001", - "skuDescription": "Microsoft Azure Plan" + "skuDescription": "Azure Plan", + "status": "Active" } }, { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/90000000-0000-0000-0000-000000000002", - "name": "90000000-0000-0000-0000-000000000002", - "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}billingSubscriptions/7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "name": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "type": "Microsoft.Billing/billingSubscriptions", "properties": { - "displayName": "Dev Subscription", - "subscriptionId": "6b96d3f2-4a9d-9008-912f-f87744185aa3", - "subscriptionBillingStatus": "Active", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingFrequency": "P1M", + "consumptionSubscriptionId": "6b96d3f2-4a9d-9008-912f-f87744185aa3", + "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", "lastMonthCharges": { "currency": "USD", "value": 6000.00 @@ -73,17 +89,22 @@ "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", + "productCategory": "M365", + "productType": "PASS", + "productTypeId": "CFQ7TTC0LDPB", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", + "quantity": 4, "skuId": "0001", - "skuDescription": "Microsoft Azure Plan" + "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/BillingSubscriptionsListByBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingProfile.json deleted file mode 100644 index ac88af9bc396..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByBillingProfile.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "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 index 966ab091b901..949f0109a557 100644 --- 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 @@ -1,21 +1,23 @@ { "parameters": { - "api-version": "2020-05-01", + "version": "2021-10-01", "billingAccountName": "{billingAccountName}", - "customerName": "{customerName}" + "customerName": "e259ec08-fc9f-481c-a052-8b0c83a3a051" }, "responses": { "200": { "body": { "value": [ { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId1", - "name": "billingSubscriptionId1", - "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", + "name": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "type": "Microsoft.Billing/billingSubscriptions", "properties": { - "displayName": "My subscription", - "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", - "subscriptionBillingStatus": "Active", + "billingFrequency": "P1M", + "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/e259ec08-fc9f-481c-a052-8b0c83a3a051", + "customerDisplayName": "Customer 1", + "displayName": "Subscription 1", "lastMonthCharges": { "currency": "USD", "value": 5000.00 @@ -24,25 +26,30 @@ "currency": "USD", "value": 600.00 }, - "costCenter": "ABC1234", - "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", - "customerDisplayName": "Customer1", + "productCategory": "UsageBasedSubscription", + "productType": "AzureAccessPass", + "productTypeId": "DZH318Z0BPS6", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, "reseller": { "resellerId": "89e87bdf-a2a2-4687-925f-4c18b27bccfd", "description": "Reseller1" }, - "skuId": "0002", - "skuDescription": "Microsoft Azure Plan for DevTest" + "skuId": "0001", + "skuDescription": "Azure Plan", + "status": "Active" } }, { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/billinSubscriptionId2", - "name": "billingSubscriptionId2", - "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "type": "Microsoft.Billing/billingSubscriptions", "properties": { - "displayName": "Test subscription", - "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", - "subscriptionBillingStatus": "Active", + "billingFrequency": "P1M", + "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/e259ec08-fc9f-481c-a052-8b0c83a3a051", + "customerDisplayName": "Customer 1", + "displayName": "Subscription 2", "lastMonthCharges": { "currency": "USD", "value": 1000.00 @@ -51,19 +58,26 @@ "currency": "USD", "value": 400 }, - "costCenter": "ABC1234", - "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", - "customerDisplayName": "Customer1", + "productCategory": "M365", + "productType": "PASS", + "productTypeId": "CFQ7TTC0LDPB", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", + "quantity": 4, "reseller": { - "resellerId": "3b65b5a8-bd4f-4084-90e9-e1bd667a2b19", - "description": "Reseller3" + "resellerId": "89e87bdf-a2a2-4687-925f-4c18b27bccfd", + "description": "Reseller1" }, - "skuId": "0002", - "skuDescription": "Microsoft Azure Plan for DevTest" + "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/BillingSubscriptionsListByInvoiceSection.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByInvoiceSection.json deleted file mode 100644 index b2f82cede0d2..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByInvoiceSection.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "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" - } - } - ] - } - } - } -} 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..3dc90ce59940 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/DeleteBillingSubscription.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "9e030ae5-51ed-4e02-8e17-d51b3aa55980" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingFrequency": "P1M", + "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", + "productCategory": "M365", + "productType": "PASS", + "productTypeId": "CFQ7TTC0LDPB", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", + "quantity": 4, + "skuId": "0001", + "skuDescription": "Microsoft 365 Business Standard", + "status": "Cancelled", + "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/deleteBillingSubscription_9e030ae5-51ed-4e02-8e17-d51b3aa55980:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2020-11-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..442a1cb25701 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MergeSubscription.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", + "parameters": { + "quantity": 4, + "targetBillingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/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": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingFrequency": "P1M", + "displayName": "Subscription q", + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "invoiceSectionDisplayName": "Contoso operations invoice section", + "productCategory": "M365", + "productType": "PASS", + "productTypeId": "CFQ7TTC0LDPB", + "publisherName": "Microsoft Corporation", + "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=2020-12-15-privatepreview", + "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..e75248691232 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/MoveBillingSubscription.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "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": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingFrequency": "P1M", + "consumptionCostCenter": "ABC1234", + "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "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", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBasedSubscription", + "productType": "AzureAccessPass", + "productTypeId": "DZH318Z0BPS6", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Azure Plan", + "status": "Active" + } + } + }, + "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=2020-12-15-privatepreview", + "Retry-After": "30" + } + } + } +} 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..2b9a8b646429 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PutBillingSubscriptionAlias.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionAliasName": "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", + "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}/billingSubscriptionAliases/c356b7c7-7545-4686-b843-c1a49cf853fc", + "name": "c356b7c7-7545-4686-b843-c1a49cf853fc", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptionAliases", + "properties": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "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", + "productCategory": "M365", + "productType": "PASS", + "productTypeId": "CFQ7TTC0LDPB", + "publisherName": "Microsoft Corporation", + "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=2020-12-15-privatepreview", + "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..6135eef2c1f8 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/SplitSubscription.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "parameters": { + "billingFrequency": "P1M", + "quantity": 4, + "targetProductTypeId": "CFQ7TTC0LDPB", + "targetSkuId": "0001", + "term": "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", + "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", + "productCategory": "M365", + "productType": "PASS", + "productTypeId": "CFQ7TTC0LDPB", + "publisherName": "Microsoft Corporation", + "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/splitBillingSubscription_7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2020-12-15-privatepreview", + "Retry-After": "30" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/TransferAccountOwnership.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/TransferAccountOwnership.json new file mode 100644 index 000000000000..dcc96fe4be1c --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/TransferAccountOwnership.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "enrollmentAccountName": "789012", + "parameters": { + "targetEnrollmentAccountName": "345678", + "transferSubscriptionTenant": "false", + "billingSubscriptionId": "9dfd08c2-62a3-4d47-85bd-1cdba1408402" + } + }, + "responses": { + "200": { + "body": { + "transferTrackingGuid": "22bd364f-9a7c-45bb-a5c1-3f56add77ab0", + "billingSubscriptionId": "9dfd08c2-62a3-4d47-85bd-1cdba1408402", + "status": "Initiated", + "errorCode": "None", + "errorMessage": "None", + "initiationDate": "2021-04-23 10:25:15.1666667" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/transferBillingSubscriptions_f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2020-12-15-privatepreview", + "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..d5f2bef06c52 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/UpdateBillingSubscription.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07", + "parameters": { + "properties": { + "consumptionCostCenter": "ABC1234" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", + "properties": { + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileDisplayName": "Contoso operations billing profile", + "billingFrequency": "P1M", + "consumptionCostCenter": "ABC1234", + "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "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", + "lastMonthCharges": { + "currency": "USD", + "value": 5000.00 + }, + "monthToDateCharges": { + "currency": "USD", + "value": 600 + }, + "productCategory": "UsageBasedSubscription", + "productType": "AzureAccessPass", + "productTypeId": "DZH318Z0BPS6", + "publisherName": "Microsoft Corporation", + "purchaseDate": "2021-10-01T00:00:00Z", + "quantity": 1, + "skuId": "0001", + "skuDescription": "Azure Plan", + "status": "Active" + } + } + } + } +} 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..4f1b72c0d287 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveFailure.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "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", + "destinationBillingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/e004d7ce-feca-4341-97c9-9f11cae37858" + } + }, + "responses": { + "200": { + "body": { + "isTransferEligible": "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..0c5d7aae094f --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/ValidateSubscriptionMoveSuccess.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "version": "2021-10-01", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "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", + "destinationBillingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/e004d7ce-feca-4341-97c9-9f11cae37858" + } + }, + "responses": { + "200": { + "body": { + "isTransferEligible": "true" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/operations.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/operations.json new file mode 100644 index 000000000000..85eedabf9332 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/operations.json @@ -0,0 +1,126 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-10-01", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources and logs for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists the available billing REST API operations.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "./types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "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.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Billing REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "type": "object", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Billing.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed such as invoice and billing subscription.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type such as read, write and delete.", + "type": "string", + "readOnly": true + } + } + } + } + } + }, + "parameters": {}, + "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/types.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json new file mode 100644 index 000000000000..f5c72829120c --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json @@ -0,0 +1,122 @@ +{ + "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.", + "readOnly": true, + "$ref": "#/definitions/ErrorSubDetails" + } + } + }, + "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 + } + } + } + }, + "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." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "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 2020-11-01-privatepreview." + } + }, + "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" + } + } + } +} From 3d21d05b624276912776888421fcb7b5d61bce93 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 2 Sep 2021 10:43:58 -0700 Subject: [PATCH 02/36] avocado fixes --- .../2021-10-01/billingSubscription.json | 118 +++++++++++++++- .../2021-10-01/billingSubscriptionAlias.json | 2 +- .../stable/2021-10-01/operations.json | 126 ------------------ .../stable/2021-10-01/types.json | 1 + .../billing/resource-manager/readme.md | 10 ++ 5 files changed, 128 insertions(+), 129 deletions(-) delete mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/operations.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 index 29b4909511e7..2d8c700a4780 100644 --- 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 @@ -150,6 +150,10 @@ ], "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-long-running-operation": true, + "x-ms-long-running-operation-options":{ + "final-state-via" : "location" + }, "x-ms-examples": { "UpdateBillingSubscription": { "$ref": "./examples/UpdateBillingSubscription.json" @@ -211,6 +215,9 @@ "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" @@ -271,6 +278,9 @@ }, "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" @@ -336,7 +346,7 @@ "$ref": "./examples/ValidateSubscriptionMoveFailure.json" } }, - "operationId": "BillingSubscriptions_ValidateMove", + "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/" @@ -380,8 +390,11 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/transferBillingSubscriptions": { "post": { "description": "Moves subscriptions to target enrollmentAccount. The target enrollmentAccount and source enrollmentAccount must be associated to the same Billing Account. This operation is supported only for subscriptions that are purchased with a recurring charge and for billing accounts with agreement type Microsoft Enterprise Agreement.", - "operationId": "BillingSubscriptions_AccountOwnershipTransfer", + "operationId": "TransferBillingSubscriptions", "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options":{ + "final-state-via" : "location" + }, "x-ms-examples": { "TransferBillingSubscription": { "$ref": "./examples/TransferAccountOwnership.json" @@ -438,6 +451,9 @@ "post": { "operationId": "BillingSubscriptions_Merge", "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options":{ + "final-state-via" : "location" + }, "description": "Merges two existing subscriptions into a new subscription with quantity greater than the existing subscriptions individually.", "x-ms-examples": { "MergeSubscription": { @@ -501,6 +517,9 @@ "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": { @@ -559,6 +578,40 @@ } } } + }, + "/providers/Microsoft.Billing/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists the available billing REST API operations.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "./types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { @@ -1084,6 +1137,67 @@ "type": "string" } } + }, + "Operation": { + "description": "A Billing REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Identifies if the operation is a data operation.", + "type": "boolean", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "type": "object", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Billing.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed such as invoice and billing subscription.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type such as read, write and delete.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Description of operation.", + "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.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } } }, "parameters": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json index 5730bdba3e66..40ca398bf733 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json @@ -103,7 +103,7 @@ "tags": [ "BillingSubscriptionsAliases" ], - "operationId": "BillingSubscriptionsAliases_Put", + "operationId": "BillingSubscriptionsAliases_Create", "x-ms-long-running-operation": true, "description": "Creates or updates a billing subscription by its alias ID.", "x-ms-examples": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/operations.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/operations.json deleted file mode 100644 index 85eedabf9332..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/operations.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-10-01", - "title": "BillingManagementClient", - "description": "Billing client provides access to billing resources and logs for Azure subscriptions." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/providers/Microsoft.Billing/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "Lists the available billing REST API operations.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/billing/" - }, - "parameters": [ - { - "$ref": "./types.json#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "definitions": { - "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.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Operation" - } - }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "readOnly": true - } - } - }, - "Operation": { - "description": "A Billing REST API operation.", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string", - "readOnly": true - }, - "display": { - "description": "The object that represents the operation.", - "type": "object", - "properties": { - "provider": { - "description": "Service provider: Microsoft.Billing.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed such as invoice and billing subscription.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type such as read, write and delete.", - "type": "string", - "readOnly": true - } - } - } - } - } - }, - "parameters": {}, - "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/types.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json index f5c72829120c..7d5ab856313b 100644 --- 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 @@ -43,6 +43,7 @@ } }, "ErrorSubDetails": { + "description": "The sub details of the error.", "type": "array", "items": { "type": "object", diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 83c64370e22e..68539d780956 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -29,6 +29,16 @@ openapi-type: arm tag: package-2020-05 ``` +### Tag: package-2021-10 + +These settings apply only when `--tag=package-2021-10` is specified on the command line. + +``` yaml $(tag) == 'package-2021-10' +input-file: +- Microsoft.Billing/stable/2021-10-01/billingSubscription.json +- Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json +``` + ### Tag: package-2020-05 These settings apply only when `--tag=package-2020-05` is specified on the command line. From 7c8f7f6cb8fd5e6990e17bbbdcd690b41b8497f1 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:13:41 -0700 Subject: [PATCH 03/36] avocado fix --- .../2021-10-01/billingSubscription.json | 26 ------------------- .../stable/2021-10-01/types.json | 4 --- 2 files changed, 30 deletions(-) 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 index 2d8c700a4780..36206428f11a 100644 --- 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 @@ -1039,32 +1039,6 @@ } } }, - "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." - }, - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "readOnly": true - } - }, - "x-ms-azure-resource": true - }, "SubscriptionTransferValidationErrorCode": { "type": "string", "description": "Error code of the transfer validation response.", 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 index 7d5ab856313b..f728865dc362 100644 --- 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 @@ -84,10 +84,6 @@ "readOnly": true, "type": "string", "description": "Resource type." - }, - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "readOnly": true } }, "x-ms-azure-resource": true From 8755209f3fd54faa4a7a907ce8a7248dee4aedae Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:21:54 -0700 Subject: [PATCH 04/36] AutoRest fix: Added systemData back to "Resource" type --- .../Microsoft.Billing/stable/2021-10-01/types.json | 4 ++++ 1 file changed, 4 insertions(+) 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 index f728865dc362..7d5ab856313b 100644 --- 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 @@ -84,6 +84,10 @@ "readOnly": true, "type": "string", "description": "Resource type." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true } }, "x-ms-azure-resource": true From aba3f179deb6814472e0e7fd93308f0137ac5245 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:38:55 -0700 Subject: [PATCH 05/36] Merged 2021-10-01 swagger files into billing.json --- ...{billingSubscription.json => billing.json} | 355 ++++++++++++++++-- .../2021-10-01/billingSubscriptionAlias.json | 260 ------------- .../stable/2021-10-01/types.json | 123 ------ .../billing/resource-manager/readme.md | 3 +- 4 files changed, 334 insertions(+), 407 deletions(-) rename specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/{billingSubscription.json => billing.json} (79%) delete mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json delete 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/billing.json similarity index 79% rename from specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json rename to specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billing.json index 36206428f11a..d21b19ee899a 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billing.json @@ -39,7 +39,7 @@ "$ref": "#/parameters/customerNameParameter" }, { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" } ], "responses": { @@ -52,7 +52,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } }, @@ -81,7 +81,7 @@ "$ref": "#/parameters/billingAccountNameParameter" }, { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" } ], "responses": { @@ -94,7 +94,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } }, @@ -126,7 +126,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" } ], "responses": { @@ -139,7 +139,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -167,7 +167,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -203,7 +203,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -234,7 +234,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" } ], "responses": { @@ -264,7 +264,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -294,7 +294,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -330,7 +330,7 @@ "default": { "description": "Unexpected error.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -359,7 +359,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -381,7 +381,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -441,7 +441,7 @@ "default": { "description": "Unexpected error.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -471,7 +471,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -507,7 +507,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -537,7 +537,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -573,7 +573,166 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/aliases": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_ListByBillingAccount", + "description": "Lists the subscription aliases for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement or Enterprise Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionAliasListByBillingAccount": { + "$ref": "./examples/BillingSubscriptionAliasListByBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/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": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/aliases/{aliasName}": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_Get", + "description": "Gets a subscription by its alias 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": { + "BillingSubscriptionAlias": { + "$ref": "./examples/BillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionAliasNameParameter" + }, + { + "$ref": "#/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": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_Create", + "x-ms-long-running-operation": true, + "description": "Creates or updates a billing subscription by its alias ID.", + "x-ms-examples": { + "PutBillingSubscription": { + "$ref": "./examples/PutBillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingSubscriptionAliasNameParameter" + }, + { + "$ref": "#/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" + } + }, + "201": { + "description": "Created. Billing subscription creation 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" + } + } + }, + "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": "#/definitions/ErrorResponse" } } } @@ -591,7 +750,7 @@ }, "parameters": [ { - "$ref": "./types.json#/parameters/apiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" } ], "responses": { @@ -604,7 +763,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } }, @@ -712,7 +871,7 @@ "type": "object", "allOf": [ { - "$ref": "./types.json#/definitions/Resource" + "$ref": "#/definitions/Resource" } ], "properties": { @@ -1112,6 +1271,57 @@ } } }, + "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": "#/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 of the subscription alias.", + "type": "string", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/BillingSubscriptionProperties" + } + ] + }, "Operation": { "description": "A Billing REST API operation.", "type": "object", @@ -1172,6 +1382,92 @@ "readOnly": true } } + }, + "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.", + "readOnly": true, + "$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." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "x-ms-azure-resource": true } }, "parameters": { @@ -1246,6 +1542,21 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "billingSubscriptionAliasNameParameter": { + "name": "billingSubscriptionAliasName", + "in": "path", + "description": "The ID that uniquely identifies a subscription alias.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "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-11-01-privatepreview." } }, "security": [ diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json deleted file mode 100644 index 40ca398bf733..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-10-01", - "title": "BillingManagementClient", - "description": "Billing client provides access to billing resources and logs for Azure subscriptions." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/aliases": { - "get": { - "tags": [ - "BillingSubscriptionsAliases" - ], - "operationId": "BillingSubscriptionsAliases_ListByBillingAccount", - "description": "Lists the subscription aliases for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement or Enterprise Agreement.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/billing/" - }, - "x-ms-examples": { - "BillingSubscriptionAliasListByBillingAccount": { - "$ref": "./examples/BillingSubscriptionAliasListByBillingAccount.json" - } - }, - "parameters": [ - { - "$ref": "./billingSubscription.json#/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}/billingSubscriptions/aliases/{aliasName}": { - "get": { - "tags": [ - "BillingSubscriptionsAliases" - ], - "operationId": "BillingSubscriptionsAliases_Get", - "description": "Gets a subscription by its alias 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": { - "BillingSubscriptionAlias": { - "$ref": "./examples/BillingSubscriptionAlias.json" - } - }, - "parameters": [ - { - "$ref": "./billingSubscription.json#/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_Create", - "x-ms-long-running-operation": true, - "description": "Creates or updates a billing subscription by its alias ID.", - "x-ms-examples": { - "PutBillingSubscription": { - "$ref": "./examples/PutBillingSubscriptionAlias.json" - } - }, - "parameters": [ - { - "$ref": "./billingSubscription.json#/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" - } - }, - "201": { - "description": "Created. Billing subscription creation 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" - } - } - }, - "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": { - "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 of the subscription alias.", - "type": "string", - "readOnly": true - } - }, - "allOf": [ - { - "$ref": "./billingSubscription.json#/definitions/BillingSubscriptionProperties" - } - ] - } - }, - "parameters": { - "billingSubscriptionAliasNameParameter": { - "name": "billingSubscriptionAliasName", - "in": "path", - "description": "The ID that uniquely identifies a subscription alias.", - "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/types.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json deleted file mode 100644 index 7d5ab856313b..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "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.", - "readOnly": true, - "$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." - }, - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "readOnly": true - } - }, - "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 2020-11-01-privatepreview." - } - }, - "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/readme.md b/specification/billing/resource-manager/readme.md index 68539d780956..555c1c95092f 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -35,8 +35,7 @@ These settings apply only when `--tag=package-2021-10` is specified on the comma ``` yaml $(tag) == 'package-2021-10' input-file: -- Microsoft.Billing/stable/2021-10-01/billingSubscription.json -- Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json +- Microsoft.Billing/stable/2021-10-01/billing.json ``` ### Tag: package-2020-05 From 5e9fac9ddb77a45baf48ad446f682bf433b5d382 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:48:33 -0700 Subject: [PATCH 06/36] Revert "Merged 2021-10-01 swagger files into billing.json" This reverts commit aba3f179deb6814472e0e7fd93308f0137ac5245. --- ...{billing.json => billingSubscription.json} | 355 ++---------------- .../2021-10-01/billingSubscriptionAlias.json | 260 +++++++++++++ .../stable/2021-10-01/types.json | 123 ++++++ .../billing/resource-manager/readme.md | 3 +- 4 files changed, 407 insertions(+), 334 deletions(-) rename specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/{billing.json => billingSubscription.json} (79%) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.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/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json similarity index 79% rename from specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billing.json rename to specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json index d21b19ee899a..36206428f11a 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscription.json @@ -39,7 +39,7 @@ "$ref": "#/parameters/customerNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" } ], "responses": { @@ -52,7 +52,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -81,7 +81,7 @@ "$ref": "#/parameters/billingAccountNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" } ], "responses": { @@ -94,7 +94,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -126,7 +126,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" } ], "responses": { @@ -139,7 +139,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -167,7 +167,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -203,7 +203,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -234,7 +234,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" } ], "responses": { @@ -264,7 +264,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -294,7 +294,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -330,7 +330,7 @@ "default": { "description": "Unexpected error.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -359,7 +359,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -381,7 +381,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -441,7 +441,7 @@ "default": { "description": "Unexpected error.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -471,7 +471,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -507,7 +507,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -537,7 +537,7 @@ "$ref": "#/parameters/billingSubscriptionNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" }, { "name": "parameters", @@ -573,166 +573,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/aliases": { - "get": { - "tags": [ - "BillingSubscriptionsAliases" - ], - "operationId": "BillingSubscriptionsAliases_ListByBillingAccount", - "description": "Lists the subscription aliases for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement or Enterprise Agreement.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/billing/" - }, - "x-ms-examples": { - "BillingSubscriptionAliasListByBillingAccount": { - "$ref": "./examples/BillingSubscriptionAliasListByBillingAccount.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/billingAccountNameParameter" - }, - { - "$ref": "#/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": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/aliases/{aliasName}": { - "get": { - "tags": [ - "BillingSubscriptionsAliases" - ], - "operationId": "BillingSubscriptionsAliases_Get", - "description": "Gets a subscription by its alias 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": { - "BillingSubscriptionAlias": { - "$ref": "./examples/BillingSubscriptionAlias.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/billingAccountNameParameter" - }, - { - "$ref": "#/parameters/billingSubscriptionAliasNameParameter" - }, - { - "$ref": "#/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": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "BillingSubscriptionsAliases" - ], - "operationId": "BillingSubscriptionsAliases_Create", - "x-ms-long-running-operation": true, - "description": "Creates or updates a billing subscription by its alias ID.", - "x-ms-examples": { - "PutBillingSubscription": { - "$ref": "./examples/PutBillingSubscriptionAlias.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/billingAccountNameParameter" - }, - { - "$ref": "#/parameters/billingSubscriptionAliasNameParameter" - }, - { - "$ref": "#/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" - } - }, - "201": { - "description": "Created. Billing subscription creation 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" - } - } - }, - "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": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -750,7 +591,7 @@ }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "./types.json#/parameters/apiVersionParameter" } ], "responses": { @@ -763,7 +604,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -871,7 +712,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "./types.json#/definitions/Resource" } ], "properties": { @@ -1271,57 +1112,6 @@ } } }, - "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": "#/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 of the subscription alias.", - "type": "string", - "readOnly": true - } - }, - "allOf": [ - { - "$ref": "#/definitions/BillingSubscriptionProperties" - } - ] - }, "Operation": { "description": "A Billing REST API operation.", "type": "object", @@ -1382,92 +1172,6 @@ "readOnly": true } } - }, - "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.", - "readOnly": true, - "$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." - }, - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "readOnly": true - } - }, - "x-ms-azure-resource": true } }, "parameters": { @@ -1542,21 +1246,6 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" - }, - "billingSubscriptionAliasNameParameter": { - "name": "billingSubscriptionAliasName", - "in": "path", - "description": "The ID that uniquely identifies a subscription alias.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "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-11-01-privatepreview." } }, "security": [ diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json new file mode 100644 index 000000000000..40ca398bf733 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json @@ -0,0 +1,260 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-10-01", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources and logs for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/aliases": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_ListByBillingAccount", + "description": "Lists the subscription aliases for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement or Enterprise Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionAliasListByBillingAccount": { + "$ref": "./examples/BillingSubscriptionAliasListByBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "./billingSubscription.json#/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}/billingSubscriptions/aliases/{aliasName}": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_Get", + "description": "Gets a subscription by its alias 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": { + "BillingSubscriptionAlias": { + "$ref": "./examples/BillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "./billingSubscription.json#/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_Create", + "x-ms-long-running-operation": true, + "description": "Creates or updates a billing subscription by its alias ID.", + "x-ms-examples": { + "PutBillingSubscription": { + "$ref": "./examples/PutBillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "./billingSubscription.json#/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" + } + }, + "201": { + "description": "Created. Billing subscription creation 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" + } + } + }, + "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": { + "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 of the subscription alias.", + "type": "string", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "./billingSubscription.json#/definitions/BillingSubscriptionProperties" + } + ] + } + }, + "parameters": { + "billingSubscriptionAliasNameParameter": { + "name": "billingSubscriptionAliasName", + "in": "path", + "description": "The ID that uniquely identifies a subscription alias.", + "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/types.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json new file mode 100644 index 000000000000..7d5ab856313b --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json @@ -0,0 +1,123 @@ +{ + "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.", + "readOnly": true, + "$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." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "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 2020-11-01-privatepreview." + } + }, + "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/readme.md b/specification/billing/resource-manager/readme.md index 555c1c95092f..68539d780956 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -35,7 +35,8 @@ These settings apply only when `--tag=package-2021-10` is specified on the comma ``` yaml $(tag) == 'package-2021-10' input-file: -- Microsoft.Billing/stable/2021-10-01/billing.json +- Microsoft.Billing/stable/2021-10-01/billingSubscription.json +- Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json ``` ### Tag: package-2020-05 From 0905f244fc151b5a0573a5862dcf104a8e15e29d Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:56:46 -0700 Subject: [PATCH 07/36] Updated Basic Information in readme.cmd --- specification/billing/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 68539d780956..a03cbf54e898 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -26,7 +26,7 @@ These are the global settings for the Billing API. ``` yaml openapi-type: arm -tag: package-2020-05 +tag: package-2021-10 ``` ### Tag: package-2021-10 From 0e5d37813c7969e25975f0657ca21f9654a8917a Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 2 Sep 2021 13:10:17 -0700 Subject: [PATCH 08/36] Updated productCategory example values --- .../stable/2021-10-01/examples/BillingSubscription.json | 2 +- .../2021-10-01/examples/BillingSubscriptionAlias.json | 2 +- .../BillingSubscriptionAliasListByBillingAccount.json | 2 +- .../examples/BillingSubscriptionsListByBillingAccount.json | 6 +++--- .../examples/BillingSubscriptionsListByCustomer.json | 4 ++-- .../2021-10-01/examples/DeleteBillingSubscription.json | 2 +- .../stable/2021-10-01/examples/MergeSubscription.json | 2 +- .../stable/2021-10-01/examples/MoveBillingSubscription.json | 2 +- .../2021-10-01/examples/PutBillingSubscriptionAlias.json | 2 +- .../stable/2021-10-01/examples/SplitSubscription.json | 2 +- .../2021-10-01/examples/UpdateBillingSubscription.json | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) 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 index 599f0b8ece26..514d61a62fe9 100644 --- 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 @@ -26,7 +26,7 @@ "currency": "USD", "value": 600 }, - "productCategory": "UsageBasedSubscription", + "productCategory": "UsageBased", "productType": "AzureAccessPass", "productTypeId": "DZH318Z0BPS6", "publisherName": "Microsoft Corporation", 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 index cc2e821df6cf..a9a28d187154 100644 --- 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 @@ -28,7 +28,7 @@ "currency": "USD", "value": 600 }, - "productCategory": "UsageBasedSubscription", + "productCategory": "UsageBased", "productType": "AzureAccessPass", "productTypeId": "DZH318Z0BPS6", "publisherName": "Microsoft Corporation", 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 index 762302053e0b..3ec053108c9d 100644 --- 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 @@ -90,7 +90,7 @@ "currency": "USD", "value": 900 }, - "productCategory": "M365", + "productCategory": "SeatBased", "productType": "PASS", "productTypeId": "CFQ7TTC0LDPB", "publisherName": "Microsoft Corporation", 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 index 6001c6c8ec3c..47ab940b9200 100644 --- 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 @@ -27,7 +27,7 @@ "currency": "USD", "value": 600 }, - "productCategory": "UsageBasedSubscription", + "productCategory": "UsageBased", "productType": "AzureAccessPass", "productTypeId": "DZH318Z0BPS6", "publisherName": "Microsoft Corporation", @@ -58,7 +58,7 @@ "currency": "USD", "value": 400 }, - "productCategory": "UsageBasedSubscription", + "productCategory": "UsageBased", "productType": "AzureAccessPass", "productTypeId": "DZH318Z0BPS6", "publisherName": "Microsoft Corporation", @@ -89,7 +89,7 @@ "currency": "USD", "value": 900 }, - "productCategory": "M365", + "productCategory": "SeatBased", "productType": "PASS", "productTypeId": "CFQ7TTC0LDPB", "publisherName": "Microsoft Corporation", 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 index 949f0109a557..6cd5d1851bca 100644 --- 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 @@ -26,7 +26,7 @@ "currency": "USD", "value": 600.00 }, - "productCategory": "UsageBasedSubscription", + "productCategory": "UsageBased", "productType": "AzureAccessPass", "productTypeId": "DZH318Z0BPS6", "publisherName": "Microsoft Corporation", @@ -58,7 +58,7 @@ "currency": "USD", "value": 400 }, - "productCategory": "M365", + "productCategory": "SeatBased", "productType": "PASS", "productTypeId": "CFQ7TTC0LDPB", "publisherName": "Microsoft Corporation", 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 index 3dc90ce59940..17d8bb5ae7cf 100644 --- 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 @@ -17,7 +17,7 @@ "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", - "productCategory": "M365", + "productCategory": "SeatBased", "productType": "PASS", "productTypeId": "CFQ7TTC0LDPB", "publisherName": "Microsoft Corporation", 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 index 442a1cb25701..3a80b34622fb 100644 --- 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 @@ -21,7 +21,7 @@ "displayName": "Subscription q", "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", "invoiceSectionDisplayName": "Contoso operations invoice section", - "productCategory": "M365", + "productCategory": "SeatBased", "productType": "PASS", "productTypeId": "CFQ7TTC0LDPB", "publisherName": "Microsoft Corporation", 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 index e75248691232..882a5fc5943d 100644 --- 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 @@ -30,7 +30,7 @@ "currency": "USD", "value": 600 }, - "productCategory": "UsageBasedSubscription", + "productCategory": "UsageBased", "productType": "AzureAccessPass", "productTypeId": "DZH318Z0BPS6", "publisherName": "Microsoft Corporation", 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 index 2b9a8b646429..e34961e3f21c 100644 --- 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 @@ -30,7 +30,7 @@ "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", - "productCategory": "M365", + "productCategory": "SeatBased", "productType": "PASS", "productTypeId": "CFQ7TTC0LDPB", "publisherName": "Microsoft Corporation", 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 index 6135eef2c1f8..fbc9166f293e 100644 --- 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 @@ -24,7 +24,7 @@ "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", - "productCategory": "M365", + "productCategory": "SeatBased", "productType": "PASS", "productTypeId": "CFQ7TTC0LDPB", "publisherName": "Microsoft Corporation", 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 index d5f2bef06c52..2df9e88516b0 100644 --- 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 @@ -32,7 +32,7 @@ "currency": "USD", "value": 600 }, - "productCategory": "UsageBasedSubscription", + "productCategory": "UsageBased", "productType": "AzureAccessPass", "productTypeId": "DZH318Z0BPS6", "publisherName": "Microsoft Corporation", From 2ad54d366ac36857efdd0217a1cd5209136d0ef0 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 2 Sep 2021 13:13:13 -0700 Subject: [PATCH 09/36] Fixed description typos --- .../stable/2021-10-01/billingSubscription.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 index 36206428f11a..733697ff629e 100644 --- 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 @@ -874,12 +874,12 @@ "$ref": "#/definitions/Reseller" }, "skuDescription": { - "description": "The SKU description of the product for which the subscription is purchased. This field is is only available for Microsoft Customer Agreement billing accounts.", + "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 is only available for Microsoft Customer Agreement billing accounts.", + "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": { From db9ec062ddcf994bfa0f51874fe7aa20f7cceab1 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 7 Oct 2021 10:32:31 -0700 Subject: [PATCH 10/36] Updated BillingSubscriptionProperties --- .../2021-10-01/billingSubscription.json | 158 ++++++++++++++---- 1 file changed, 127 insertions(+), 31 deletions(-) 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 index 733697ff629e..f9467a88dd2f 100644 --- 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 @@ -727,15 +727,6 @@ "description": "The billing properties of a subscription.", "type": "object", "properties": { - "extendedProperties": { - "type": "object", - "description": "Dictionary of additional properties associated with the subscription.", - "additionalProperties": { - "type": "string" - }, - "maxItems": 50, - "readOnly": true - }, "autoRenew": { "description": "Indicates whether auto renewal is turned on or off for a product.", "type": "string", @@ -748,6 +739,10 @@ "modelAsString": true } }, + "billingFrequency": { + "description": "The billing frequency in ISO8601 format of product in the subscription. 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" @@ -757,11 +752,12 @@ "type": "string", "readOnly": true }, - "billingFrequency": { - "description": "The billing frequency in ISO8601 format of product in the subscription. Example: P1M, P3M, P1Y", - "type": "string" + "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 }, - "billingProfileSpendingLimit": { + "billingProfileSpendingLimitDetails": { "description": "The spending limit that is set on the billing profile to which the subscription is billed.", "enum": [ "Off", @@ -789,8 +785,7 @@ }, "displayName": { "description": "The name of the subscription.", - "type": "string", - "readOnly": true + "type": "string" }, "enrollmentAccountId": { "description": "The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement Type billing accounts.", @@ -817,6 +812,10 @@ "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" + }, "lastMonthCharges": { "description": "The last month charges. This field is only available for consumption subscriptions of Microsoft Customer Agreement billing accounts.", "readOnly": true, @@ -830,7 +829,6 @@ "nextBillingCycleDetails": { "description": "Next billing cycle details of the subscription.", "type": "object", - "readOnly": true, "$ref": "#/definitions/NextBillingCycleDetails" }, "offerId": { @@ -839,7 +837,7 @@ "readOnly": true }, "productCategory": { - "description": "Category of the subscription. Possible values include: Consumption, SaaS, AzureSupport, AzureReservationOrder, AzureSavingsPlan, Hardware, M365", + "description": "Category of the subscription. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, Software, UsageBased, Other", "type": "string", "readOnly": true }, @@ -852,11 +850,6 @@ "description": "Id of the product for which the subscription is purchased", "type": "string" }, - "publisherName": { - "description": "The organization that published the product for which the subscription is purchased.", - "type": "string", - "readOnly": true - }, "purchaseDate": { "type": "string", "format": "date-time", @@ -873,6 +866,11 @@ "readOnly": true, "$ref": "#/definitions/Reseller" }, + "renewalTermDetails": { + "description": " ", + "type": "object", + "$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", @@ -890,7 +888,7 @@ "Active", "Disabled", "Deleted", - "PastDue", + "Warned", "Expiring", "Expired", "AutoRenew", @@ -903,8 +901,8 @@ "modelAsString": true } }, - "consumptionSubscriptionId": { - "description": "The ID of the consumption subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement Type billing accounts.", + "subscriptionId": { + "description": "The ID of the usage-based subscription. This field is only available for usage-based subscriptions of Microsoft Customer Agreement Type billing accounts.", "type": "string", "readOnly": true }, @@ -916,11 +914,6 @@ "type": "string" } }, - "tenantId": { - "description": "The id of the tenant in which the product is used.", - "type": "string", - "readOnly": true - }, "termDuration": { "description": "The duration for which you can use the subscription. Example P1Y and P1M", "type": "string" @@ -939,6 +932,77 @@ } } }, + "BillingProfileSpendingLimitDetails": { + "description": "Billing profile spending limit details of the product.", + "type": "object", + "readOnly": true, + "properties": { + "amount": { + "description": "The spending limit value.", + "type": "number", + "readOnly": true + }, + "currency": { + "description": "The spending limit currency.", + "type": "string", + "readOnly": true + }, + "startDate": { + "type": "string", + "format": "date-time", + "description": "Start date of the spending limit.", + "readOnly": true + }, + "endDate": { + "type": "string", + "format": "date-time", + "description": "End date of the spending limit.", + "readOnly": true + }, + "status": { + "description": "The spending limit status.", + "type": "string", + "enum": [ + "Unknown", + "None", + "Active", + "Expired", + "LimitReached", + "LimitRemoved" + ], + "readOnly": true, + "x-ms-enum": { + "name": "BillingSubscriptionCreditStatus", + "modelAsString": true + } + }, + "type": { + "description": "The spending limit type.", + "type": "string", + "enum": [ + "Unknown", + "None", + "FreeAccount", + "AzureForStudents", + "AcademicSponsorship", + "AzureConsumptionCredit", + "AzurePassSponsorship", + "MpnSponsorship", + "MSDN", + "NonProfitSponsorship", + "Sponsorship", + "StartupSponsorship", + "AzureForStudentsStarter", + "VisualStudio" + ], + "readOnly": true, + "x-ms-enum": { + "name": "SpendingLimitType", + "modelAsString": true + } + } + } + }, "BillingSubscriptionMergeRequest": { "description": "Request to merge two billing subscriptions", "type": "object", @@ -999,7 +1063,7 @@ "Transferring" ], "x-ms-enum": { - "name": "BillingEnrollmentAccountSubscriptionStatusType", + "name": "SubscriptionEnrollmentAccountStatus", "modelAsString": true } }, @@ -1022,6 +1086,38 @@ } } }, + "RenewalTermDetails": { + "description": "Renewal term details of the product.", + "type": "object", + "readOnly": true, + "properties": { + "billingFrequency": { + "description": "Billing frequency of the product under the subscription.", + "type": "string", + "readOnly": true + }, + "productId": { + "description": "The ID of the product.", + "type": "string", + "readOnly": true + }, + "quantity": { + "description": "The number of licenses", + "type": "string", + "readOnly": true + }, + "skuId": { + "description": "The SKU ID of the product", + "type": "string", + "readOnly": true + }, + "termDuration": { + "description": "The duration. Example P1Y and P1M", + "type": "string", + "readOnly": true + } + } + }, "Reseller": { "description": "Details of the reseller.", "type": "object", From e1c16742f8f7cbdad678e18ab9bed491332da39c Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Mon, 11 Oct 2021 10:48:58 -0700 Subject: [PATCH 11/36] Updated move types, BillingSubscriptionMergeRequest, EnrollmentAccountSubscriptionDetails, RenewalTermDetails --- .../2021-10-01/billingSubscription.json | 87 +++++++++---------- 1 file changed, 43 insertions(+), 44 deletions(-) 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 index f9467a88dd2f..cddccbd12f59 100644 --- 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 @@ -258,9 +258,6 @@ } } }, - "204": { - "description": "Billing subscription not found." - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -301,7 +298,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/TransferBillingSubscriptionRequestProperties" + "$ref": "#/definitions/MoveBillingSubscriptionRequest" }, "description": "Request parameters that are provided to the move subscription operation." } @@ -366,7 +363,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/TransferBillingSubscriptionRequestProperties" + "$ref": "#/definitions/MoveBillingSubscriptionRequest" }, "description": "Request parameters that are provided to the validate move eligibility operation." } @@ -375,7 +372,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/ValidateSubscriptionTransferEligibilityResult" + "$ref": "#/definitions/ValidateMoveBillingSubscriptionEligibilityResult" } }, "default": { @@ -758,16 +755,9 @@ "readOnly": true }, "billingProfileSpendingLimitDetails": { - "description": "The spending limit that is set on the billing profile to which the subscription is billed.", - "enum": [ - "Off", - "On" - ], - "type": "string", - "x-ms-enum": { - "name": "BillingProfileSpendingLimit", - "modelAsString": true - }, + "x-ms-client-flatten": true, + "$ref": "#/definitions/BillingProfileSpendingLimitDetails", + "title": "The details of the spending limit that is set on the billing profile to which the subscription is billed.", "readOnly": true }, "consumptionCostCenter": { @@ -1007,7 +997,7 @@ "description": "Request to merge two billing subscriptions", "type": "object", "properties": { - "targetBillingSubscriptionId": { + "targetBillingSubscriptionName": { "description": "The ID of the target billing subscription with which the billing subscription in request will be merged.", "type": "string" }, @@ -1069,6 +1059,7 @@ }, "enrollmentAccountStartDate": { "description": "The enrollment Account and the subscription association start date. This field is available only for the Enterprise Agreement Type.", + "format": "date-time", "type": "string", "readOnly": true } @@ -1096,15 +1087,15 @@ "type": "string", "readOnly": true }, - "productId": { + "productTypeId": { "description": "The ID of the product.", "type": "string", "readOnly": true }, "quantity": { "description": "The number of licenses", - "type": "string", - "readOnly": true + "type": "integer", + "format": "int64" }, "skuId": { "description": "The SKU ID of the product", @@ -1135,25 +1126,41 @@ } } }, - "SubscriptionTransferValidationErrorCode": { + "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", - "SubscriptionNotActive", - "InsufficientPermissionOnSource", + "InvoiceSectionIsRestricted", "InsufficientPermissionOnDestination", - "DestinationBillingProfilePastDue", - "SubscriptionTypeNotSupported", - "CrossBillingAccountNotAllowed", - "NotAvailableForDestinationMarket" + "InsufficientPermissionOnSource", + "MarketplaceNotEnabledOnDestination", + "ProductNotFound", + "ProductInactive", + "ProductTypeNotSupported", + "SourceBillingProfilePastDue", + "SourceInvoiceSectionInactive", + "SubscriptionNotActive", + "SubscriptionTypeNotSupported" ], "x-ms-enum": { "name": "subscriptionTransferValidationErrorCode", "modelAsString": true } }, - "TransferBillingSubscriptionRequestProperties": { + "MoveBillingSubscriptionRequest": { "type": "object", "description": "Request parameters to transfer billing subscription.", "properties": { @@ -1167,36 +1174,28 @@ } } }, - "ValidateSubscriptionTransferEligibilityResult": { + "ValidateMoveBillingSubscriptionEligibilityResult": { "type": "object", "description": "Result of the transfer eligibility validation.", "properties": { - "isTransferEligible": { - "description": "Specifies whether the subscription is eligible to be transferred.", - "enum": [ - "true", - "false" - ], - "type": "string", - "x-ms-enum": { - "name": "isTransferEligible", - "modelAsString": true - }, + "isMoveEligible": { + "description": "Specifies whether the subscription is eligible to move.", + "type": "boolean", "readOnly": true }, "errorDetails": { "description": "Validation error details.", - "$ref": "#/definitions/ValidateSubscriptionTransferEligibilityError" + "$ref": "#/definitions/ValidateMoveBillingSubscriptionEligibilityError" } } }, - "ValidateSubscriptionTransferEligibilityError": { + "ValidateMoveBillingSubscriptionEligibilityError": { "type": "object", "description": "Error details of the transfer eligibility validation", "properties": { "code": { - "description": "Error code for the product transfer validation.", - "$ref": "#/definitions/SubscriptionTransferValidationErrorCode" + "description": "Error code for the billing subscription move validation.", + "$ref": "#/definitions/MoveBillingSubscriptionEligibilityErrorCode" }, "message": { "description": "The error message.", From 4f89461b5149a9c6a05fefe3ad409c23be876e42 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Mon, 11 Oct 2021 11:00:13 -0700 Subject: [PATCH 12/36] Removed transferBillingSubscriptions action --- .../2021-10-01/billingSubscription.json | 116 ------------------ .../examples/TransferAccountOwnership.json | 30 ----- 2 files changed, 146 deletions(-) delete mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/TransferAccountOwnership.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 index cddccbd12f59..c2843391df57 100644 --- 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 @@ -384,66 +384,6 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/transferBillingSubscriptions": { - "post": { - "description": "Moves subscriptions to target enrollmentAccount. The target enrollmentAccount and source enrollmentAccount must be associated to the same Billing Account. This operation is supported only for subscriptions that are purchased with a recurring charge and for billing accounts with agreement type Microsoft Enterprise Agreement.", - "operationId": "TransferBillingSubscriptions", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options":{ - "final-state-via" : "location" - }, - "x-ms-examples": { - "TransferBillingSubscription": { - "$ref": "./examples/TransferAccountOwnership.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/billingAccountNameParameter" - }, - { - "$ref": "#/parameters/enrollmentAccountNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AccountOwnershipTransferRequest" - }, - "description": "Request parameters that are provided to transfer account ownership." - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/AccountOwnershipTransferResult" - } - }, - "202": { - "description": "Accepted. Account Ownership Transfer 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": "int64" - } - } - }, - "default": { - "description": "Unexpected error.", - "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" - } - } - } - } - }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/merge": { "post": { "operationId": "BillingSubscriptions_Merge", @@ -612,62 +552,6 @@ } }, "definitions": { - "AccountOwnershipTransferRequest": { - "type": "object", - "description": "Request parameters to transfer account ownership of billing subscription.", - "properties": { - "targetEnrollmentAccountName": { - "type": "string", - "description": "The destination account to which the subscriptions are transferred." - }, - "transferSubscriptionTenant": { - "description": "This flag is false by default. By not setting this flag, it implies to move the new subscriptions to new account's Azure AD tenant. ", - "enum": [ - "true", - "false" - ], - "type": "string", - "x-ms-enum": { - "name": "transferSubscriptionTenant", - "modelAsString": true - } - }, - "billingSubscriptionId": { - "type": "string", - "description": "This is optional parameter. The ID of the specific billing subscription that needs to be transferred. If this is not provided, all the subscriptions under the account shall be transferred to the destination account." - } - } - }, - "AccountOwnershipTransferResult": { - "type": "object", - "description": "Result of the transfer subscription operation.", - "properties": { - "transferTrackingGuid": { - "type": "string", - "description": "The tracking guid for transfer request." - }, - "billingSubscriptionId": { - "type": "string", - "description": "The billing subscription ID provided in the transfer request. This is an optional field." - }, - "status": { - "type": "string", - "description": "The status of the transfer." - }, - "errorCode": { - "type": "string", - "description": "The error code for the transfer request." - }, - "errorMessage": { - "type": "string", - "description": "The error message for the status of transfer request." - }, - "initiationDate": { - "type": "string", - "description": "The date of initiation of transfer request." - } - } - }, "Amount": { "description": "The amount.", "type": "object", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/TransferAccountOwnership.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/TransferAccountOwnership.json deleted file mode 100644 index dcc96fe4be1c..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/TransferAccountOwnership.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parameters": { - "version": "2021-10-01", - "billingAccountName": "{billingAccountName}", - "enrollmentAccountName": "789012", - "parameters": { - "targetEnrollmentAccountName": "345678", - "transferSubscriptionTenant": "false", - "billingSubscriptionId": "9dfd08c2-62a3-4d47-85bd-1cdba1408402" - } - }, - "responses": { - "200": { - "body": { - "transferTrackingGuid": "22bd364f-9a7c-45bb-a5c1-3f56add77ab0", - "billingSubscriptionId": "9dfd08c2-62a3-4d47-85bd-1cdba1408402", - "status": "Initiated", - "errorCode": "None", - "errorMessage": "None", - "initiationDate": "2021-04-23 10:25:15.1666667" - } - }, - "202": { - "headers": { - "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/transferBillingSubscriptions_f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2020-12-15-privatepreview", - "Retry-After": "30" - } - } - } -} From 7bef209915b7b8cfc1c610b1a966ac031acc02c8 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Mon, 11 Oct 2021 11:22:32 -0700 Subject: [PATCH 13/36] Added readOnly to BillingSubscriptionProperties.invoiceSectionName --- .../stable/2021-10-01/billingSubscription.json | 3 ++- .../stable/2021-10-01/billingSubscriptionAlias.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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 index c2843391df57..4f4525f6efa5 100644 --- 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 @@ -688,7 +688,8 @@ }, "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" + "type": "string", + "readOnly": true }, "lastMonthCharges": { "description": "The last month charges. This field is only available for consumption subscriptions of Microsoft Customer Agreement billing accounts.", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json index 40ca398bf733..1c2082b71559 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json @@ -217,7 +217,7 @@ "type": "object", "properties": { "billingSubscriptionId": { - "description": "The ID of the billing subscription of the subscription alias.", + "description": "The ID of the billing subscription with the subscription alias.", "type": "string", "readOnly": true } From c506a7363ddd67001adac2f54e2e0886996f932c Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Mon, 11 Oct 2021 11:44:53 -0700 Subject: [PATCH 14/36] Moved BillingSubscriptionAlias definitions to BillingSubscription.json --- .../2021-10-01/billingSubscription.json | 218 +++++++++++++++ .../2021-10-01/billingSubscriptionAlias.json | 260 ------------------ 2 files changed, 218 insertions(+), 260 deletions(-) delete mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.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 index 4f4525f6efa5..a819fcf55f35 100644 --- 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 @@ -516,6 +516,165 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/aliases": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_ListByBillingAccount", + "description": "Lists the subscription aliases for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement or Enterprise Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "x-ms-examples": { + "BillingSubscriptionAliasListByBillingAccount": { + "$ref": "./examples/BillingSubscriptionAliasListByBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "./billingSubscription.json#/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}/billingSubscriptions/aliases/{aliasName}": { + "get": { + "tags": [ + "BillingSubscriptionsAliases" + ], + "operationId": "BillingSubscriptionsAliases_Get", + "description": "Gets a subscription by its alias 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": { + "BillingSubscriptionAlias": { + "$ref": "./examples/BillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "./billingSubscription.json#/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_Create", + "x-ms-long-running-operation": true, + "description": "Creates or updates a billing subscription by its alias ID.", + "x-ms-examples": { + "PutBillingSubscription": { + "$ref": "./examples/PutBillingSubscriptionAlias.json" + } + }, + "parameters": [ + { + "$ref": "./billingSubscription.json#/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" + } + }, + "201": { + "description": "Created. Billing subscription creation 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" + } + } + }, + "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" + } + } + } + } + }, "/providers/Microsoft.Billing/operations": { "get": { "tags": [ @@ -1092,6 +1251,57 @@ } } }, + "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": "./billingSubscription.json#/definitions/BillingSubscriptionProperties" + } + ] + }, "Operation": { "description": "A Billing REST API operation.", "type": "object", @@ -1179,6 +1389,14 @@ "type": "string", "x-ms-parameter-location": "method" }, + "billingSubscriptionAliasNameParameter": { + "name": "billingSubscriptionAliasName", + "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", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json deleted file mode 100644 index 1c2082b71559..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-10-01", - "title": "BillingManagementClient", - "description": "Billing client provides access to billing resources and logs for Azure subscriptions." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/aliases": { - "get": { - "tags": [ - "BillingSubscriptionsAliases" - ], - "operationId": "BillingSubscriptionsAliases_ListByBillingAccount", - "description": "Lists the subscription aliases for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement or Enterprise Agreement.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/billing/" - }, - "x-ms-examples": { - "BillingSubscriptionAliasListByBillingAccount": { - "$ref": "./examples/BillingSubscriptionAliasListByBillingAccount.json" - } - }, - "parameters": [ - { - "$ref": "./billingSubscription.json#/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}/billingSubscriptions/aliases/{aliasName}": { - "get": { - "tags": [ - "BillingSubscriptionsAliases" - ], - "operationId": "BillingSubscriptionsAliases_Get", - "description": "Gets a subscription by its alias 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": { - "BillingSubscriptionAlias": { - "$ref": "./examples/BillingSubscriptionAlias.json" - } - }, - "parameters": [ - { - "$ref": "./billingSubscription.json#/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_Create", - "x-ms-long-running-operation": true, - "description": "Creates or updates a billing subscription by its alias ID.", - "x-ms-examples": { - "PutBillingSubscription": { - "$ref": "./examples/PutBillingSubscriptionAlias.json" - } - }, - "parameters": [ - { - "$ref": "./billingSubscription.json#/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" - } - }, - "201": { - "description": "Created. Billing subscription creation 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" - } - } - }, - "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": { - "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": "./billingSubscription.json#/definitions/BillingSubscriptionProperties" - } - ] - } - }, - "parameters": { - "billingSubscriptionAliasNameParameter": { - "name": "billingSubscriptionAliasName", - "in": "path", - "description": "The ID that uniquely identifies a subscription alias.", - "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" - } - } - } -} From 66dc025651f5990c571cdab18ce75edd008bea12 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Mon, 11 Oct 2021 11:47:39 -0700 Subject: [PATCH 15/36] Removed customers scope and PATCH action --- .../2021-10-01/billingSubscription.json | 109 ------------------ 1 file changed, 109 deletions(-) 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 index a819fcf55f35..1f4e41d29048 100644 --- 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 @@ -16,51 +16,6 @@ "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": "./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": { "get": { "tags": [ @@ -144,70 +99,6 @@ } } }, - "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-long-running-operation": true, - "x-ms-long-running-operation-options":{ - "final-state-via" : "location" - }, - "x-ms-examples": { - "UpdateBillingSubscription": { - "$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" From f886fa1cebd2a67402a1897c1876abc0fe9ff529 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 12 Oct 2021 17:58:02 -0700 Subject: [PATCH 16/36] Fixed api-version in examples; Removed dead examples --- .../examples/BillingSubscription.json | 2 +- .../examples/BillingSubscriptionAlias.json | 2 +- ...SubscriptionAliasListByBillingAccount.json | 2 +- ...lingSubscriptionsListByBillingAccount.json | 2 +- .../BillingSubscriptionsListByCustomer.json | 83 ------------------- .../examples/DeleteBillingSubscription.json | 2 +- .../examples/MergeSubscription.json | 2 +- .../examples/MoveBillingSubscription.json | 2 +- .../examples/PutBillingSubscriptionAlias.json | 2 +- .../examples/SplitSubscription.json | 2 +- .../examples/UpdateBillingSubscription.json | 48 ----------- .../ValidateSubscriptionMoveFailure.json | 2 +- .../ValidateSubscriptionMoveSuccess.json | 2 +- 13 files changed, 11 insertions(+), 142 deletions(-) delete mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByCustomer.json delete mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/UpdateBillingSubscription.json 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 index 514d61a62fe9..fd3787bb6a9f 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07" }, 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 index a9a28d187154..f0a8e74dee92 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", "billingSubscriptionAliasName": "c356b7c7-7545-4686-b843-c1a49cf853fc" }, 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 index 3ec053108c9d..b7f96fe088cb 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}" }, "responses": { 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 index 47ab940b9200..778fb3944258 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}" }, "responses": { 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 deleted file mode 100644 index 6cd5d1851bca..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionsListByCustomer.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "parameters": { - "version": "2021-10-01", - "billingAccountName": "{billingAccountName}", - "customerName": "e259ec08-fc9f-481c-a052-8b0c83a3a051" - }, - "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/billingSubscriptions", - "properties": { - "billingFrequency": "P1M", - "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", - "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/e259ec08-fc9f-481c-a052-8b0c83a3a051", - "customerDisplayName": "Customer 1", - "displayName": "Subscription 1", - "lastMonthCharges": { - "currency": "USD", - "value": 5000.00 - }, - "monthToDateCharges": { - "currency": "USD", - "value": 600.00 - }, - "productCategory": "UsageBased", - "productType": "AzureAccessPass", - "productTypeId": "DZH318Z0BPS6", - "publisherName": "Microsoft Corporation", - "purchaseDate": "2021-10-01T00:00:00Z", - "quantity": 1, - "reseller": { - "resellerId": "89e87bdf-a2a2-4687-925f-4c18b27bccfd", - "description": "Reseller1" - }, - "skuId": "0001", - "skuDescription": "Azure Plan", - "status": "Active" - } - }, - { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", - "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", - "type": "Microsoft.Billing/billingSubscriptions", - "properties": { - "billingFrequency": "P1M", - "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/e259ec08-fc9f-481c-a052-8b0c83a3a051", - "customerDisplayName": "Customer 1", - "displayName": "Subscription 2", - "lastMonthCharges": { - "currency": "USD", - "value": 1000.00 - }, - "monthToDateCharges": { - "currency": "USD", - "value": 400 - }, - "productCategory": "SeatBased", - "productType": "PASS", - "productTypeId": "CFQ7TTC0LDPB", - "publisherName": "Microsoft Corporation", - "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", - "quantity": 4, - "reseller": { - "resellerId": "89e87bdf-a2a2-4687-925f-4c18b27bccfd", - "description": "Reseller1" - }, - "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 index 17d8bb5ae7cf..6bff52945f26 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", "billingSubscriptionName": "9e030ae5-51ed-4e02-8e17-d51b3aa55980" }, 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 index 3a80b34622fb..1eb48cd126ad 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", "billingSubscriptionName": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", "parameters": { 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 index 882a5fc5943d..c609c252f131 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07", "parameters": { 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 index e34961e3f21c..b2e8c7d38f93 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", "billingSubscriptionAliasName": "c356b7c7-7545-4686-b843-c1a49cf853fc", "parameters": { 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 index fbc9166f293e..ab736bf5114d 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", "billingSubscriptionName": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", "parameters": { 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 deleted file mode 100644 index 2df9e88516b0..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/UpdateBillingSubscription.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "parameters": { - "version": "2021-10-01", - "billingAccountName": "{billingAccountName}", - "billingSubscriptionName": "418b0e9c-5dc3-4260-918f-30b90619fe07", - "parameters": { - "properties": { - "consumptionCostCenter": "ABC1234" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", - "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", - "type": "Microsoft.Billing/billingAccounts/billingSubscriptions", - "properties": { - "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", - "billingProfileDisplayName": "Contoso operations billing profile", - "billingFrequency": "P1M", - "consumptionCostCenter": "ABC1234", - "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", - "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", - "lastMonthCharges": { - "currency": "USD", - "value": 5000.00 - }, - "monthToDateCharges": { - "currency": "USD", - "value": 600 - }, - "productCategory": "UsageBased", - "productType": "AzureAccessPass", - "productTypeId": "DZH318Z0BPS6", - "publisherName": "Microsoft Corporation", - "purchaseDate": "2021-10-01T00:00:00Z", - "quantity": 1, - "skuId": "0001", - "skuDescription": "Azure Plan", - "status": "Active" - } - } - } - } -} 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 index 4f1b72c0d287..f79e148e6e26 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", 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 index 0c5d7aae094f..92bcbc6728a5 100644 --- 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 @@ -1,6 +1,6 @@ { "parameters": { - "version": "2021-10-01", + "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", From 119137f652d140ec818970ba8f59f8dfcf29b3a1 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 12 Oct 2021 19:07:55 -0700 Subject: [PATCH 17/36] Updated readme.cmd --- specification/billing/resource-manager/readme.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 2d96433a4de6..9a785c715702 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -36,15 +36,6 @@ These settings apply only when `--tag=package-2021-10` is specified on the comma ``` yaml $(tag) == 'package-2021-10' input-file: - Microsoft.Billing/stable/2021-10-01/billingSubscription.json -- Microsoft.Billing/stable/2021-10-01/billingSubscriptionAlias.json -``` - -### Tag: package-2021-10 - -These settings apply only when `--tag=package-2021-10` is specified on the command line. - -``` yaml $(tag) == 'package-2021-10' -input-file: - Microsoft.Billing/stable/2021-10-01/payment.json directive: - suppress: R4009 From eb363542bf30e1c27790a73a838cc49a05e5b29d Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 12 Oct 2021 19:41:04 -0700 Subject: [PATCH 18/36] Updated examples --- .../examples/BillingSubscription.json | 19 ++++-- .../examples/BillingSubscriptionAlias.json | 24 ++++--- ...SubscriptionAliasListByBillingAccount.json | 64 +++++++++++-------- ...lingSubscriptionsListByBillingAccount.json | 42 +++++++----- .../examples/DeleteBillingSubscription.json | 31 +++++---- .../examples/MergeSubscription.json | 22 +++++-- .../examples/MoveBillingSubscription.json | 20 ++++-- .../examples/PutBillingSubscriptionAlias.json | 10 +-- .../examples/SplitSubscription.json | 7 +- .../ValidateSubscriptionMoveFailure.json | 2 - .../ValidateSubscriptionMoveSuccess.json | 2 - 11 files changed, 151 insertions(+), 92 deletions(-) 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 index fd3787bb6a9f..4afb8311d715 100644 --- 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 @@ -11,13 +11,20 @@ "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", - "consumptionCostCenter": "ABC1234", - "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileSpendingLimitDetails": { + "type": "None", + "startDate": "2021-02-01T00:00:00Z", + "status": "None" + }, "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 @@ -27,14 +34,14 @@ "value": 600 }, "productCategory": "UsageBased", - "productType": "AzureAccessPass", + "productType": "Usage Based", "productTypeId": "DZH318Z0BPS6", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, "skuId": "0001", - "skuDescription": "Azure Plan", - "status": "Active" + "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/BillingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/BillingSubscriptionAlias.json index f0a8e74dee92..64f842e651e6 100644 --- 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 @@ -7,19 +7,25 @@ "responses": { "200": { "body": { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/c356b7c7-7545-4686-b843-c1a49cf853fc", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/aliases/c356b7c7-7545-4686-b843-c1a49cf853fc", "name": "c356b7c7-7545-4686-b843-c1a49cf853fc", - "type": "Microsoft.Billing/billingAccounts/billingSubscriptionAliases", + "type": "Microsoft.Billing/billingAccounts/billingSubscriptions/aliases", "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", + "billingProfileSpendingLimitDetails": { + "type": "None", + "startDate": "2021-02-01T00:00:00Z", + "status": "None" + }, "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07", - "billingFrequency": "P1M", - "consumptionCostCenter": "ABC1234", - "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", "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 @@ -29,14 +35,14 @@ "value": 600 }, "productCategory": "UsageBased", - "productType": "AzureAccessPass", + "productType": "Usage Based", "productTypeId": "DZH318Z0BPS6", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, "skuId": "0001", - "skuDescription": "Azure Plan", - "status": "Active" + "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 index b7f96fe088cb..1f44d0bc1481 100644 --- 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 @@ -8,18 +8,25 @@ "body": { "value": [ { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073/billingSubscriptionAliases/c356b7c7-7545-4686-b843-c1a49cf853fc", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/aliases/c356b7c7-7545-4686-b843-c1a49cf853fc", "name": "c356b7c7-7545-4686-b843-c1a49cf853fc", - "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptionAliases", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptions/aliases", "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", - "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/c356b7c7-7545-4686-b843-c1a49cf853fc", - "billingFrequency": "P1M", - "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileSpendingLimitDetails": { + "type": "None", + "startDate": "2021-02-01T00:00:00Z", + "status": "None" + }, + "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 @@ -28,29 +35,32 @@ "currency": "USD", "value": 600 }, - "productCategory": "UsageBasedSubscription", - "productType": "AzureAccessPass", + "productCategory": "UsageBased", + "productType": "Usage Based", "productTypeId": "DZH318Z0BPS6", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, "skuId": "0001", - "skuDescription": "Azure Plan", - "status": "Active" + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3" } }, { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073/billingSubscriptionAliases/ec16a54e-e8ad-4c14-8e87-e30e75fa800e", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/aliases/ec16a54e-e8ad-4c14-8e87-e30e75fa800e", "name": "ec16a54e-e8ad-4c14-8e87-e30e75fa800e", - "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptionAliases", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptions/aliases", "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", - "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/9e030ae5-51ed-4e02-8e17-d51b3aa55980", - "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "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 @@ -59,29 +69,32 @@ "currency": "USD", "value": 400 }, - "productCategory": "UsageBasedSubscription", - "productType": "AzureAccessPass", + "productCategory": "UsageBased", + "productType": "Usage Based", "productTypeId": "DZH318Z0BPS6", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, "skuId": "0001", - "skuDescription": "Azure Plan", - "status": "Active" + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2" } }, { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073/billingSubscriptionAliases/2ee97fe0-efca-4960-a9af-98a30c2c497c", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/aliases/2ee97fe0-efca-4960-a9af-98a30c2c497c", "name": "2ee97fe0-efca-4960-a9af-98a30c2c497c", - "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptionAliases", + "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptions/aliases", "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", - "billingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", - "consumptionSubscriptionId": "6b96d3f2-4a9d-9008-912f-f87744185aa3", + "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-f8b5b3fbd073", + "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 @@ -91,9 +104,8 @@ "value": 900 }, "productCategory": "SeatBased", - "productType": "PASS", + "productType": "Microsoft 365 Business Standard", "productTypeId": "CFQ7TTC0LDPB", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", "quantity": 4, "skuId": "0001", 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 index 778fb3944258..904b0de0818a 100644 --- 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 @@ -12,13 +12,20 @@ "name": "418b0e9c-5dc3-4260-918f-30b90619fe07", "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptions", "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", - "billingFrequency": "P1M", - "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileSpendingLimitDetails": { + "type": "None", + "startDate": "2021-02-01T00:00:00Z", + "status": "None" + }, "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 @@ -28,14 +35,14 @@ "value": 600 }, "productCategory": "UsageBased", - "productType": "AzureAccessPass", + "productType": "Usage Based", "productTypeId": "DZH318Z0BPS6", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, "skuId": "0001", - "skuDescription": "Azure Plan", - "status": "Active" + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3" } }, { @@ -43,13 +50,15 @@ "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", "type": "Microsoft.Billing/billingSubscriptions", "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", - "billingFrequency": "P1M", - "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2", + "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 @@ -59,14 +68,14 @@ "value": 400 }, "productCategory": "UsageBased", - "productType": "AzureAccessPass", + "productType": "Usage Based", "productTypeId": "DZH318Z0BPS6", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, "skuId": "0001", - "skuDescription": "Azure Plan", - "status": "Active" + "skuDescription": "Microsoft Azure Plan", + "status": "Active", + "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2" } }, { @@ -74,13 +83,15 @@ "name": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", "type": "Microsoft.Billing/billingSubscriptions", "properties": { + "autoRenew": "Off", + "billingFrequency": "P1M", "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", - "billingFrequency": "P1M", - "consumptionSubscriptionId": "6b96d3f2-4a9d-9008-912f-f87744185aa3", + "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 @@ -90,9 +101,8 @@ "value": 900 }, "productCategory": "SeatBased", - "productType": "PASS", + "productType": "Microsoft 365 Business Standard", "productTypeId": "CFQ7TTC0LDPB", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", "quantity": 4, "skuId": "0001", 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 index 6bff52945f26..b8f8735a284d 100644 --- 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 @@ -2,25 +2,35 @@ "parameters": { "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", - "billingSubscriptionName": "9e030ae5-51ed-4e02-8e17-d51b3aa55980" + "billingSubscriptionName": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980", - "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980", + "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", - "billingFrequency": "P1M", - "displayName": "Subscription 2", - "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "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": "PASS", + "productType": "Microsoft 365 Business Standard", "productTypeId": "CFQ7TTC0LDPB", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", "quantity": 4, "skuId": "0001", @@ -34,10 +44,9 @@ }, "202": { "headers": { - "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/deleteBillingSubscription_9e030ae5-51ed-4e02-8e17-d51b3aa55980:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2020-11-01", + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/deleteBillingSubscription_7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e:f9bd2643-e786-4c93-9978-3c7f2d574580?api-version=2020-11-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 index 1eb48cd126ad..ce65abf6c89e 100644 --- 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 @@ -5,7 +5,7 @@ "billingSubscriptionName": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e", "parameters": { "quantity": 4, - "targetBillingSubscriptionId": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980" + "targetBillingSubscriptionName": "9e030ae5-51ed-4e02-8e17-d51b3aa55980" } }, "responses": { @@ -15,16 +15,26 @@ "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", - "billingFrequency": "P1M", - "displayName": "Subscription q", - "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073", + "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": "PASS", + "productType": "Microsoft 365 Business Standard", "productTypeId": "CFQ7TTC0LDPB", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", "quantity": 5, "skuId": "0001", 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 index c609c252f131..5f7b6a34d08d 100644 --- 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 @@ -14,14 +14,20 @@ "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", - "billingFrequency": "P1M", - "consumptionCostCenter": "ABC1234", - "consumptionSubscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3", + "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", + "billingProfileSpendingLimitDetails": { + "type": "None", + "startDate": "2021-02-01T00:00:00Z", + "status": "None" + }, "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 @@ -31,14 +37,14 @@ "value": 600 }, "productCategory": "UsageBased", - "productType": "AzureAccessPass", + "productType": "Usage Based", "productTypeId": "DZH318Z0BPS6", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, "skuId": "0001", - "skuDescription": "Azure Plan", - "status": "Active" + "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/PutBillingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PutBillingSubscriptionAlias.json index b2e8c7d38f93..2493654e22b5 100644 --- 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 @@ -8,6 +8,7 @@ "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, @@ -19,21 +20,22 @@ "responses": { "200": { "body": { - "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptionAliases/c356b7c7-7545-4686-b843-c1a49cf853fc", + "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/aliases/c356b7c7-7545-4686-b843-c1a49cf853fc", "name": "c356b7c7-7545-4686-b843-c1a49cf853fc", - "type": "Microsoft.Billing/billingAccounts/billingSubscriptionAliases", + "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": "PASS", + "productType": "Microsoft 365 Business Standard", "productTypeId": "CFQ7TTC0LDPB", - "publisherName": "Microsoft Corporation", "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", "quantity": 4, "skuId": "0001", 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 index ab736bf5114d..195809efb338 100644 --- 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 @@ -20,15 +20,16 @@ "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": "PASS", + "productType": "Microsoft 365 Business Standard", "productTypeId": "CFQ7TTC0LDPB", - "publisherName": "Microsoft Corporation", - "purchaseDate": "2021-08-01T00:12:49.7261677+00:00", + "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 4, "skuId": "0001", "skuDescription": "Microsoft 365 Business Standard", 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 index f79e148e6e26..c387a5acdad9 100644 --- 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 @@ -2,8 +2,6 @@ "parameters": { "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", - "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", - "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", "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", 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 index 92bcbc6728a5..efb9bf024862 100644 --- 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 @@ -2,8 +2,6 @@ "parameters": { "api-version": "2021-10-01", "billingAccountName": "{billingAccountName}", - "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", - "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073", "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", From 1df68e8c919fd04b877edf364343863f05411d41 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 12 Oct 2021 20:20:08 -0700 Subject: [PATCH 19/36] Update validate move examples --- .../2021-10-01/examples/ValidateSubscriptionMoveFailure.json | 2 +- .../2021-10-01/examples/ValidateSubscriptionMoveSuccess.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 index c387a5acdad9..1b041016471c 100644 --- 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 @@ -11,7 +11,7 @@ "responses": { "200": { "body": { - "isTransferEligible": "false", + "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 index efb9bf024862..6c76a054f120 100644 --- 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 @@ -11,7 +11,7 @@ "responses": { "200": { "body": { - "isTransferEligible": "true" + "isMoveEligible": true } } } From 7b943a668a2f484cbf40c1150856046f754b46ff Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 12 Oct 2021 20:21:19 -0700 Subject: [PATCH 20/36] Updated ValidateMoveEligibility; Removed operations --- .../2021-10-01/billingSubscription.json | 97 +------------------ 1 file changed, 1 insertion(+), 96 deletions(-) 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 index 1f4e41d29048..7f11d6e3c9f3 100644 --- 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 @@ -234,7 +234,7 @@ "$ref": "./examples/ValidateSubscriptionMoveFailure.json" } }, - "operationId": "BillingSubscriptions_validateMoveEligibility", + "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/" @@ -565,40 +565,6 @@ } } } - }, - "/providers/Microsoft.Billing/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "Lists the available billing REST API operations.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/billing/" - }, - "parameters": [ - { - "$ref": "./types.json#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } } }, "definitions": { @@ -1192,67 +1158,6 @@ "$ref": "./billingSubscription.json#/definitions/BillingSubscriptionProperties" } ] - }, - "Operation": { - "description": "A Billing REST API operation.", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string", - "readOnly": true - }, - "isDataAction": { - "description": "Identifies if the operation is a data operation.", - "type": "boolean", - "readOnly": true - }, - "display": { - "description": "The object that represents the operation.", - "type": "object", - "properties": { - "provider": { - "description": "Service provider: Microsoft.Billing.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed such as invoice and billing subscription.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type such as read, write and delete.", - "type": "string", - "readOnly": true - }, - "description": { - "description": "Description of operation.", - "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.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Operation" - } - }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "readOnly": true - } - } } }, "parameters": { From 5f47912967c073a84660ba49ef32b349364a3a8a Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 12 Oct 2021 20:33:54 -0700 Subject: [PATCH 21/36] Updated billingSubscription.json CreateOrUpdate --- .../stable/2021-10-01/billingSubscription.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 7f11d6e3c9f3..03486740f37f 100644 --- 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 @@ -494,7 +494,7 @@ "tags": [ "BillingSubscriptionsAliases" ], - "operationId": "BillingSubscriptionsAliases_Create", + "operationId": "BillingSubscriptionsAliases_CreateOrUpdate", "x-ms-long-running-operation": true, "description": "Creates or updates a billing subscription by its alias ID.", "x-ms-examples": { From afc17261f251a5730fbcd642ce7819953b4e7f2e Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Wed, 13 Oct 2021 09:56:15 -0700 Subject: [PATCH 22/36] Updated api-version in example 202 location headers --- .../stable/2021-10-01/billingSubscription.json | 6 +++--- .../2021-10-01/examples/DeleteBillingSubscription.json | 2 +- .../stable/2021-10-01/examples/MergeSubscription.json | 2 +- .../stable/2021-10-01/examples/MoveBillingSubscription.json | 2 +- .../2021-10-01/examples/PutBillingSubscriptionAlias.json | 2 +- .../stable/2021-10-01/examples/SplitSubscription.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) 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 index 03486740f37f..49c52b78b8a4 100644 --- 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 @@ -413,7 +413,7 @@ "BillingSubscriptionsAliases" ], "operationId": "BillingSubscriptionsAliases_ListByBillingAccount", - "description": "Lists the subscription aliases for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement or Enterprise Agreement.", + "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/" }, @@ -455,7 +455,7 @@ "BillingSubscriptionsAliases" ], "operationId": "BillingSubscriptionsAliases_Get", - "description": "Gets a subscription by its alias ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement.", + "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/" }, @@ -496,7 +496,7 @@ ], "operationId": "BillingSubscriptionsAliases_CreateOrUpdate", "x-ms-long-running-operation": true, - "description": "Creates or updates a billing subscription by its alias ID.", + "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" 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 index b8f8735a284d..c7ede62dc476 100644 --- 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 @@ -44,7 +44,7 @@ }, "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=2020-11-01", + "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" } } 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 index ce65abf6c89e..a15218591370 100644 --- 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 @@ -48,7 +48,7 @@ }, "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=2020-12-15-privatepreview", + "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 index 5f7b6a34d08d..d3b420e0e8db 100644 --- 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 @@ -50,7 +50,7 @@ }, "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=2020-12-15-privatepreview", + "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/PutBillingSubscriptionAlias.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/PutBillingSubscriptionAlias.json index 2493654e22b5..8a90d17eacae 100644 --- 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 @@ -49,7 +49,7 @@ }, "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=2020-12-15-privatepreview", + "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 index 195809efb338..404a85e05b4e 100644 --- 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 @@ -42,7 +42,7 @@ }, "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=2020-12-15-privatepreview", + "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" } } From 2f9a479ab49b0858572934e600ffe9cdec018804 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Wed, 13 Oct 2021 20:41:06 -0700 Subject: [PATCH 23/36] Added PATCH --- .../2021-10-01/billingSubscription.json | 60 +++++++++++++++++++ .../examples/UpdateBillingSubscription.json | 60 +++++++++++++++++++ .../stable/2021-10-01/types.json | 6 +- 3 files changed, 121 insertions(+), 5 deletions(-) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/UpdateBillingSubscription.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 index 49c52b78b8a4..1bd20a60fac3 100644 --- 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 @@ -99,6 +99,66 @@ } } }, + "patch": { + "tags": [ + "BillingSubscriptions" + ], + "operationId": "BillingSubscriptions_Update", + "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" 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..ae9d7b42bc5d --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/examples/UpdateBillingSubscription.json @@ -0,0 +1,60 @@ +{ + "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", + "billingProfileSpendingLimitDetails": { + "type": "None", + "startDate": "2021-02-01T00:00:00Z", + "status": "None" + }, + "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/types.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2021-10-01/types.json index 7d5ab856313b..77decab0abbd 100644 --- 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 @@ -84,10 +84,6 @@ "readOnly": true, "type": "string", "description": "Resource type." - }, - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "readOnly": true } }, "x-ms-azure-resource": true @@ -99,7 +95,7 @@ "in": "query", "required": true, "type": "string", - "description": "The version of the API to be used with the client request. The current version is 2020-11-01-privatepreview." + "description": "The version of the API to be used with the client request. The current version is 2021-10-01." } }, "security": [ From 8a8c7e0c93431c3c96c1fb9fdcbcbec817095759 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:03:41 -0700 Subject: [PATCH 24/36] AutoRest error fixes --- .../2021-10-01/billingSubscription.json | 23 ++-- .../stable/2021-10-01/payment.json | 107 +++--------------- .../stable/2021-10-01/types.json | 2 +- .../billing/resource-manager/readme.md | 3 + 4 files changed, 30 insertions(+), 105 deletions(-) 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 index 1bd20a60fac3..fd38cc1da52e 100644 --- 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 @@ -104,6 +104,10 @@ "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": { @@ -209,6 +213,9 @@ } } }, + "204": { + "description": "Billing subscription not found." + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -590,17 +597,9 @@ } }, "201": { - "description": "Created. Billing subscription creation 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" - } + "description": "Created.", + "schema": { + "$ref": "#/definitions/BillingSubscriptionAlias" } }, "202": { @@ -818,7 +817,7 @@ "$ref": "#/definitions/Reseller" }, "renewalTermDetails": { - "description": " ", + "description": "Renewal term details of the product.", "type": "object", "$ref": "#/definitions/RenewalTermDetails" }, 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..c826e98f385e 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 @@ -2,8 +2,8 @@ "swagger": "2.0", "info": { "version": "2021-10-01", - "title": "PaymentManagementClient", - "description": "Payment management client provides access to payment resources for Azure." + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources and logs for Azure subscriptions." }, "host": "management.azure.com", "schemes": [ @@ -46,7 +46,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } }, @@ -88,7 +88,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -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" } } }, @@ -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" } } }, @@ -299,7 +299,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "./types.json#/definitions/ErrorResponse" } } } @@ -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": { @@ -476,7 +476,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "./types.json#/definitions/Resource" } ], "properties": { @@ -705,87 +705,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 +740,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 index 77decab0abbd..5d7f29985602 100644 --- 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 @@ -67,7 +67,7 @@ } }, "Resource": { - "description": "The Resource model definition.", + "description": "The resource model definition.", "type": "object", "properties": { "id": { diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 9a785c715702..e46df6cf9d01 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -38,6 +38,9 @@ input-file: - Microsoft.Billing/stable/2021-10-01/billingSubscription.json - Microsoft.Billing/stable/2021-10-01/payment.json directive: + - suppress: R4009 + from: Microsoft.Billing/stable/2021-10-01/billingSubscription.json + reason: systemData is not in this API version - suppress: R4009 from: Microsoft.Billing/stable/2021-10-01/payment.json reason: systemData is not in this API version From f23dde9cf205e7032dcff4a273756dbb3a034ba7 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 19 Oct 2021 18:15:01 -0700 Subject: [PATCH 25/36] Updated productType in examples; BillingSubscriptionSplitRequest; titles --- .../stable/2021-10-01/billingSubscription.json | 4 ++-- .../stable/2021-10-01/examples/BillingSubscription.json | 2 +- .../stable/2021-10-01/examples/BillingSubscriptionAlias.json | 2 +- .../BillingSubscriptionAliasListByBillingAccount.json | 2 +- .../examples/BillingSubscriptionsListByBillingAccount.json | 4 ++-- .../stable/2021-10-01/examples/MoveBillingSubscription.json | 2 +- .../stable/2021-10-01/examples/UpdateBillingSubscription.json | 2 +- .../Microsoft.Billing/stable/2021-10-01/payment.json | 2 +- specification/billing/resource-manager/readme.md | 2 ++ 9 files changed, 12 insertions(+), 10 deletions(-) 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 index fd38cc1da52e..07ce39709649 100644 --- 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 @@ -989,8 +989,8 @@ "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" }, - "term": { - "description": "The term of the target in ISO8601 format product to which the subscription needs to be split into. Example: P1M, P1Y", + "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" } } 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 index 4afb8311d715..ee5aa6642eed 100644 --- 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 @@ -34,7 +34,7 @@ "value": 600 }, "productCategory": "UsageBased", - "productType": "Usage Based", + "productType": "Usage based", "productTypeId": "DZH318Z0BPS6", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, 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 index 64f842e651e6..210bb0e93d6a 100644 --- 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 @@ -35,7 +35,7 @@ "value": 600 }, "productCategory": "UsageBased", - "productType": "Usage Based", + "productType": "Usage based", "productTypeId": "DZH318Z0BPS6", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, 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 index 1f44d0bc1481..ddf4054ddfe2 100644 --- 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 @@ -70,7 +70,7 @@ "value": 400 }, "productCategory": "UsageBased", - "productType": "Usage Based", + "productType": "Usage based", "productTypeId": "DZH318Z0BPS6", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, 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 index 904b0de0818a..d5be7d64325a 100644 --- 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 @@ -35,7 +35,7 @@ "value": 600 }, "productCategory": "UsageBased", - "productType": "Usage Based", + "productType": "Usage based", "productTypeId": "DZH318Z0BPS6", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, @@ -68,7 +68,7 @@ "value": 400 }, "productCategory": "UsageBased", - "productType": "Usage Based", + "productType": "Usage based", "productTypeId": "DZH318Z0BPS6", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, 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 index d3b420e0e8db..802f0e8beb80 100644 --- 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 @@ -37,7 +37,7 @@ "value": 600 }, "productCategory": "UsageBased", - "productType": "Usage Based", + "productType": "Usage based", "productTypeId": "DZH318Z0BPS6", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, 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 index ae9d7b42bc5d..8fed27a8d95e 100644 --- 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 @@ -39,7 +39,7 @@ "value": 600 }, "productCategory": "UsageBased", - "productType": "Usage Based", + "productType": "Usage based", "productTypeId": "DZH318Z0BPS6", "purchaseDate": "2021-10-01T00:00:00Z", "quantity": 1, 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 c826e98f385e..f00a208b0bff 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 @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "2021-10-01", - "title": "BillingManagementClient", + "title": "PaymentManagementClient", "description": "Billing client provides access to billing resources and logs for Azure subscriptions." }, "host": "management.azure.com", diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index e46df6cf9d01..6bb8a2c83da5 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -25,6 +25,8 @@ To see additional help and options, run: These are the global settings for the Billing API. ``` yaml +title: BillingManagementClient +description: Billing Client openapi-type: arm tag: package-2021-10 ``` From 8f564a43ef3975b7173c0d123c28f7605c78a2b4 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 19 Oct 2021 19:39:46 -0700 Subject: [PATCH 26/36] Updated billingSubscriptionAliasNameParameter --- .../stable/2021-10-01/billingSubscription.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 07ce39709649..65b3a1580e1e 100644 --- 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 @@ -1245,7 +1245,7 @@ "x-ms-parameter-location": "method" }, "billingSubscriptionAliasNameParameter": { - "name": "billingSubscriptionAliasName", + "name": "aliasName", "in": "path", "description": "The ID that uniquely identifies a subscription alias.", "required": true, From d78350f823288ead8e715ae0aff07bf8e2174c39 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Wed, 20 Oct 2021 11:34:56 -0700 Subject: [PATCH 27/36] Removed ignored readOnly's; Updated descriptions --- .../stable/2021-10-01/billingSubscription.json | 15 ++++----------- .../stable/2021-10-01/payment.json | 5 ++--- .../stable/2021-10-01/types.json | 1 - 3 files changed, 6 insertions(+), 15 deletions(-) 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 index 65b3a1580e1e..cb229ca7300a 100644 --- 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 @@ -3,7 +3,7 @@ "info": { "version": "2021-10-01", "title": "BillingManagementClient", - "description": "Billing client provides access to billing resources and logs for Azure subscriptions." + "description": "The billing client allows you to view and manage your billing details programmatically." }, "host": "management.azure.com", "schemes": [ @@ -227,7 +227,7 @@ }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/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.", + "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/" }, @@ -716,8 +716,7 @@ "billingProfileSpendingLimitDetails": { "x-ms-client-flatten": true, "$ref": "#/definitions/BillingProfileSpendingLimitDetails", - "title": "The details of the spending limit that is set on the billing profile to which the subscription is billed.", - "readOnly": true + "title": "The details of the spending limit that is set on the billing profile to which the subscription is billed." }, "consumptionCostCenter": { "description": "The cost center applied to the subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement Type billing accounts.", @@ -749,8 +748,7 @@ "enrollmentAccountSubscriptionDetails": { "x-ms-client-flatten": true, "$ref": "#/definitions/EnrollmentAccountSubscriptionDetails", - "title": "Enrollment Account Subscription details. This field is available only for the Enterprise Agreement Type billing accounts.", - "readOnly": true + "title": "Enrollment Account Subscription details. This field is available only for the Enterprise Agreement Type 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.", @@ -768,17 +766,14 @@ }, "lastMonthCharges": { "description": "The last month charges. This field is only available for consumption subscriptions of Microsoft Customer Agreement billing accounts.", - "readOnly": true, "$ref": "#/definitions/Amount" }, "monthToDateCharges": { "description": "The current month to date charges. This field is only available for consumption subscriptions of Microsoft Customer Agreement billing accounts.", - "readOnly": true, "$ref": "#/definitions/Amount" }, "nextBillingCycleDetails": { "description": "Next billing cycle details of the subscription.", - "type": "object", "$ref": "#/definitions/NextBillingCycleDetails" }, "offerId": { @@ -813,12 +808,10 @@ }, "reseller": { "description": "Reseller for this subscription. The fields is not available for Microsoft Partner Agreement billing accounts.", - "readOnly": true, "$ref": "#/definitions/Reseller" }, "renewalTermDetails": { "description": "Renewal term details of the product.", - "type": "object", "$ref": "#/definitions/RenewalTermDetails" }, "skuDescription": { 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 f00a208b0bff..6f0154044d7b 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": "Billing client provides access to billing resources and logs for Azure subscriptions." + "description": "The billing client allows you to view and manage your billing details programmatically." }, "host": "management.azure.com", "schemes": [ @@ -447,8 +447,7 @@ "properties": { "paymentMethod": { "description": "Projection of a payment method", - "$ref": "#/definitions/PaymentMethodProjectionProperties", - "readOnly": true + "$ref": "#/definitions/PaymentMethodProjectionProperties" } } }, 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 index 5d7f29985602..dc6c5e641140 100644 --- 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 @@ -37,7 +37,6 @@ }, "details": { "description": "The sub details of the error.", - "readOnly": true, "$ref": "#/definitions/ErrorSubDetails" } } From 836f215d7e18d27e8bd2fbe06679b81f477f32d7 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Wed, 20 Oct 2021 13:33:49 -0700 Subject: [PATCH 28/36] Updated descriptions --- .../stable/2021-10-01/billingSubscription.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 index cb229ca7300a..85484511cb6f 100644 --- 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 @@ -22,7 +22,7 @@ "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, Microsoft Partner Agreement or Enterprise Agreement.", + "description": "Lists the subscriptions for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement and Enterprise Agreement.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, @@ -64,7 +64,7 @@ "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.", + "description": "Gets a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement and Enterprise Agreement.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/billing/" }, From 980c46a4d1b0942d024dba28fce4b22164d23262 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Wed, 20 Oct 2021 13:36:51 -0700 Subject: [PATCH 29/36] Removed unnecessary destinationBillingProfileId from Move request parameters --- .../stable/2021-10-01/billingSubscription.json | 4 ---- 1 file changed, 4 deletions(-) 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 index 85484511cb6f..0a6f502fced6 100644 --- 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 @@ -1120,10 +1120,6 @@ "destinationInvoiceSectionId": { "type": "string", "description": "The destination invoice section id." - }, - "destinationBillingProfileId": { - "type": "string", - "description": "The destination billing profile id." } } }, From 27389525f93bed37194ecae59b86c21e76579f21 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Mon, 25 Oct 2021 09:43:24 -0700 Subject: [PATCH 30/36] PR feedback - descriptions --- .../stable/2021-10-01/billingSubscription.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 index 0a6f502fced6..fde49a1ecb43 100644 --- 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 @@ -349,7 +349,7 @@ "x-ms-long-running-operation-options":{ "final-state-via" : "location" }, - "description": "Merges two existing subscriptions into a new subscription with quantity greater than the existing subscriptions individually.", + "description": "Merges the billing subscription provided in the request with a target billing subscription.", "x-ms-examples": { "MergeSubscription": { "$ref": "./examples/MergeSubscription.json" @@ -684,7 +684,7 @@ "type": "object", "properties": { "autoRenew": { - "description": "Indicates whether auto renewal is turned on or off for a product.", + "description": "Indicates whether auto renewal is turned on or off for a subscription.", "type": "string", "enum": [ "Off", @@ -696,7 +696,7 @@ } }, "billingFrequency": { - "description": "The billing frequency in ISO8601 format of product in the subscription. Example: P1M, P3M, P1Y", + "description": "The billing frequency of the subscription in the ISO8601 format. Example: P1M, P3M, P1Y", "type": "string" }, "billingProfileId": { @@ -704,7 +704,7 @@ "type": "string" }, "billingProfileDisplayName": { - "description": "The name of the billing profile to which the subscription is billed. This field is only applicable for Microsoft Customer Agreement billing accounts.", + "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 }, @@ -755,7 +755,7 @@ "type": "string" }, "invoiceSectionDisplayName": { - "description": "The name of the invoice section to which the subscription is billed. The field is applicable only for Microsoft Partner Agreement billing accounts.", + "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 }, @@ -951,11 +951,11 @@ "type": "object", "properties": { "targetBillingSubscriptionName": { - "description": "The ID of the target billing subscription with which the billing subscription in request will be merged.", + "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 product of target subscription to which the subscription in request needs to be merged into.", + "description": "The quantity of the source billing subscription that will be merged with the target billing subscription.", "type": "integer", "format": "int32" } From 1f31efc3ef29ef02fb0718b2580e4da8b5901e90 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Mon, 25 Oct 2021 10:01:08 -0700 Subject: [PATCH 31/36] PR feedback - descriptions --- .../2021-10-01/billingSubscription.json | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) 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 index fde49a1ecb43..b1949693ec83 100644 --- 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 @@ -765,11 +765,11 @@ "readOnly": true }, "lastMonthCharges": { - "description": "The last month charges. This field is only available for consumption subscriptions of Microsoft Customer Agreement billing accounts.", + "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 consumption subscriptions of Microsoft Customer Agreement billing accounts.", + "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": { @@ -782,23 +782,23 @@ "readOnly": true }, "productCategory": { - "description": "Category of the subscription. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, Software, UsageBased, Other", + "description": "The category of the subscription. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, Software, UsageBased, Other", "type": "string", "readOnly": true }, "productType": { - "description": "Type of the product for which the subscription is purchased", + "description": "The type of the product for which the subscription is purchased", "type": "string", "readOnly": true }, "productTypeId": { - "description": "Id of the product for which the subscription is purchased", + "description": "The ID of the product for which the subscription is purchased", "type": "string" }, "purchaseDate": { "type": "string", "format": "date-time", - "description": "Purchase date of the product in UTC time.", + "description": "The purchase date of the subscription in UTC time.", "readOnly": true }, "quantity": { @@ -807,11 +807,11 @@ "format": "int64" }, "reseller": { - "description": "Reseller for this subscription. The fields is not available for Microsoft Partner Agreement billing accounts.", + "description": "The reseller for which the subscription is created. The field is available for Microsoft Partner Agreement billing accounts..", "$ref": "#/definitions/Reseller" }, "renewalTermDetails": { - "description": "Renewal term details of the product.", + "description": "The term details of the subscription at the next renewal.", "$ref": "#/definitions/RenewalTermDetails" }, "skuDescription": { @@ -850,7 +850,7 @@ "readOnly": true }, "suspensionReasons": { - "description": "The suspension reason for a subscription. This field is not available for Enterprise Agreement billing accounts.", + "description": "The suspension reason for the subscription. This field is not available for Enterprise Agreement billing accounts.", "type": "array", "readOnly": true, "items": { @@ -864,19 +864,19 @@ "termStartDate": { "type": "string", "format": "date-time", - "description": "Start date of the term in UTC time.", + "description": "The start date of the term in UTC time.", "readOnly": true }, "termEndDate": { "type": "string", "format": "date-time", - "description": "End date of the term in UTC time.", + "description": "The end date of the term in UTC time.", "readOnly": true } } }, "BillingProfileSpendingLimitDetails": { - "description": "Billing profile spending limit details of the product.", + "description": "The spending limit details of the billing profiles to which the subscription is billed.", "type": "object", "readOnly": true, "properties": { @@ -893,17 +893,17 @@ "startDate": { "type": "string", "format": "date-time", - "description": "Start date of the spending limit.", + "description": "The start date of the spending limit.", "readOnly": true }, "endDate": { "type": "string", "format": "date-time", - "description": "End date of the spending limit.", + "description": "The end date of the spending limit.", "readOnly": true }, "status": { - "description": "The spending limit status.", + "description": "The status of the spending limit.", "type": "string", "enum": [ "Unknown", @@ -920,7 +920,7 @@ } }, "type": { - "description": "The spending limit type.", + "description": "The type of spending limit.", "type": "string", "enum": [ "Unknown", @@ -966,7 +966,7 @@ "type": "object", "properties": { "billingFrequency": { - "description": "The billing frequency in ISO8601 format of the target product to which the subscription needs to be split into. Example: P1M, P3M, P1Y", + "description": "The billing frequency of the target subscription in the ISO8601 format. Example: P1M, P3M, P1Y", "type": "string" }, "quantity": { @@ -1019,24 +1019,24 @@ } }, "NextBillingCycleDetails": { - "description": "Billing cycle details of the product.", + "description": "The next billing cycle details of the subscription.", "type": "object", "readOnly": true, "properties": { "billingFrequency": { - "description": "Billing frequency of the product under the subscription.", + "description": "The billing frequency of the subscription in the next billing cycle.", "type": "string", "readOnly": true } } }, "RenewalTermDetails": { - "description": "Renewal term details of the product.", + "description": "The term details of the subscription at renewal.", "type": "object", "readOnly": true, "properties": { "billingFrequency": { - "description": "Billing frequency of the product under the subscription.", + "description": "The billing frequency of the subscription.", "type": "string", "readOnly": true }, @@ -1056,7 +1056,7 @@ "readOnly": true }, "termDuration": { - "description": "The duration. Example P1Y and P1M", + "description": "The term duration of the subscription. Example P1M and P1Y", "type": "string", "readOnly": true } From 7f24d381a11c7ecf6a0071b2bb5fb2f662323880 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Mon, 25 Oct 2021 10:07:46 -0700 Subject: [PATCH 32/36] Fixed typo --- .../stable/2021-10-01/billingSubscription.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index b1949693ec83..899e50b06d3c 100644 --- 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 @@ -807,7 +807,7 @@ "format": "int64" }, "reseller": { - "description": "The reseller for which the subscription is created. The field is available for Microsoft Partner Agreement billing accounts..", + "description": "The reseller for which the subscription is created. The field is available for Microsoft Partner Agreement billing accounts.", "$ref": "#/definitions/Reseller" }, "renewalTermDetails": { From 8fa92d52a44e93cdcff982f3bbe3b3d57590d5c0 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Mon, 25 Oct 2021 10:14:09 -0700 Subject: [PATCH 33/36] PR feedback - productCategory description --- .../stable/2021-10-01/billingSubscription.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 899e50b06d3c..9c878a10639c 100644 --- 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 @@ -782,7 +782,7 @@ "readOnly": true }, "productCategory": { - "description": "The category of the subscription. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, Software, UsageBased, Other", + "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 }, From 516460765c727f8d4037cee30ca4cd0f051ae788 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 26 Oct 2021 18:53:38 -0700 Subject: [PATCH 34/36] Added billingPolicies, removed billingProfileSpendingLimitDetails --- .../2021-10-01/billingSubscription.json | 85 ++----------------- .../examples/BillingSubscription.json | 5 -- .../examples/BillingSubscriptionAlias.json | 5 -- ...SubscriptionAliasListByBillingAccount.json | 5 -- ...lingSubscriptionsListByBillingAccount.json | 5 -- .../examples/MoveBillingSubscription.json | 5 -- .../examples/UpdateBillingSubscription.json | 5 -- 7 files changed, 9 insertions(+), 106 deletions(-) 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 index 9c878a10639c..c4fc3ea2b466 100644 --- 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 @@ -703,6 +703,15 @@ "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 additional 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", @@ -713,11 +722,6 @@ "type": "string", "readOnly": true }, - "billingProfileSpendingLimitDetails": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/BillingProfileSpendingLimitDetails", - "title": "The details of the spending limit that is set on the billing profile to which the subscription is billed." - }, "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" @@ -875,77 +879,6 @@ } } }, - "BillingProfileSpendingLimitDetails": { - "description": "The spending limit details of the billing profiles to which the subscription is billed.", - "type": "object", - "readOnly": true, - "properties": { - "amount": { - "description": "The spending limit value.", - "type": "number", - "readOnly": true - }, - "currency": { - "description": "The spending limit currency.", - "type": "string", - "readOnly": true - }, - "startDate": { - "type": "string", - "format": "date-time", - "description": "The start date of the spending limit.", - "readOnly": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "description": "The end date of the spending limit.", - "readOnly": true - }, - "status": { - "description": "The status of the spending limit.", - "type": "string", - "enum": [ - "Unknown", - "None", - "Active", - "Expired", - "LimitReached", - "LimitRemoved" - ], - "readOnly": true, - "x-ms-enum": { - "name": "BillingSubscriptionCreditStatus", - "modelAsString": true - } - }, - "type": { - "description": "The type of spending limit.", - "type": "string", - "enum": [ - "Unknown", - "None", - "FreeAccount", - "AzureForStudents", - "AcademicSponsorship", - "AzureConsumptionCredit", - "AzurePassSponsorship", - "MpnSponsorship", - "MSDN", - "NonProfitSponsorship", - "Sponsorship", - "StartupSponsorship", - "AzureForStudentsStarter", - "VisualStudio" - ], - "readOnly": true, - "x-ms-enum": { - "name": "SpendingLimitType", - "modelAsString": true - } - } - } - }, "BillingSubscriptionMergeRequest": { "description": "Request to merge two billing subscriptions", "type": "object", 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 index ee5aa6642eed..575e352b6e52 100644 --- 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 @@ -16,11 +16,6 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", - "billingProfileSpendingLimitDetails": { - "type": "None", - "startDate": "2021-02-01T00:00:00Z", - "status": "None" - }, "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", 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 index 210bb0e93d6a..c4fe33656def 100644 --- 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 @@ -16,11 +16,6 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", - "billingProfileSpendingLimitDetails": { - "type": "None", - "startDate": "2021-02-01T00:00:00Z", - "status": "None" - }, "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", 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 index ddf4054ddfe2..21c364fc2bec 100644 --- 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 @@ -17,11 +17,6 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", - "billingProfileSpendingLimitDetails": { - "type": "None", - "startDate": "2021-02-01T00:00:00Z", - "status": "None" - }, "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", 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 index d5be7d64325a..8d9268c48bc5 100644 --- 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 @@ -17,11 +17,6 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", - "billingProfileSpendingLimitDetails": { - "type": "None", - "startDate": "2021-02-01T00:00:00Z", - "status": "None" - }, "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", 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 index 802f0e8beb80..3ebd0af36600 100644 --- 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 @@ -19,11 +19,6 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", - "billingProfileSpendingLimitDetails": { - "type": "None", - "startDate": "2021-02-01T00:00:00Z", - "status": "None" - }, "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", 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 index 8fed27a8d95e..b8102b934946 100644 --- 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 @@ -21,11 +21,6 @@ "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664", "billingProfileDisplayName": "Contoso operations billing profile", "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664", - "billingProfileSpendingLimitDetails": { - "type": "None", - "startDate": "2021-02-01T00:00:00Z", - "status": "None" - }, "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", From cd0b8a9043c51ff56faa70a6b04d561b7ff81501 Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:23:52 -0700 Subject: [PATCH 35/36] Updated billingPolicies description --- .../stable/2021-10-01/billingSubscription.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index c4fc3ea2b466..8c6d814da6e6 100644 --- 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 @@ -705,7 +705,7 @@ }, "billingPolicies": { "type": "object", - "description": "Dictionary of additional billing policies associated with the subscription.", + "description": "Dictionary of billing policies associated with the subscription.", "additionalProperties": { "type": "string" }, From 6091b9bccc1c4f4e2701bfcc55e2e44e53610cee Mon Sep 17 00:00:00 2001 From: jbuls <48029054+jbuls@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:32:59 -0700 Subject: [PATCH 36/36] Reverted current tag change in readme.cmd --- specification/billing/resource-manager/readme.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 6bb8a2c83da5..4245785842a7 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -25,10 +25,8 @@ To see additional help and options, run: These are the global settings for the Billing API. ``` yaml -title: BillingManagementClient -description: Billing Client openapi-type: arm -tag: package-2021-10 +tag: package-2020-05 ``` ### Tag: package-2021-10