Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR azure-mgmt-billing] Try Fix Billing Swagger #13758

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions sdk/billing/azure-mgmt-billing/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
## Microsoft Azure SDK for Python
# Microsoft Azure SDK for Python

This is the Microsoft Azure Billing Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

Azure Resource Manager (ARM) is the next generation of management APIs
that replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
# Usage

For the older Azure Service Management (ASM) libraries, see
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
library.

For a more complete set of Azure libraries, see the
[azure sdk python release](https://aka.ms/azsdk/python/all).

## Usage

For code examples, see
[Billing](https://docs.microsoft.com/python/api/overview/azure/billing)
For code examples, see [Billing](https://docs.microsoft.com/python/api/overview/azure/billing)
on docs.microsoft.com.

## Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
# Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.

![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-billing%2FREADME.png)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-billing%2FREADME.png)
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .billing_management_client import BillingManagementClient
from .version import VERSION
from ._configuration import BillingManagementClientConfiguration
from ._billing_management_client import BillingManagementClient
__all__ = ['BillingManagementClient', 'BillingManagementClientConfiguration']

__all__ = ['BillingManagementClient']
from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import BillingManagementClientConfiguration
from .operations import BillingAccountsOperations
from .operations import AddressOperations
from .operations import AvailableBalancesOperations
from .operations import InstructionsOperations
from .operations import BillingProfilesOperations
from .operations import CustomersOperations
from .operations import InvoiceSectionsOperations
from .operations import BillingPermissionsOperations
from .operations import BillingSubscriptionsOperations
from .operations import ProductsOperations
from .operations import InvoicesOperations
from .operations import TransactionsOperations
from .operations import PoliciesOperations
from .operations import BillingPropertyOperations
from .operations import Operations
from .operations import BillingRoleDefinitionsOperations
from .operations import BillingRoleAssignmentsOperations
from .operations import AgreementsOperations
from .operations import EnrollmentAccountsOperations
from .operations import BillingPeriodsOperations
from . import models


class BillingManagementClient(SDKClient):
"""Billing client provides access to billing resources for Azure subscriptions.

:ivar config: Configuration for client.
:vartype config: BillingManagementClientConfiguration

:ivar billing_accounts: BillingAccounts operations
:vartype billing_accounts: azure.mgmt.billing.operations.BillingAccountsOperations
:ivar address: Address operations
:vartype address: azure.mgmt.billing.operations.AddressOperations
:ivar available_balances: AvailableBalances operations
:vartype available_balances: azure.mgmt.billing.operations.AvailableBalancesOperations
:ivar instructions: Instructions operations
:vartype instructions: azure.mgmt.billing.operations.InstructionsOperations
:ivar billing_profiles: BillingProfiles operations
:vartype billing_profiles: azure.mgmt.billing.operations.BillingProfilesOperations
:ivar customers: Customers operations
:vartype customers: azure.mgmt.billing.operations.CustomersOperations
:ivar invoice_sections: InvoiceSections operations
:vartype invoice_sections: azure.mgmt.billing.operations.InvoiceSectionsOperations
:ivar billing_permissions: BillingPermissions operations
:vartype billing_permissions: azure.mgmt.billing.operations.BillingPermissionsOperations
:ivar billing_subscriptions: BillingSubscriptions operations
:vartype billing_subscriptions: azure.mgmt.billing.operations.BillingSubscriptionsOperations
:ivar products: Products operations
:vartype products: azure.mgmt.billing.operations.ProductsOperations
:ivar invoices: Invoices operations
:vartype invoices: azure.mgmt.billing.operations.InvoicesOperations
:ivar transactions: Transactions operations
:vartype transactions: azure.mgmt.billing.operations.TransactionsOperations
:ivar policies: Policies operations
:vartype policies: azure.mgmt.billing.operations.PoliciesOperations
:ivar billing_property: BillingProperty operations
:vartype billing_property: azure.mgmt.billing.operations.BillingPropertyOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.billing.operations.Operations
:ivar billing_role_definitions: BillingRoleDefinitions operations
:vartype billing_role_definitions: azure.mgmt.billing.operations.BillingRoleDefinitionsOperations
:ivar billing_role_assignments: BillingRoleAssignments operations
:vartype billing_role_assignments: azure.mgmt.billing.operations.BillingRoleAssignmentsOperations
:ivar agreements: Agreements operations
:vartype agreements: azure.mgmt.billing.operations.AgreementsOperations
:ivar enrollment_accounts: EnrollmentAccounts operations
:vartype enrollment_accounts: azure.mgmt.billing.operations.EnrollmentAccountsOperations
:ivar billing_periods: BillingPeriods operations
:vartype billing_periods: azure.mgmt.billing.operations.BillingPeriodsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID that uniquely identifies an Azure
subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = BillingManagementClientConfiguration(credentials, subscription_id, base_url)
super(BillingManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.billing_accounts = BillingAccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.address = AddressOperations(
self._client, self.config, self._serialize, self._deserialize)
self.available_balances = AvailableBalancesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.instructions = InstructionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_profiles = BillingProfilesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.customers = CustomersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.invoice_sections = InvoiceSectionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_permissions = BillingPermissionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_subscriptions = BillingSubscriptionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.products = ProductsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.invoices = InvoicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.transactions = TransactionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.policies = PoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_property = BillingPropertyOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_role_definitions = BillingRoleDefinitionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_role_assignments = BillingRoleAssignmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.agreements = AgreementsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.enrollment_accounts = EnrollmentAccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_periods = BillingPeriodsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrestazure import AzureConfiguration

from .version import VERSION


class BillingManagementClientConfiguration(AzureConfiguration):
"""Configuration for BillingManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID that uniquely identifies an Azure
subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(BillingManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-billing/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id

This file was deleted.

Loading