resourcelookup ============== .. py:module:: resourcelookup .. autoapi-nested-parse:: Tools for looking up available Azure resources. Functions --------- .. autoapisummary:: resourcelookup.sku_to_dict resourcelookup.lookup_available_vm_skus_for_batch Module Contents --------------- .. py:function:: sku_to_dict(sku: azure.mgmt.batch.models.SupportedSku) Convert a :class:`SupportedSku` object to a flat dictionary or property names and values. Parameters ---------- sku The :class:`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 any :class:`~azure.mgmt.batch.models.SkuCapability` objects associated to the :class:`SupportedSku`. .. py:function:: 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 :class:`BatchManagementClient` to use when looking up the available images. If ``None``, use the output of :func:`get_batch_management_client()`. Default ``None``. config_dict Configuration dictionary. Passed as the ``config_dict`` argument to any internal :func:`config.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 internal :func:`config.get_config_val` calls. See that function's documentation for additional details. to_dict Apply :func:`sku_to_dict` to the list of results? Default ``True``. If ``False``, the result will be a list of :class:`SupportedSku` objects. **kwargs Additional keyword arguments passed to :meth:`BatchManagementClient.location.list_supported_virtual_machine_skus`. Returns ------- list Of supported SKUs, either as dictionaries of property names and values (default) or as raw :class:`SupportedSku` objects (if ``to_dict`` is ``False``).