ConnectorTypeAZURE
class connector_types.connector_type_azure.ConnectorTypeAZURE
Call the Azure API.
See https://learn.microsoft.com/en-us/python/api/?view=azure-python
Input Schema
-
subscription_id
The Azure subscription ID.
Type:
string
-
client_id
The Azure client ID.
Type:
string
-
client_secret
The Azure client secret.
Type:
string
-
tenant_id
The Azure tenant ID.
Type:
string
-
client
The name of the Azure client to use. E.g. "compute".
Type:
string
-
collection
The name of the collection of the client. E.g. "virtual_machines".
Type:
string
-
method
The name of the method to call on the collection. E.g. "create_or_update".
Type:
string
-
kwargs
Keyword arguments to pass to the method call.
Type:
object
Additional Properties:
True
Pattern Properties:
-
.*
Data
-
Output Schema
-
result
Data
Constants
SUPPORTED_CLIENTS = ['compute', 'network', 'resource', 'storage'] ssl_context_inputs = ['check_hostname', 'client_cert', 'client_key', 'server_ca']Example
import flow_api
def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
virtual_machine = this.connect(
connector_type='AZURE',
subscription_id='<subscription_id>',
client_id='<client_id>',
client_secret='<client_secret>',
tenant_id='<tenant_id>',
client='compute',
collection='virtual_machines',
method='begin_create_or_update',
kwargs={
'resource_group_name': '<resource_group_name>',
'vm_name': '<vm_name>',
'parameters': ...
},
).get('output_value')['result']
this.log(vm_id=virtual_machine['id'])
return this.success('all done')