diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json new file mode 100644 index 000000000000..b3264e255765 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -0,0 +1,699 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-03-01-preview", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/billingAccounts": { + "get": { + "tags": [ + "BillingAccounts" + ], + "x-ms-examples": { + "BillingAccountsList": { + "$ref": "./examples/BillingAccountsList.json" + } + }, + "operationId": "BillingAccounts_List", + "description": "Lists the billing accounts the caller has access to.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingAccountListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{name}": { + "get": { + "tags": [ + "BillingAccounts" + ], + "x-ms-examples": { + "BillingAccountsGet": { + "$ref": "./examples/BillingAccountsGet.json" + } + }, + "operationId": "BillingAccounts_Get", + "description": "Gets a billing account by name.", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Billing Account name.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingAccountResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods": { + "get": { + "tags": [ + "BillingPeriods" + ], + "operationId": "BillingPeriods_List", + "description": "Lists the available billing periods for a subscription in reverse chronological order. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.", + "externalDocs": { + "url": "https://go.microsoft.com/fwlink/?linkid=844490" + }, + "x-ms-examples": { + "BillingPeriodsList": { + "$ref": "./examples/BillingPeriodsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$filter", + "description": "May be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N billing periods.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 100 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingPeriodsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}": { + "get": { + "tags": [ + "BillingPeriods" + ], + "operationId": "BillingPeriods_Get", + "description": "Gets a named billing period. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.", + "x-ms-examples": { + "BillingPeriodsGet": { + "$ref": "./examples/BillingPeriodsGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "billingPeriodName", + "description": "The name of a BillingPeriod resource.", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingPeriod" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices": { + "get": { + "tags": [ + "Invoices" + ], + "operationId": "Invoices_List", + "description": "Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.", + "externalDocs": { + "url": "https://go.microsoft.com/fwlink/?linkid=842057" + }, + "x-ms-examples": { + "InvoicesList": { + "$ref": "./examples/InvoicesList.json" + }, + "InvoicesExpand": { + "$ref": "./examples/InvoicesExpand.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N invoices.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 100 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/InvoicesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}": { + "get": { + "tags": [ + "Invoices" + ], + "operationId": "Invoices_Get", + "description": "Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.", + "x-ms-examples": { + "InvoicesGet": { + "$ref": "./examples/InvoicesGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "invoiceName", + "description": "The name of an invoice resource.", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Invoice" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest": { + "get": { + "tags": [ + "Invoices" + ], + "operationId": "Invoices_GetLatest", + "description": "Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.", + "x-ms-examples": { + "InvoicesGetLatest": { + "$ref": "./examples/InvoicesGetLatest.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Invoice" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available billing REST API operations.", + "parameters": [ + { + "$ref": "#/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": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "BillingAccountResult": { + "description": "A billing account resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "description": "A billing account.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/BillingAccountProperties" + } + } + }, + "BillingAccountListResult": { + "description": "Result of listing billing accounts.", + "properties": { + "value": { + "description": "The list of billing accounts.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/BillingAccountResult" + } + } + } + }, + "BillingAccountProperties": { + "description": "The properties of the billing account.", + "properties": { + "principalName": { + "description": "The account owner's principal name.", + "type": "string", + "readOnly": true + } + } + }, + "BillingPeriod": { + "description": "A billing period resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "description": "A billing period.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/BillingPeriodProperties" + } + } + }, + "BillingPeriodsListResult": { + "description": "Result of listing billing periods. It contains a list of available billing periods in reverse chronological order.", + "properties": { + "value": { + "description": "The list of billing periods.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/BillingPeriod" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "BillingPeriodProperties": { + "description": "The properties of the billing period.", + "properties": { + "billingPeriodStartDate": { + "description": "The start of the date range covered by the billing period.", + "type": "string", + "format": "date", + "readOnly": true + }, + "billingPeriodEndDate": { + "description": "The end of the date range covered by the billing period.", + "type": "string", + "format": "date", + "readOnly": true + }, + "invoiceIds": { + "description": "Array of invoice ids that associated with.", + "type": "array", + "readOnly": true, + "items": { + "type": "string" + } + } + } + }, + "DownloadUrl": { + "description": "A secure URL that can be used to download a PDF invoice until the URL expires.", + "properties": { + "expiryTime": { + "description": "The time in UTC at which this download URL will expire.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "url": { + "description": "The URL to the PDF file.", + "type": "string", + "readOnly": 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 + } + } + }, + "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" + } + } + }, + "Invoice": { + "description": "An invoice resource can be used download a PDF version of an invoice.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "description": "An invoice.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/InvoiceProperties" + } + } + }, + "InvoicesListResult": { + "description": "Result of listing invoices. It contains a list of available invoices in reverse chronological order.", + "properties": { + "value": { + "description": "The list of invoices.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Invoice" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "InvoiceProperties": { + "description": "The properties of the invoice.", + "properties": { + "downloadUrl": { + "description": "A secure link to download the PDF version of an invoice. The link will cease to work after its expiry time is reached.", + "$ref": "#/definitions/DownloadUrl" + }, + "invoicePeriodStartDate": { + "description": "The start of the date range covered by the invoice.", + "type": "string", + "format": "date", + "readOnly": true + }, + "invoicePeriodEndDate": { + "description": "The end of the date range covered by the invoice.", + "type": "string", + "format": "date", + "readOnly": true + }, + "billingPeriodIds": { + "description": "Array of billing perdiod ids that the invoice is attributed to.", + "type": "array", + "readOnly": true, + "items": { + "type": "string" + } + } + } + }, + "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.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Billing.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: Invoice, etc.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "OperationListResult": { + "description": "Result listing billing operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "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 + } + } + }, + "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 + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request. The current version is 2018-03-01-preview." + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + } + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingAccountsGet.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingAccountsGet.json new file mode 100644 index 000000000000..99590e48edcb --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingAccountsGet.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "name": "e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556", + "name": "e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556", + "type": "Microsoft.Billing/billingAccounts", + "properties": { + "principalName": "kathy@contoso.com" + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingAccountsList.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingAccountsList.json new file mode 100644 index 000000000000..ac4d69565073 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingAccountsList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556", + "name": "e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556", + "type": "Microsoft.Billing/billingAccounts", + "properties": { + "principalName": "kathy@contoso.com" + } + }, + { + "id": "/providers/Microsoft.Billing/billingAccounts/edd24053-07cd-4ed4-aa5b-326160a6680d", + "name": "edd24053-07cd-4ed4-aa5b-326160a6680d", + "type": "Microsoft.Billing/billingAccounts", + "properties": { + "principalName": "dan@contoso.com" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingPeriodsGet.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingPeriodsGet.json new file mode 100644 index 000000000000..0efed6df4954 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingPeriodsGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "subid", + "billingPeriodName": "201702-1" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1", + "name": "201702-1", + "type": "Microsoft.Billing/billingPeriods", + "properties": { + "billingPeriodStartDate": "2017-01-01", + "billingPeriodEndDate": "2017-02-01", + "invoiceIds": [ + "/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789", + "/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-01-05-987654321" + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingPeriodsList.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingPeriodsList.json new file mode 100644 index 000000000000..916da674a06f --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingPeriodsList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1", + "name": "201702-1", + "type": "Microsoft.Billing/billingPeriods", + "properties": { + "billingPeriodStartDate": "2017-01-01", + "billingPeriodEndDate": "2017-02-01", + "invoiceIds": [ + "/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789", + "/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-01-05-987654321" + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesExpand.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesExpand.json new file mode 100644 index 000000000000..edc75d2c4c91 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesExpand.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "subid", + "$top": 1, + "$filter": "invoicePeriodStartDate le 2017-02-01", + "$expand": "downloadUrl" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789", + "name": "2017-02-05-123456789", + "type": "Microsoft.Billing/invoices", + "properties": { + "invoicePeriodStartDate": "2017-01-01", + "invoicePeriodEndDate": "2017-02-01", + "billingPeriodIds": [ + "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1", + "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201701-1" + ], + "downloadUrl": { + "expiryTime": "2017-02-13T20:46:30Z", + "url": "https://microsoft.com" + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesGet.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesGet.json new file mode 100644 index 000000000000..d90e95dded1f --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "subid", + "invoiceName": "2017-02-05-123456789" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789", + "name": "2017-02-05-123456789", + "type": "Microsoft.Billing/invoices", + "properties": { + "invoicePeriodStartDate": "2017-01-01", + "invoicePeriodEndDate": "2017-02-01", + "billingPeriodIds": [ + "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1", + "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201701-1" + ], + "downloadUrl": { + "expiryTime": "2017-02-13T20:46:30Z", + "url": "https://microsoft.com" + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesGetLatest.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesGetLatest.json new file mode 100644 index 000000000000..c6b2b4d2f34e --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesGetLatest.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789", + "name": "2017-02-05-123456789", + "type": "Microsoft.Billing/invoices", + "properties": { + "invoicePeriodStartDate": "2017-01-01", + "invoicePeriodEndDate": "2017-02-01", + "billingPeriodIds": [ + "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1", + "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201701-1" + ], + "downloadUrl": { + "expiryTime": "2017-02-13T20:46:30Z", + "url": "https://microsoft.com" + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesList.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesList.json new file mode 100644 index 000000000000..293a1cb07119 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/InvoicesList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789", + "name": "2017-02-05-123456789", + "type": "Microsoft.Billing/invoices", + "properties": { + "invoicePeriodStartDate": "2017-01-01", + "invoicePeriodEndDate": "2017-02-01", + "billingPeriodIds": [ + "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1", + "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201701-1" + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 288f79007011..f109773a36fe 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -26,10 +26,19 @@ These are the global settings for the Billing API. ``` yaml openapi-type: arm -tag: package-2017-04-preview +tag: package-2018-03-preview ``` +### Tag: package-2018-03-preview + +These settings apply only when `--tag=package-2018-03-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2018-03-preview' +input-file: +- Microsoft.Billing/preview/2018-03-01-preview/billing.json +``` + ### Tag: package-2017-04-preview These settings apply only when `--tag=package-2017-04-preview` is specified on the command line. @@ -121,10 +130,20 @@ go: ### Go multi-api ``` yaml $(go) && $(multiapi) batch: + - tag: package-2018-03-preview - tag: package-2017-04-preview - tag: package-2017-02-preview ``` +### Tag: package-2018-03-preview and go + +These settings apply only when `--tag=package-2018-03-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2018-03-preview' && $(go) +output-folder: $(go-sdk-folder)/services/billing/mgmt/2018-03-01-preview/billing +``` + ### Tag: package-2017-04-preview and go These settings apply only when `--tag=package-2017-04-preview --go` is specified on the command line.