azure-sdk-for-go: github.com/Azure/azure-sdk-for-go/services/preview/billing/mgmt/2018-03-01-preview/billing Index | Files | Directories

package billing

import "github.com/Azure/azure-sdk-for-go/services/preview/billing/mgmt/2018-03-01-preview/billing"

Package billing implements the Azure ARM Billing service API version 2018-03-01-preview.

Billing client provides access to billing resources for Azure subscriptions.

Index

Package Files

client.go enrollmentaccounts.go invoices.go models.go operations.go periods.go version.go

Constants

const (
    // DefaultBaseURI is the default URI used for the service Billing
    DefaultBaseURI = "https://management.azure.com"
)

func UserAgent Uses

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version Uses

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

type BaseClient Uses

type BaseClient struct {
    autorest.Client
    BaseURI        string
    SubscriptionID string
}

BaseClient is the base client for Billing.

func New Uses

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI Uses

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type DownloadURL Uses

type DownloadURL struct {
    // ExpiryTime - READ-ONLY; The time in UTC at which this download URL will expire.
    ExpiryTime *date.Time `json:"expiryTime,omitempty"`
    // URL - READ-ONLY; The URL to the PDF file.
    URL *string `json:"url,omitempty"`
}

DownloadURL a secure URL that can be used to download a PDF invoice until the URL expires.

type EnrollmentAccount Uses

type EnrollmentAccount struct {
    autorest.Response `json:"-"`
    // EnrollmentAccountProperties - An enrollment account.
    *EnrollmentAccountProperties `json:"properties,omitempty"`
    // ID - READ-ONLY; Resource Id.
    ID  *string `json:"id,omitempty"`
    // Name - READ-ONLY; Resource name.
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; Resource type.
    Type *string `json:"type,omitempty"`
}

EnrollmentAccount an enrollment account resource.

func (EnrollmentAccount) MarshalJSON Uses

func (ea EnrollmentAccount) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for EnrollmentAccount.

func (*EnrollmentAccount) UnmarshalJSON Uses

func (ea *EnrollmentAccount) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for EnrollmentAccount struct.

type EnrollmentAccountListResult Uses

type EnrollmentAccountListResult struct {
    autorest.Response `json:"-"`
    // Value - READ-ONLY; The list of enrollment accounts.
    Value *[]EnrollmentAccount `json:"value,omitempty"`
    // NextLink - READ-ONLY; The link (url) to the next page of results.
    NextLink *string `json:"nextLink,omitempty"`
}

EnrollmentAccountListResult result of listing enrollment accounts.

func (EnrollmentAccountListResult) IsEmpty Uses

func (ealr EnrollmentAccountListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type EnrollmentAccountListResultIterator Uses

type EnrollmentAccountListResultIterator struct {
    // contains filtered or unexported fields
}

EnrollmentAccountListResultIterator provides access to a complete listing of EnrollmentAccount values.

func NewEnrollmentAccountListResultIterator Uses

func NewEnrollmentAccountListResultIterator(page EnrollmentAccountListResultPage) EnrollmentAccountListResultIterator

Creates a new instance of the EnrollmentAccountListResultIterator type.

func (*EnrollmentAccountListResultIterator) Next Uses

func (iter *EnrollmentAccountListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*EnrollmentAccountListResultIterator) NextWithContext Uses

func (iter *EnrollmentAccountListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (EnrollmentAccountListResultIterator) NotDone Uses

func (iter EnrollmentAccountListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (EnrollmentAccountListResultIterator) Response Uses

func (iter EnrollmentAccountListResultIterator) Response() EnrollmentAccountListResult

Response returns the raw server response from the last page request.

func (EnrollmentAccountListResultIterator) Value Uses

func (iter EnrollmentAccountListResultIterator) Value() EnrollmentAccount

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type EnrollmentAccountListResultPage Uses

type EnrollmentAccountListResultPage struct {
    // contains filtered or unexported fields
}

EnrollmentAccountListResultPage contains a page of EnrollmentAccount values.

func NewEnrollmentAccountListResultPage Uses

func NewEnrollmentAccountListResultPage(getNextPage func(context.Context, EnrollmentAccountListResult) (EnrollmentAccountListResult, error)) EnrollmentAccountListResultPage

Creates a new instance of the EnrollmentAccountListResultPage type.

func (*EnrollmentAccountListResultPage) Next Uses

func (page *EnrollmentAccountListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*EnrollmentAccountListResultPage) NextWithContext Uses

func (page *EnrollmentAccountListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (EnrollmentAccountListResultPage) NotDone Uses

func (page EnrollmentAccountListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (EnrollmentAccountListResultPage) Response Uses

func (page EnrollmentAccountListResultPage) Response() EnrollmentAccountListResult

Response returns the raw server response from the last page request.

func (EnrollmentAccountListResultPage) Values Uses

func (page EnrollmentAccountListResultPage) Values() []EnrollmentAccount

Values returns the slice of values for the current page or nil if there are no values.

type EnrollmentAccountProperties Uses

type EnrollmentAccountProperties struct {
    // PrincipalName - READ-ONLY; The account owner's principal name.
    PrincipalName *string `json:"principalName,omitempty"`
}

EnrollmentAccountProperties the properties of the enrollment account.

type EnrollmentAccountsClient Uses

type EnrollmentAccountsClient struct {
    BaseClient
}

EnrollmentAccountsClient is the billing client provides access to billing resources for Azure subscriptions.

func NewEnrollmentAccountsClient Uses

func NewEnrollmentAccountsClient(subscriptionID string) EnrollmentAccountsClient

NewEnrollmentAccountsClient creates an instance of the EnrollmentAccountsClient client.

func NewEnrollmentAccountsClientWithBaseURI Uses

func NewEnrollmentAccountsClientWithBaseURI(baseURI string, subscriptionID string) EnrollmentAccountsClient

NewEnrollmentAccountsClientWithBaseURI creates an instance of the EnrollmentAccountsClient client.

func (EnrollmentAccountsClient) Get Uses

func (client EnrollmentAccountsClient) Get(ctx context.Context, name string) (result EnrollmentAccount, err error)

Get gets a enrollment account by name. Parameters: name - enrollment Account name.

func (EnrollmentAccountsClient) GetPreparer Uses

func (client EnrollmentAccountsClient) GetPreparer(ctx context.Context, name string) (*http.Request, error)

GetPreparer prepares the Get request.

func (EnrollmentAccountsClient) GetResponder Uses

func (client EnrollmentAccountsClient) GetResponder(resp *http.Response) (result EnrollmentAccount, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (EnrollmentAccountsClient) GetSender Uses

func (client EnrollmentAccountsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (EnrollmentAccountsClient) List Uses

func (client EnrollmentAccountsClient) List(ctx context.Context) (result EnrollmentAccountListResultPage, err error)

List lists the enrollment accounts the caller has access to.

func (EnrollmentAccountsClient) ListComplete Uses

func (client EnrollmentAccountsClient) ListComplete(ctx context.Context) (result EnrollmentAccountListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (EnrollmentAccountsClient) ListPreparer Uses

func (client EnrollmentAccountsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (EnrollmentAccountsClient) ListResponder Uses

func (client EnrollmentAccountsClient) ListResponder(resp *http.Response) (result EnrollmentAccountListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (EnrollmentAccountsClient) ListSender Uses

func (client EnrollmentAccountsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ErrorDetails Uses

type ErrorDetails struct {
    // Code - READ-ONLY; Error code.
    Code *string `json:"code,omitempty"`
    // Message - READ-ONLY; Error message indicating why the operation failed.
    Message *string `json:"message,omitempty"`
    // Target - READ-ONLY; The target of the particular error.
    Target *string `json:"target,omitempty"`
}

ErrorDetails the details of the error.

type ErrorResponse Uses

type ErrorResponse struct {
    // Error - The details of the error.
    Error *ErrorDetails `json:"error,omitempty"`
}

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

type Invoice Uses

type Invoice struct {
    autorest.Response `json:"-"`
    // InvoiceProperties - An invoice.
    *InvoiceProperties `json:"properties,omitempty"`
    // ID - READ-ONLY; Resource Id.
    ID  *string `json:"id,omitempty"`
    // Name - READ-ONLY; Resource name.
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; Resource type.
    Type *string `json:"type,omitempty"`
}

Invoice an invoice resource can be used download a PDF version of an invoice.

func (Invoice) MarshalJSON Uses

func (i Invoice) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Invoice.

func (*Invoice) UnmarshalJSON Uses

func (i *Invoice) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Invoice struct.

type InvoiceProperties Uses

type InvoiceProperties struct {
    // DownloadURL - A secure link to download the PDF version of an invoice. The link will cease to work after its expiry time is reached.
    DownloadURL *DownloadURL `json:"downloadUrl,omitempty"`
    // InvoicePeriodStartDate - READ-ONLY; The start of the date range covered by the invoice.
    InvoicePeriodStartDate *date.Date `json:"invoicePeriodStartDate,omitempty"`
    // InvoicePeriodEndDate - READ-ONLY; The end of the date range covered by the invoice.
    InvoicePeriodEndDate *date.Date `json:"invoicePeriodEndDate,omitempty"`
    // BillingPeriodIds - READ-ONLY; Array of billing period ids that the invoice is attributed to.
    BillingPeriodIds *[]string `json:"billingPeriodIds,omitempty"`
}

InvoiceProperties the properties of the invoice.

type InvoicesClient Uses

type InvoicesClient struct {
    BaseClient
}

InvoicesClient is the billing client provides access to billing resources for Azure subscriptions.

func NewInvoicesClient Uses

func NewInvoicesClient(subscriptionID string) InvoicesClient

NewInvoicesClient creates an instance of the InvoicesClient client.

func NewInvoicesClientWithBaseURI Uses

func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient

NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client.

func (InvoicesClient) Get Uses

func (client InvoicesClient) Get(ctx context.Context, invoiceName string) (result Invoice, err error)

Get 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. Parameters: invoiceName - the name of an invoice resource.

func (InvoicesClient) GetLatest Uses

func (client InvoicesClient) GetLatest(ctx context.Context) (result Invoice, err error)

GetLatest 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.

func (InvoicesClient) GetLatestPreparer Uses

func (client InvoicesClient) GetLatestPreparer(ctx context.Context) (*http.Request, error)

GetLatestPreparer prepares the GetLatest request.

func (InvoicesClient) GetLatestResponder Uses

func (client InvoicesClient) GetLatestResponder(resp *http.Response) (result Invoice, err error)

GetLatestResponder handles the response to the GetLatest request. The method always closes the http.Response Body.

func (InvoicesClient) GetLatestSender Uses

func (client InvoicesClient) GetLatestSender(req *http.Request) (*http.Response, error)

GetLatestSender sends the GetLatest request. The method will close the http.Response Body if it receives an error.

func (InvoicesClient) GetPreparer Uses

func (client InvoicesClient) GetPreparer(ctx context.Context, invoiceName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (InvoicesClient) GetResponder Uses

func (client InvoicesClient) GetResponder(resp *http.Response) (result Invoice, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (InvoicesClient) GetSender Uses

func (client InvoicesClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (InvoicesClient) List Uses

func (client InvoicesClient) List(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result InvoicesListResultPage, err error)

List 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. Parameters: expand - 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. filter - 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'. skiptoken - 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. top - may be used to limit the number of results to the most recent N invoices.

func (InvoicesClient) ListComplete Uses

func (client InvoicesClient) ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result InvoicesListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (InvoicesClient) ListPreparer Uses

func (client InvoicesClient) ListPreparer(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (InvoicesClient) ListResponder Uses

func (client InvoicesClient) ListResponder(resp *http.Response) (result InvoicesListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (InvoicesClient) ListSender Uses

func (client InvoicesClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type InvoicesListResult Uses

type InvoicesListResult struct {
    autorest.Response `json:"-"`
    // Value - READ-ONLY; The list of invoices.
    Value *[]Invoice `json:"value,omitempty"`
    // NextLink - READ-ONLY; The link (url) to the next page of results.
    NextLink *string `json:"nextLink,omitempty"`
}

InvoicesListResult result of listing invoices. It contains a list of available invoices in reverse chronological order.

func (InvoicesListResult) IsEmpty Uses

func (ilr InvoicesListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type InvoicesListResultIterator Uses

type InvoicesListResultIterator struct {
    // contains filtered or unexported fields
}

InvoicesListResultIterator provides access to a complete listing of Invoice values.

func NewInvoicesListResultIterator Uses

func NewInvoicesListResultIterator(page InvoicesListResultPage) InvoicesListResultIterator

Creates a new instance of the InvoicesListResultIterator type.

func (*InvoicesListResultIterator) Next Uses

func (iter *InvoicesListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*InvoicesListResultIterator) NextWithContext Uses

func (iter *InvoicesListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (InvoicesListResultIterator) NotDone Uses

func (iter InvoicesListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (InvoicesListResultIterator) Response Uses

func (iter InvoicesListResultIterator) Response() InvoicesListResult

Response returns the raw server response from the last page request.

func (InvoicesListResultIterator) Value Uses

func (iter InvoicesListResultIterator) Value() Invoice

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type InvoicesListResultPage Uses

type InvoicesListResultPage struct {
    // contains filtered or unexported fields
}

InvoicesListResultPage contains a page of Invoice values.

func NewInvoicesListResultPage Uses

func NewInvoicesListResultPage(getNextPage func(context.Context, InvoicesListResult) (InvoicesListResult, error)) InvoicesListResultPage

Creates a new instance of the InvoicesListResultPage type.

func (*InvoicesListResultPage) Next Uses

func (page *InvoicesListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*InvoicesListResultPage) NextWithContext Uses

func (page *InvoicesListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (InvoicesListResultPage) NotDone Uses

func (page InvoicesListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (InvoicesListResultPage) Response Uses

func (page InvoicesListResultPage) Response() InvoicesListResult

Response returns the raw server response from the last page request.

func (InvoicesListResultPage) Values Uses

func (page InvoicesListResultPage) Values() []Invoice

Values returns the slice of values for the current page or nil if there are no values.

type Operation Uses

type Operation struct {
    // Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}.
    Name *string `json:"name,omitempty"`
    // Display - The object that represents the operation.
    Display *OperationDisplay `json:"display,omitempty"`
}

Operation a Billing REST API operation.

type OperationDisplay Uses

type OperationDisplay struct {
    // Provider - READ-ONLY; Service provider: Microsoft.Billing.
    Provider *string `json:"provider,omitempty"`
    // Resource - READ-ONLY; Resource on which the operation is performed: Invoice, etc.
    Resource *string `json:"resource,omitempty"`
    // Operation - READ-ONLY; Operation type: Read, write, delete, etc.
    Operation *string `json:"operation,omitempty"`
}

OperationDisplay the object that represents the operation.

type OperationListResult Uses

type OperationListResult struct {
    autorest.Response `json:"-"`
    // Value - READ-ONLY; List of billing operations supported by the Microsoft.Billing resource provider.
    Value *[]Operation `json:"value,omitempty"`
    // NextLink - READ-ONLY; URL to get the next set of operation list results if there are any.
    NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult result listing billing operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) IsEmpty Uses

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator Uses

type OperationListResultIterator struct {
    // contains filtered or unexported fields
}

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator Uses

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next Uses

func (iter *OperationListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultIterator) NextWithContext Uses

func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (OperationListResultIterator) NotDone Uses

func (iter OperationListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (OperationListResultIterator) Response Uses

func (iter OperationListResultIterator) Response() OperationListResult

Response returns the raw server response from the last page request.

func (OperationListResultIterator) Value Uses

func (iter OperationListResultIterator) Value() Operation

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type OperationListResultPage Uses

type OperationListResultPage struct {
    // contains filtered or unexported fields
}

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage Uses

func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next Uses

func (page *OperationListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultPage) NextWithContext Uses

func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (OperationListResultPage) NotDone Uses

func (page OperationListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (OperationListResultPage) Response Uses

func (page OperationListResultPage) Response() OperationListResult

Response returns the raw server response from the last page request.

func (OperationListResultPage) Values Uses

func (page OperationListResultPage) Values() []Operation

Values returns the slice of values for the current page or nil if there are no values.

type OperationsClient Uses

type OperationsClient struct {
    BaseClient
}

OperationsClient is the billing client provides access to billing resources for Azure subscriptions.

func NewOperationsClient Uses

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI Uses

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List Uses

func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available billing REST API operations.

func (OperationsClient) ListComplete Uses

func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (OperationsClient) ListPreparer Uses

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder Uses

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender Uses

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Period Uses

type Period struct {
    autorest.Response `json:"-"`
    // PeriodProperties - A billing period.
    *PeriodProperties `json:"properties,omitempty"`
    // ID - READ-ONLY; Resource Id.
    ID  *string `json:"id,omitempty"`
    // Name - READ-ONLY; Resource name.
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; Resource type.
    Type *string `json:"type,omitempty"`
}

Period a billing period resource.

func (Period) MarshalJSON Uses

func (p Period) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Period.

func (*Period) UnmarshalJSON Uses

func (p *Period) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Period struct.

type PeriodProperties Uses

type PeriodProperties struct {
    // BillingPeriodStartDate - READ-ONLY; The start of the date range covered by the billing period.
    BillingPeriodStartDate *date.Date `json:"billingPeriodStartDate,omitempty"`
    // BillingPeriodEndDate - READ-ONLY; The end of the date range covered by the billing period.
    BillingPeriodEndDate *date.Date `json:"billingPeriodEndDate,omitempty"`
    // InvoiceIds - READ-ONLY; Array of invoice ids that associated with.
    InvoiceIds *[]string `json:"invoiceIds,omitempty"`
}

PeriodProperties the properties of the billing period.

type PeriodsClient Uses

type PeriodsClient struct {
    BaseClient
}

PeriodsClient is the billing client provides access to billing resources for Azure subscriptions.

func NewPeriodsClient Uses

func NewPeriodsClient(subscriptionID string) PeriodsClient

NewPeriodsClient creates an instance of the PeriodsClient client.

func NewPeriodsClientWithBaseURI Uses

func NewPeriodsClientWithBaseURI(baseURI string, subscriptionID string) PeriodsClient

NewPeriodsClientWithBaseURI creates an instance of the PeriodsClient client.

func (PeriodsClient) Get Uses

func (client PeriodsClient) Get(ctx context.Context, billingPeriodName string) (result Period, err error)

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. Parameters: billingPeriodName - the name of a BillingPeriod resource.

func (PeriodsClient) GetPreparer Uses

func (client PeriodsClient) GetPreparer(ctx context.Context, billingPeriodName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (PeriodsClient) GetResponder Uses

func (client PeriodsClient) GetResponder(resp *http.Response) (result Period, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (PeriodsClient) GetSender Uses

func (client PeriodsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (PeriodsClient) List Uses

func (client PeriodsClient) List(ctx context.Context, filter string, skiptoken string, top *int32) (result PeriodsListResultPage, err error)

List 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. Parameters: filter - 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'. skiptoken - 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. top - may be used to limit the number of results to the most recent N billing periods.

func (PeriodsClient) ListComplete Uses

func (client PeriodsClient) ListComplete(ctx context.Context, filter string, skiptoken string, top *int32) (result PeriodsListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (PeriodsClient) ListPreparer Uses

func (client PeriodsClient) ListPreparer(ctx context.Context, filter string, skiptoken string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (PeriodsClient) ListResponder Uses

func (client PeriodsClient) ListResponder(resp *http.Response) (result PeriodsListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (PeriodsClient) ListSender Uses

func (client PeriodsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type PeriodsListResult Uses

type PeriodsListResult struct {
    autorest.Response `json:"-"`
    // Value - READ-ONLY; The list of billing periods.
    Value *[]Period `json:"value,omitempty"`
    // NextLink - READ-ONLY; The link (url) to the next page of results.
    NextLink *string `json:"nextLink,omitempty"`
}

PeriodsListResult result of listing billing periods. It contains a list of available billing periods in reverse chronological order.

func (PeriodsListResult) IsEmpty Uses

func (plr PeriodsListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type PeriodsListResultIterator Uses

type PeriodsListResultIterator struct {
    // contains filtered or unexported fields
}

PeriodsListResultIterator provides access to a complete listing of Period values.

func NewPeriodsListResultIterator Uses

func NewPeriodsListResultIterator(page PeriodsListResultPage) PeriodsListResultIterator

Creates a new instance of the PeriodsListResultIterator type.

func (*PeriodsListResultIterator) Next Uses

func (iter *PeriodsListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*PeriodsListResultIterator) NextWithContext Uses

func (iter *PeriodsListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (PeriodsListResultIterator) NotDone Uses

func (iter PeriodsListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (PeriodsListResultIterator) Response Uses

func (iter PeriodsListResultIterator) Response() PeriodsListResult

Response returns the raw server response from the last page request.

func (PeriodsListResultIterator) Value Uses

func (iter PeriodsListResultIterator) Value() Period

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type PeriodsListResultPage Uses

type PeriodsListResultPage struct {
    // contains filtered or unexported fields
}

PeriodsListResultPage contains a page of Period values.

func NewPeriodsListResultPage Uses

func NewPeriodsListResultPage(getNextPage func(context.Context, PeriodsListResult) (PeriodsListResult, error)) PeriodsListResultPage

Creates a new instance of the PeriodsListResultPage type.

func (*PeriodsListResultPage) Next Uses

func (page *PeriodsListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*PeriodsListResultPage) NextWithContext Uses

func (page *PeriodsListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (PeriodsListResultPage) NotDone Uses

func (page PeriodsListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (PeriodsListResultPage) Response Uses

func (page PeriodsListResultPage) Response() PeriodsListResult

Response returns the raw server response from the last page request.

func (PeriodsListResultPage) Values Uses

func (page PeriodsListResultPage) Values() []Period

Values returns the slice of values for the current page or nil if there are no values.

type Resource Uses

type Resource struct {
    // ID - READ-ONLY; Resource Id.
    ID  *string `json:"id,omitempty"`
    // Name - READ-ONLY; Resource name.
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; Resource type.
    Type *string `json:"type,omitempty"`
}

Resource the Resource model definition.

Directories

PathSynopsis
billingapi

Package billing imports 10 packages (graph) and is imported by 4 packages. Updated 2019-09-03. Refresh now. Tools for package owners.