resourcelookup#
Tools for looking up available Azure resources.
Functions#
|
Convert a |
|
Look up available VM image |
Module Contents#
- sku_to_dict(sku: azure.mgmt.batch.models.SupportedSku)#
Convert a
SupportedSku
object to a flat dictionary or property names and values.Parameters#
- sku
The
SupportedSku
object to convert.
Returns#
- dict
A flat dictionary with keys
'name'
,'family_name'
,'batch_support_end_of_life'
,'additional_properties'
, as well as keys and values corresponding to anySkuCapability
objects associated to theSupportedSku
.
- lookup_available_vm_skus_for_batch(client: azure.mgmt.batch.BatchManagementClient = None, config_dict: dict = None, try_env: bool = True, to_dict: bool = True, **kwargs)#
Look up available VM image SKUs for the given batch service.
Parameters#
- client
BatchManagementClient
to use when looking up the available images. IfNone
, use the output ofget_batch_management_client()
. DefaultNone
.- config_dict
Configuration dictionary. Passed as the
config_dict
argument to any internalconfig.get_config_val()
calls. See that function’s documentation for additional details.- try_env
Whether to look for configuration values in the available environment variables. Passed as the
try_env
argument to to any internalconfig.get_config_val()
calls. See that function’s documentation for additional details.- to_dict
Apply
sku_to_dict()
to the list of results? DefaultTrue
. IfFalse
, the result will be a list ofSupportedSku
objects.- **kwargs
Additional keyword arguments passed to
BatchManagementClient.location.list_supported_virtual_machine_skus()
.
Returns#
- list
Of supported SKUs, either as dictionaries of property names and values (default) or as raw
SupportedSku
objects (ifto_dict
isFalse
).