pip_services3_azure.connect.AzureConnectionParams module

class pip_services3_azure.connect.AzureConnectionParams.AzureConnectionParams(values: Optional[Any] = None)

Bases: pip_services3_commons.config.ConfigParams.ConfigParams

Contains connection parameters to authenticate against Azure Functions and connect to specific Azure Function.

The class is able to compose and parse Azure Function connection parameters.

### Configuration parameters ###

  • connections:
    • uri: full connection uri with specific app and function name

    • protocol: connection protocol

    • app_name: alternative app name

    • function_name: application function name

  • credentials:
    • auth_code: authorization code or null if using custom auth

In addition to standard parameters CredentialParams may contain any number of custom parameters

See AzureConnectionResolver

Example:

static from_config(config: pip_services3_commons.config.ConfigParams.ConfigParams) pip_services3_azure.connect.AzureConnectionParams.AzureConnectionParams

Retrieves AzureConnectionParams from configuration parameters. The values are retrieves from “connection” and “credential” sections.

Parameters

config – configuration parameters

Returns

the generated AzureConnectionParams object.

static from_string(line: str) pip_services3_azure.connect.AzureConnectionParams.AzureConnectionParams

Creates a new AzureConnectionParams object filled with key-value pairs serialized as a string.

Parameters

line – a string with serialized key-value pairs as “key1=value1;key2=value2;…” Example: “Key1=123;Key2=ABC;Key3=2016-09-16T00:00:00.00Z”

Returns

a new AzureConnectionParams object.

static from_tuples(*tuples: Any) pip_services3_azure.connect.AzureConnectionParams.AzureConnectionParams

Creates a new ConfigParams object filled with provided key-args pairs called tuples. Tuples parameters contain a sequence of key1, value1, key2, value2, … pairs.

Parameters

tuples – the tuples to fill a new ConfigParams object.

Returns

a new ConfigParams object.

get_app_name() Optional[str]

Gets the Azure app name.

Returns

the Azure app name.

get_auth_code() Optional[str]

Gets the Azure auth code.

Returns

the Azure auth code.

get_function_name() Optional[str]

Gets the Azure function name.

Returns

the Azure function name.

get_function_uri() str

Gets the Azure function uri.

Returns

the Azure function uri.

get_protocol() Optional[str]

Gets the Azure function connection protocol.

Returns

the Azure function connection protocol.

static merge_configs(*configs: pip_services3_commons.config.ConfigParams.ConfigParams) pip_services3_azure.connect.AzureConnectionParams.AzureConnectionParams

Retrieves AzureConnectionParams from multiple configuration parameters. The values are retrieves from “connection” and “credential” sections.

Parameters

configs – a list with configuration parameters

Returns

the generated AzureConnectionParams object.

set_app_name(value: str)

Sets the Azure app name.

Parameters

value – a new Azure app name.

set_auth_code(value: str)

Sets the Azure auth code.

Parameters

value – a new Azure auth code.

set_function_name(value: str)

Sets the Azure function name.

Parameters

value – a new Azure function name.

set_function_uri(value: str)

Sets the Azure function uri.

Parameters

value – a new Azure function uri.

set_protocol(value: str)

Sets the Azure function connection protocol.

Parameters

value – a new Azure function connection protocol.

validate(correlation_id: Optional[str])

Validates this connection parameters

Parameters

correlation_id – (optional) transaction id to trace execution through call chain.