QueryOperations Class
QueryOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectQueryOperations
Constructor
QueryOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| usage |
Query the usage data for scope defined. |
| usage_by_external_cloud_provider_type |
Query the usage data for external cloud provider type defined. |
usage
Query the usage data for scope defined.
async usage(scope: str, parameters: azure.mgmt.costmanagement.models._models_py3.QueryDefinition, **kwargs: Any) -> Optional[azure.mgmt.costmanagement.models._models_py3.QueryResult]
Parameters
- scope
- str
The scope associated with query and export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- parameters
- QueryDefinition
Parameters supplied to the CreateOrUpdate Query Config operation.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
QueryResult, or the result of cls(response)
Return type
Exceptions
usage_by_external_cloud_provider_type
Query the usage data for external cloud provider type defined.
async usage_by_external_cloud_provider_type(external_cloud_provider_type: Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.ExternalCloudProviderType], external_cloud_provider_id: str, parameters: azure.mgmt.costmanagement.models._models_py3.QueryDefinition, **kwargs: Any) -> azure.mgmt.costmanagement.models._models_py3.QueryResult
Parameters
- external_cloud_provider_type
- str or ExternalCloudProviderType
The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- external_cloud_provider_id
- str
This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- parameters
- QueryDefinition
Parameters supplied to the CreateOrUpdate Query Config operation.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
QueryResult, or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.costmanagement.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\costmanagement\\models\\__init__.py'>
Feedback
Submit and view feedback for