Interface BillingAccountsClient
public interface BillingAccountsClient
An instance of this class provides access to all the operations defined in BillingAccountsClient.
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<BillingAccountInner>,
BillingAccountInner> beginUpdate
(String billingAccountName, BillingAccountUpdateRequest parameters) Updates the properties of a billing account.com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<BillingAccountInner>,
BillingAccountInner> beginUpdate
(String billingAccountName, BillingAccountUpdateRequest parameters, com.azure.core.util.Context context) Updates the properties of a billing account.Gets a billing account by its ID.com.azure.core.http.rest.Response<BillingAccountInner>
getWithResponse
(String billingAccountName, String expand, com.azure.core.util.Context context) Gets a billing account by its ID.com.azure.core.http.rest.PagedIterable<BillingAccountInner>
list()
Lists the billing accounts that a user has access to.com.azure.core.http.rest.PagedIterable<BillingAccountInner>
Lists the billing accounts that a user has access to.com.azure.core.http.rest.PagedIterable<InvoiceSectionWithCreateSubPermissionInner>
listInvoiceSectionsByCreateSubscriptionPermission
(String billingAccountName) Lists the invoice sections for which the user has permission to create Azure subscriptions.com.azure.core.http.rest.PagedIterable<InvoiceSectionWithCreateSubPermissionInner>
listInvoiceSectionsByCreateSubscriptionPermission
(String billingAccountName, com.azure.core.util.Context context) Lists the invoice sections for which the user has permission to create Azure subscriptions.update
(String billingAccountName, BillingAccountUpdateRequest parameters) Updates the properties of a billing account.update
(String billingAccountName, BillingAccountUpdateRequest parameters, com.azure.core.util.Context context) Updates the properties of a billing account.
-
Method Details
-
list
com.azure.core.http.rest.PagedIterable<BillingAccountInner> list()Lists the billing accounts that a user has access to.- Returns:
- the list of billing accounts as paginated response with
PagedIterable
. - Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<BillingAccountInner> list(String expand, com.azure.core.util.Context context) Lists the billing accounts that a user has access to.- Parameters:
expand
- May be used to expand the soldTo, invoice sections and billing profiles.context
- The context to associate with this operation.- Returns:
- the list of billing accounts as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getWithResponse
com.azure.core.http.rest.Response<BillingAccountInner> getWithResponse(String billingAccountName, String expand, com.azure.core.util.Context context) Gets a billing account by its ID.- Parameters:
billingAccountName
- The ID that uniquely identifies a billing account.expand
- May be used to expand the soldTo, invoice sections and billing profiles.context
- The context to associate with this operation.- Returns:
- a billing account by its ID along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
get
Gets a billing account by its ID.- Parameters:
billingAccountName
- The ID that uniquely identifies a billing account.- Returns:
- a billing account by its ID.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginUpdate
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<BillingAccountInner>,BillingAccountInner> beginUpdate(String billingAccountName, BillingAccountUpdateRequest parameters) Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.- Parameters:
billingAccountName
- The ID that uniquely identifies a billing account.parameters
- Request parameters that are provided to the update billing account operation.- Returns:
- the
SyncPoller
for polling of a billing account. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginUpdate
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<BillingAccountInner>,BillingAccountInner> beginUpdate(String billingAccountName, BillingAccountUpdateRequest parameters, com.azure.core.util.Context context) Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.- Parameters:
billingAccountName
- The ID that uniquely identifies a billing account.parameters
- Request parameters that are provided to the update billing account operation.context
- The context to associate with this operation.- Returns:
- the
SyncPoller
for polling of a billing account. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
update
Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.- Parameters:
billingAccountName
- The ID that uniquely identifies a billing account.parameters
- Request parameters that are provided to the update billing account operation.- Returns:
- a billing account.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
update
BillingAccountInner update(String billingAccountName, BillingAccountUpdateRequest parameters, com.azure.core.util.Context context) Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.- Parameters:
billingAccountName
- The ID that uniquely identifies a billing account.parameters
- Request parameters that are provided to the update billing account operation.context
- The context to associate with this operation.- Returns:
- a billing account.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
listInvoiceSectionsByCreateSubscriptionPermission
com.azure.core.http.rest.PagedIterable<InvoiceSectionWithCreateSubPermissionInner> listInvoiceSectionsByCreateSubscriptionPermission(String billingAccountName) Lists the invoice sections for which the user has permission to create Azure subscriptions. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.- Parameters:
billingAccountName
- The ID that uniquely identifies a billing account.- Returns:
- the list of invoice section properties with create subscription permission as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
listInvoiceSectionsByCreateSubscriptionPermission
com.azure.core.http.rest.PagedIterable<InvoiceSectionWithCreateSubPermissionInner> listInvoiceSectionsByCreateSubscriptionPermission(String billingAccountName, com.azure.core.util.Context context) Lists the invoice sections for which the user has permission to create Azure subscriptions. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.- Parameters:
billingAccountName
- The ID that uniquely identifies a billing account.context
- The context to associate with this operation.- Returns:
- the list of invoice section properties with create subscription permission as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-