defaults#
Default configurations for Azure resources.
Attributes#
Functions#
Get the default |
|
|
Instantiate a |
|
Assign a container configuration to a models.Pool object |
Module Contents#
- default_image_publisher = 'microsoft-dsvm'#
- default_image_offer = 'ubuntu-hpc'#
- default_image_sku = '2204'#
- default_node_agent_sku_id = 'batch.node.ubuntu 22.04'#
- default_azure_batch_resource_url = 'https://batch.core.windows.net/'#
- default_azure_batch_endpoint_subdomain = 'batch.azure.com/'#
- default_azure_blob_storage_endpoint_subdomain = 'blob.core.windows.net/'#
- default_azure_container_registry_domain = 'azurecr.io'#
- default_image_reference#
- default_container_configuration#
- default_vm_configuration#
- default_vm_size = 'standard_d4s_v3'#
- default_autoscale_evaluation_interval = 'PT5M'#
- default_autoscale_formula = Multiline-String#
Show Value
""" $tasks = max(0, $PendingTasks.GetSample(1)); // If number of tasks is not 0, set targetVM to pending tasks, otherwise 0. $targetVMs = $tasks > 0 ? $tasks : 0; // The pool size is capped at 10, if target VM value is more than that, set it to 10. cappedPoolSize = 10; $TargetDedicatedNodes = max(0, min($targetVMs, cappedPoolSize)); // Set node deallocation mode - keep nodes active only until tasks finish $NodeDeallocationOption = taskcompletion; """
- default_network_config_dict#
- default_pool_config_dict#
- get_default_pool_identity(user_assigned_identity: str) azure.mgmt.batch.models.BatchPoolIdentity #
Get the default
models.BatchPoolIdentity
instance for azuretools (which associates a blank class:`models.UserAssignedIdentities instance to the provideduser_assigned_identity
string.Parameters#
- user_assigned_identity
User-assigned identity, as a string.
Returns#
- models.BatchPoolIdentity
Instantiated
BatchPoolIdentity`
instance using the provided user-assigned identity.
- get_default_pool_config(pool_name: str, subnet_id: str, user_assigned_identity: str, **kwargs) azure.mgmt.batch.models.Pool #
Instantiate a
azure.mgmt.batch.models.Pool
instance with the given pool name and subnet id, the default pool identity given byget_default_pool_identity()
, and other defaults specified indefault_pool_config_dict
anddefault_network_config_dict
.Parameters#
- pool_name
Name for the pool. Passed as the
display_name
argument to themodels.Pool
constructor.- subnet_id
Subnet id for the pool, as a string. Should typically be obtained from a configuration file or an environment variable, often via a
CredentialHandler
instance.- user_assigned_identity
User-assigned identity for the pool, as a string. Passed to
get_default_pool_identity()
.- **kwargs
Additional keyword arguments passed to the
models.Pool
constructor, potentially overriding settings fromdefault_pool_config_dict
.
Returns#
- models.Pool
The instantiated
models.Pool
object.
- assign_container_config(pool_config: azure.mgmt.batch.models.Pool, container_config: azure.mgmt.batch.models.ContainerConfiguration) azure.mgmt.batch.models.Pool #
Assign a container configuration to a models.Pool object (in place).
Parameters#
- pool_config
models.Pool
configuration object to modify.- container_config
models.ContainerConfiguration
object to add to themodels.Pool
configuration object.
Returns#
- models.Pool
The modified
models.Pool
object.