Share via


Billing Periods - Get

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.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}?api-version=2018-03-01-preview

URI Parameters

Name In Required Type Description
billingPeriodName
path True

string

The name of a BillingPeriod resource.

subscriptionId
path True

string

The ID that uniquely identifies an Azure subscription.

api-version
query True

string

Version of the API to be used with the client request. The current version is 2018-03-01-preview.

Responses

Name Type Description
200 OK

BillingPeriod

OK. The request has succeeded.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

BillingPeriodsGet

Sample request

GET https://management.azure.com/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1?api-version=2018-03-01-preview

Sample response

{
  "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"
    ]
  }
}

Definitions

Name Description
BillingPeriod

A billing period resource.

ErrorDetails

The details of the error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

ErrorSubDetails

BillingPeriod

A billing period resource.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.billingPeriodEndDate

string (date)

The end of the date range covered by the billing period.

properties.billingPeriodStartDate

string (date)

The start of the date range covered by the billing period.

properties.invoiceIds

string[]

Array of invoice ids that associated with.

type

string

Resource type.

ErrorDetails

The details of the error.

Name Type Description
code

string

Error code.

details

ErrorSubDetails[]

The sub details of the error.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
error

ErrorDetails

The details of the error.

ErrorSubDetails

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.