### Create Directory and Subdirectory Source: https://learn.microsoft.com/en-us/python/api/azure-storage-file-share/azure.storage.fileshare.aio.sharedirectoryclient?view=azure-python Example demonstrating how to get a directory client, create the directory, then get a subdirectory client and create the subdirectory. ```python # Get a directory client and create the directory parent = share.get_directory_client("dir1") await parent.create_directory() # Get a subdirectory client and create the subdirectory "dir1/dir2" subdirectory = parent.get_subdirectory_client("dir2") await subdirectory.create_directory() ``` -------------------------------- ### Example: Create Parent and Subdirectory Source: https://learn.microsoft.com/en-us/python/api/azure-storage-file-share/azure.storage.fileshare.sharedirectoryclient?view=azure-python Demonstrates getting a subdirectory client and creating both the parent and subdirectory. Requires an existing share object. ```python # Get a directory client and create the directory parent = share.get_directory_client("dir1") parent.create_directory() # Get a subdirectory client and create the subdirectory "dir1/dir2" subdirectory = parent.get_subdirectory_client("dir2") subdirectory.create_directory() ``` -------------------------------- ### ComponentSetup Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-synapse/azure.mgmt.synapse.models?view=azure-python Represents the custom setup for installing third-party components. ```APIDOC ## ComponentSetup ### Description The custom setup of installing 3rd party components. All required parameters must be populated in order to send to Azure. ### Class ComponentSetup ``` -------------------------------- ### Get Dev Box Example Response Source: https://learn.microsoft.com/en-us/python/api/azure-developer-devcenter/azure.developer.devcenter.aio.devcenterclient Example response body for getting a Dev Box. This structure details the properties of a Dev Box. ```python response == { "actionType": "str", # The action that will be taken. Required. "Stop" "name": "str", # The name of the action. Required. "sourceId": "str", # The id of the resource which triggered this action. Required. "next": { "scheduledTime": "2020-02-20 00:00:00" # The time the action will be triggered (UTC). Required. }, "suspendedUntil": "2020-02-20 00:00:00" # Optional. The earliest time that the action could occur (UTC). } ``` -------------------------------- ### Example Response for Get Copyright Source: https://learn.microsoft.com/en-us/python/api/azure-maps-render/azure.maps.render.aio.operations.renderoperations?view=azure-python-preview Example JSON response structure for the get_copyright_from_bounding_box operation when successful. ```json # response body for status code(s): 200 response == { "formatVersion": "str", "generalCopyrights": [ "str" ], "regions": [ { "copyrights": [ "str" ], "country": { "ISO3": "str", "label": "str" } } ] } ``` -------------------------------- ### Example: Initialize MLClient from Directory Path Source: https://learn.microsoft.com/en-us/python/api/azure-ai-ml/azure.ai.ml.mlclient?view=azure-python Demonstrates creating an MLClient by specifying a path to a directory containing the configuration file. ```python from azure.ai.ml import MLClient client = MLClient.from_config(credential=DefaultAzureCredential(), path="./sdk/ml/azure-ai-ml/samples/src") ``` -------------------------------- ### begin_start Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-scvmm/azure.mgmt.scvmm.operations.virtualmachinesoperations?view=azure-python-preview Implements the operation to start a virtual machine. Starts a virtual machine. ```APIDOC ## begin_start ### Description Implements the operation to start a virtual machine. Start virtual machine. ### Method POST (Assumed based on 'begin_' prefix and LRO nature) ### Endpoint (Assumed based on parameters like resource_group_name and virtual_machine_name) /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SCVMM/virtualMachines/{virtualMachineName}/start ### Parameters #### Path Parameters - **resource_group_name** (str) - Required - The name of the resource group. - **virtual_machine_name** (str) - Required - Name of the VirtualMachine. #### Query Parameters None explicitly documented. #### Request Body None explicitly documented. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200 or 202 for LRO) - **None** - An instance of LROPoller that returns either None or the result of cls(response) #### Response Example ```json { "example": "None" } ``` ### Exceptions - **HttpResponseError** ``` -------------------------------- ### Get Map Tileset Response Example Source: https://learn.microsoft.com/en-us/python/api/azure-maps-render/azure.maps.render.operations.renderoperations?view=azure-python-preview This example shows the expected JSON response body for a successful (status code 200) Get Map Tileset request. It includes various metadata fields about the tileset. ```json { "attribution": "str", "bounds": [ 0.0 ], "center": [ 0.0 ], "data": [ "str" ], "description": "str", "grids": [ "str" ], "legend": "str", "maxzoom": 0, "minzoom": 0, "name": "str", "scheme": "str", "template": "str", "tilejson": "str", "tiles": [ "str" ], "version": "str" } ``` -------------------------------- ### Example Response for Get Copyright Caption Source: https://learn.microsoft.com/en-us/python/api/azure-maps-render/azure.maps.render.aio.operations.renderoperations?view=azure-python-preview Example JSON response structure for the get_copyright_caption API when successful. ```json { "copyrightsCaption": "str", "formatVersion": "str" } ``` -------------------------------- ### setup Source: https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.workspace.workspace?view=azure-ml-py Create a new workspace or retrieve an existing workspace. ```APIDOC ## setup ### Description Create a new workspace or retrieve an existing workspace. ### Method Not specified ### Endpoint Not specified ### Parameters Not specified ### Request Example Not specified ### Response Not specified ``` -------------------------------- ### Trim Start Whitespace Example Source: https://learn.microsoft.com/en-us/python/api/semantic-kernel/semantic_kernel.core_plugins.text_plugin.textplugin?view=semantic-kernel-python Demonstrates trimming whitespace from the start of a string using the trimStart function. ```python KernelArguments["input"] = " hello world " {{text.trimStart $input}} => "hello world " ``` -------------------------------- ### Get Catalog Example Source: https://learn.microsoft.com/en-us/python/api/azure-developer-devcenter/azure.developer.devcenter.aio.devcenterclient?view=azure-python Example of a successful response body when retrieving a catalog. This response includes the name of the catalog. ```python response == { "name": "str" # Name of the catalog. Required. } ``` -------------------------------- ### Begin Create Environment Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-devtestlabs/azure.mgmt.devtestlabs.operations.labsoperations Starts the creation of virtual machines within a specified lab. This is a long-running operation. ```python begin_create_environment(resource_group_name: str, name: str, lab_virtual_machine_creation_parameter: _models.LabVirtualMachineCreationParameter, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[None] ``` -------------------------------- ### get Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-authorization/azure.mgmt.authorization.v2022_05_01_preview.aio.operations.roledefinitionsoperations?view=azure-python Get role definition by ID (GUID). Retrieves a specific role definition using its unique identifier. ```APIDOC ## get ### Description Get role definition by ID (GUID). Retrieves a specific role definition using its unique identifier. ### Method `get` ### Parameters #### Path Parameters - **scope** (str) - Required - The scope of the operation or resource. - **role_definition_id** (str) - Required - The ID of the role definition. ### Returns - **RoleDefinition** - The requested role definition. ### Exceptions - **HttpResponseError** ``` -------------------------------- ### begin_start Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-scvmm/azure.mgmt.scvmm.operations.virtualmachinesoperations?view=azure-python-preview Implements the operation to start a virtual machine. This method initiates the power-on process for a specified virtual machine. ```APIDOC ## begin_start ### Description Starts a virtual machine. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scvmm/virtualMachines/{virtualMachineName}/beginStart ### Parameters #### Path Parameters - **resource_group_name** (str) - Required - The name of the resource group. - **virtual_machine_name** (str) - Required - Name of the VirtualMachine. #### Keyword-Only Parameters - **cls** (callable) - Optional - A custom type or function that will be passed the direct response. - **continuation_token** (str) - Optional - A continuation token to restart a poller from a saved state. - **polling** (bool or PollingMethod) - Optional - By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - **polling_interval** (int) - Optional - Default waiting time between two polls for LRO operations if no Retry-After header is present. ### Returns #### Success Response (200) - **LROPoller[None]** - An instance of LROPoller that returns either None or the result of cls(response) ### Exceptions #### HttpResponseError - Description: Indicates an error occurred during the HTTP request. ``` -------------------------------- ### Get Example File Name Source: https://learn.microsoft.com/en-us/python/api/onnxruntime/onnxruntime.datasets?view=azure-onnx-py Retrieves the absolute file name of a specified example. This function is useful for accessing example files within the ONNX Runtime library. ```Python get_example(name) ``` -------------------------------- ### begin_start Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-scvmm/azure.mgmt.scvmm.aio.operations.virtualmachinesoperations?view=azure-python-preview Implements the operation to start a virtual machine. Starts a virtual machine. This is an asynchronous long-running operation. ```APIDOC ## begin_start ### Description Implements the operation to start a virtual machine. Start virtual machine. ### Method POST (inferred from begin_ prefix and LRO pattern, typically a POST to an action URL) ### Endpoint (Inferred from context, typically a POST to a resource's action URL) ### Parameters #### Path Parameters - **resource_group_name** (str) - Required - The name of the resource group. - **virtual_machine_name** (str) - Required - Name of the VirtualMachine. #### Query Parameters None explicitly documented. #### Request Body None explicitly documented. #### Keyword-Only Parameters - **cls** (callable) - Optional - A custom type or function that will be passed the direct response. - **continuation_token** (str) - Optional - A continuation token to restart a poller from a saved state. - **polling** (bool or AsyncPollingMethod) - Optional - By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - **polling_interval** (int) - Optional - Default waiting time between two polls for LRO operations if no Retry-After header is present. ### Response #### Success Response (200 or 204 inferred for LRO) - **AsyncLROPoller[None]** - An instance of AsyncLROPoller that returns either None or the result of cls(response). #### Response Example (Not provided in source, typically an LRO status) ### Exceptions - **HttpResponseError** ``` -------------------------------- ### List Installable Updates for Device Class Source: https://learn.microsoft.com/en-us/python/api/azure-iot-deviceupdate/azure.iot.deviceupdate.aio.operations.devicemanagementoperations?view=azure-python Gets a list of updates that can be installed for a specific device class, identified by its ID. ```python response == { "updateId": { "name": "str", # Update name. Required. "provider": "str", # Update provider. Required. "version": "str" # Update version. Required. }, "description": "str", # Optional. Update description. "friendlyName": "str" # Optional. Friendly update name. } ``` -------------------------------- ### setup_resources Method Source: https://learn.microsoft.com/en-us/python/api/semantic-kernel/semantic_kernel.agents.open_ai.azureassistantagent?view=semantic-kernel-python Creates an AzureOpenAI client and deployment name. It can use provided arguments, environment variables, or an environment file, and supports authentication via Azure AD token or API key. ```APIDOC ## setup_resources ### Description Creates an AzureOpenAI client and deployment name. It can use provided arguments, environment variables, or an environment file, and supports authentication via Azure AD token or API key. ### Signature ```python static setup_resources(*, ad_token: str | None = None, ad_token_provider: Callable[[] , str | Awaitable[str]] | None = None, api_key: str | None = None, api_version: str | None = None, base_url: str | None = None, default_headers: dict[str, str] | None = None, deployment_name: str | None = None, endpoint: str | None = None, env_file_path: str | None = None, env_file_encoding: str | None = None, token_scope: str | None = None, **kwargs: Any) -> tuple[AsyncAzureOpenAI, str] ``` ### Parameters - **ad_token** (str | None) - A string-based Microsoft Entra (Azure AD) token. - **ad_token_provider** (Callable[[] , str | Awaitable[str]] | None) - A callback that returns or awaits an Entra token string. - **api_key** (str | None) - The Azure OpenAI API key. - **api_version** (str | None) - The version of the Azure OpenAI API to use. - **base_url** (str | None) - The base URL. - **default_headers** (dict[str, str] | None) - Default headers to attach to all requests. - **deployment_name** (str | None) - The deployment name in Azure OpenAI. - **endpoint** (str | None) - The Azure OpenAI endpoint. - **env_file_path** (str | None) - The .env file path from which to load environment variables. - **env_file_encoding** (str | None) - The encoding of the .env file, default utf-8. - **token_scope** (str | None) - The token scope, if using Entra authentication. - **kwargs** (Any) - Additional keyword arguments for advanced usage. ### Returns - **tuple[AsyncAzureOpenAI, str]** - A tuple containing the AsyncAzureOpenAI client and the deployment name. ``` -------------------------------- ### SAPApplicationServerInstancesOperations.begin_start Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-workloadssapvirtualinstance/azure.mgmt.workloadssapvirtualinstance.operations.sapapplicationserverinstancesoperations Starts the SAP Application Server Instance. ```APIDOC ## SAPApplicationServerInstancesOperations.begin_start ### Description Starts the SAP Application Server Instance. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start ### Parameters #### Path Parameters - **resource_group_name** (str) - Required - The name of the resource group. The name is case insensitive. - **sap_virtual_instance_name** (str) - Required - The name of the Virtual Instances for SAP solutions resource. - **application_instance_name** (str) - Required - The name of SAP Application Server instance resource. ### Response #### Success Response (200 or 202) - **SAPApplicationServerInstance** - An instance of LROPoller that returns SAPApplicationServerInstance. #### Exceptions - **HttpResponseError** ``` -------------------------------- ### get Source: https://learn.microsoft.com/en-us/python/api/azure-purview-sharing/azure.purview.sharing.operations.sentsharesoperations?view=azure-python-preview Gets a sent share by its GUID. This operation retrieves the details of a specific sent share using its unique identifier. ```APIDOC ## get ### Description Get a sent share by guid. Get a sent share. ### Method GET (Assumed based on 'get') ### Endpoint (Assumed based on class and method name, specific path not provided) ### Parameters #### Path Parameters - **sent_share_id** (str) - Required - Id of the sent share. #### Query Parameters None explicitly documented. #### Request Body None. ### Request Example None provided. ### Response #### Success Response (200) - **JSON** - The sent share object. #### Response Example ```json { "properties": { "artifact": "artifact_object", "displayName": "str", "createdAt": "2020-02-20T00:00:00Z", "dependsOn": [ "str" ], "description": "str", "senderEmail": "str", "senderName": "str", "senderTenantName": "str", "state": "Succeeded" }, "shareKind": "InPlace", "id": "str", "type": "str" } ``` ``` -------------------------------- ### begin_start Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-redisenterprise/azure.mgmt.redisenterprise.aio.operations.migrationoperations?view=azure-python-preview Starts a new migration. ```APIDOC ## begin_start ### Description Starts a new migration. ### Method POST (Implied by `begin_` prefix for long-running operations) ### Endpoint (This information is not directly provided in the source, but typically follows a pattern like `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterpriseClusters/{clusterName}/migrations/start`) ### Parameters #### Path Parameters - **resource_group_name** (str) - Required - The name of the resource group. - **cluster_name** (str) - Required - The name of the Redis Enterprise cluster. #### Query Parameters - **content_type** (str) - Optional - Defaults to 'application/json'. Specifies the content type of the request body. #### Request Body - **parameters** (Migration or JSON or IO[bytes]) - Required - Parameters supplied to start a migration operation. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response - **AsyncLROPoller[Migration]** - An instance of AsyncLROPoller that returns Migration. #### Response Example ```json { "example": "response body" } ``` #### Exceptions - **HttpResponseError** ``` -------------------------------- ### begin_create_environment Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-devtestlabs/azure.mgmt.devtestlabs.operations.labsoperations Create virtual machines in a lab. This operation can take a while to complete. ```APIDOC ## begin_create_environment ### Description Create virtual machines in a lab. This operation can take a while to complete. ### Method POST (Assumed based on 'begin_' prefix indicating an LRO that likely modifies state) ### Endpoint `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/virtualmachines` (Assumed based on common Azure SDK patterns for creating resources within a lab) ### Parameters #### Path Parameters - **resource_group_name** (str) - Required - The name of the resource group. - **name** (str) - Required - The name of the lab. #### Query Parameters None explicitly documented. #### Request Body - **lab_virtual_machine_creation_parameter** (_models.LabVirtualMachineCreationParameter) - Required - Properties for creating a virtual machine. - **content_type** (str) - Optional - Defaults to 'application/json'. Specifies the content type of the request body. ### Response #### Success Response (202 Accepted - typical for LROs) - **None** - The operation returns an LRO poller which eventually returns None upon successful completion. #### Response Example (LRO Poller object, actual response upon completion is None) ``` -------------------------------- ### get Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-authorization/azure.mgmt.authorization.v2018_01_01_preview.aio.operations.roledefinitionsoperations Gets a role definition by name (GUID). This operation retrieves a specific role definition using its scope and unique identifier. ```APIDOC ## get ### Description Get role definition by name (GUID). ### Method GET ### Endpoint {scope}/providers/Microsoft.Authorization/roleDefinitions/{role_definition_id} ### Parameters #### Path Parameters - **scope** (str) - Required - The scope of the role definition. - **role_definition_id** (str) - Required - The ID of the role definition. ### Response #### Success Response (200) - **RoleDefinition** (RoleDefinition) - The retrieved role definition. #### Error Response - **HttpResponseError** - Indicates an error occurred during the operation. ``` -------------------------------- ### begin_start Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-datamigration/azure.mgmt.datamigration.aio.operations.servicesoperations?view=azure-python Starts an Azure Database Migration Service (classic) instance, making it available for data migration. ```APIDOC ## begin_start ### Description Start service. The services resource is the top-level resource that represents the Azure Database Migration Service (classic). This action starts the service and the service can be used for data migration. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{group_name}/providers/Microsoft.DataMigration/services/{service_name}/start ### Parameters #### Path Parameters - **group_name** (str) - Required - Name of the resource group. - **service_name** (str) - Required - Name of the service. ### Response #### Success Response (200 or 202) - **None** - Operation completed successfully. #### Exceptions - **HttpResponseError** ``` -------------------------------- ### begin_start Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-datamigration/azure.mgmt.datamigration.aio.operations.servicesoperations?view=azure-python Starts an Azure Database Migration Service (classic) instance, making it available for data migration tasks. ```APIDOC ## begin_start ### Description Start service. The services resource is the top-level resource that represents the Azure Database Migration Service (classic). This action starts the service and the service can be used for data migration. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/services/{serviceName}/start ### Parameters #### Path Parameters - **subscriptionId** (string) - Required - The subscription ID of the target subscription. - **resourceGroupName** (string) - Required - The name of the resource group that contains the service. The name is case insensitive. - **serviceName** (string) - Required - The name of the service. #### Query Parameters - **api-version** (string) - Required - API Version ### Response #### Success Response (200, 202) - **id** (string) - Resource ID of the resource. - **name** (string) - Name of the resource. - **type** (string) - Type of the resource. - **properties** (object) - Custom properties of the service. - **provisioning_state** (string) - The provisioning state of the service. Possible values include: "Creating", "Deleting", "Succeeded", "Failed", "Updating". #### Response Example ```json { "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testResourceGroup/providers/Microsoft.DataMigration/services/testService", "name": "testService", "type": "Microsoft.DataMigration/services", "properties": { "provisioning_state": "Succeeded" } } ``` ``` -------------------------------- ### Get Queue Position Example Source: https://learn.microsoft.com/en-us/python/api/azure-communication-jobrouter/azure.communication.jobrouter.aio.jobrouterclient Gets a job's current position within a queue. This helps in understanding wait times and priority. ```python async get_queue_position(job_id: str, queue_id: str, **kwargs: Any) -> GetQueuePositionResult ``` -------------------------------- ### Create and Run an Agent with OpenAIChatClient Source: https://learn.microsoft.com/en-us/python/api/agent-framework-core/agent_framework.anthropic.anthropicclient?view=agent-framework-python-latest Demonstrates how to initialize an OpenAIChatClient, create an agent with specific instructions and temperature, and then run a query against the agent. Ensure the necessary libraries are installed and any API keys are configured. ```Python from agent_framework.clients import OpenAIChatClient # Create a client client = OpenAIChatClient(model_id="gpt-4") # Create an agent using the convenience method agent = client.create_agent( name="assistant", instructions="You are a helpful assistant.", temperature=0.7 ) # Run the agent response = await agent.run("Hello!") ``` -------------------------------- ### Get Relationship by GUID Source: https://learn.microsoft.com/en-us/python/api/azure-purview-datamap/azure.purview.datamap.operations.relationshipoperations?view=azure-python-preview Retrieves relationship information between entities using its globally unique identifier (GUID). Optionally includes extended information. ```python get(guid: str, *, extended_info: bool | None = None, **kwargs: Any) -> AtlasRelationshipWithExtInfo ``` -------------------------------- ### begin_start_instance Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-workloadssapvirtualinstance/azure.mgmt.workloadssapvirtualinstance.operations.sapcentralinstancesoperations?view=azure-python-preview Starts the SAP Central Services Instance. ```APIDOC ## begin_start_instance ### Description Starts the SAP Central Services Instance. ### Method POST ### Endpoint ``` /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start ``` ### Parameters #### Path Parameters - **resource_group_name** (str) - Required - The name of the resource group. The name is case insensitive. - **sap_virtual_instance_name** (str) - Required - The name of the Virtual Instances for SAP solutions resource. - **central_instance_name** (str) - Required - Central Services Instance resource name string modeled as parameter for auto generation to work correctly. #### Query Parameters None #### Request Body None ### Response #### Success Response (200 or 202) - **SAPCentralServerInstance** - Details of the SAP Central Services Instance after starting. #### Response Example ```json { "example": "response body" } ``` #### Exceptions - **HttpResponseError** - If an error occurs during the operation. ``` -------------------------------- ### Setup Environment Variables and Install Packages Source: https://learn.microsoft.com/en-us/python/api/overview/azure/communication-chat-readme?view=azure-python Sets up necessary environment variables for Azure Communication Services and installs required Python packages. ```Bash set AZURE_COMMUNICATION_SERVICE_ENDPOINT="https://.communcationservices.azure.com" set COMMUNICATION_SAMPLES_CONNECTION_STRING="" pip install azure-communication-identity python samples\chat_client_sample.py python samples\chat_client_sample_async.py python samples\chat_thread_client_sample.py python samples\chat_thread_client_sample_async.py ``` -------------------------------- ### AnthropicClient Initialization Examples Source: https://learn.microsoft.com/en-us/python/api/agent-framework-core/agent_framework.anthropic.anthropicclient?view=agent-framework-python-latest Demonstrates various ways to initialize the AnthropicClient, including using environment variables, direct parameter passing, loading from a .env file, and providing an existing Anthropic client instance. ```python from agent_framework.anthropic import AnthropicClient from azure.identity.aio import DefaultAzureCredential # Using environment variables # Set ANTHROPIC_API_KEY=your_anthropic_api_key # ANTHROPIC_CHAT_MODEL_ID=claude-sonnet-4-5-20250929 # Or passing parameters directly client = AnthropicClient( model_id="claude-sonnet-4-5-20250929", api_key="your_anthropic_api_key", ) # Or loading from a .env file client = AnthropicClient(env_file_path="path/to/.env") # Or passing in an existing client from anthropic import AsyncAnthropic anthropic_client = AsyncAnthropic( api_key="your_anthropic_api_key", base_url="https://custom-anthropic-endpoint.com" ) client = AnthropicClient( model_id="claude-sonnet-4-5-20250929", anthropic_client=anthropic_client, ) ``` -------------------------------- ### Get Account Properties Response Example Source: https://learn.microsoft.com/en-us/python/api/azure-purview-account/azure.purview.account.aio.operations.accountsoperations?view=azure-python-preview Example of the JSON response body for a successful (200) get_account_properties operation, detailing various account attributes. ```python # response body for status code(s): 200 response.json() == { "id": "str (optional)", "identity": { "principalId": "str (optional)", "tenantId": "str (optional)", "type": "str (optional)" }, "location": "str (optional)", "name": "str (optional)", "properties": { "cloudConnectors": { "awsExternalId": "str (optional)" }, "createdAt": "datetime (optional)", "createdBy": "str (optional)", "createdByObjectId": "str (optional)", "endpoints": { "catalog": "str (optional)", "guardian": "str (optional)", "scan": "str (optional)" }, "friendlyName": "str (optional)", "managedResourceGroupName": "str (optional)", "managedResources": { "eventHubNamespace": "str (optional)", "resourceGroup": "str (optional)", "storageAccount": "str (optional)" }, "privateEndpointConnections": [ { "id": "str (optional)", "name": "str (optional)", "properties": { "privateEndpoint": { "id": "str (optional)" }, "privateLinkServiceConnectionState": { "actionsRequired": "str (optional)", "description": "str (optional)", "status": "str (optional)" }, "provisioningState": "str (optional)" }, "type": "str (optional)" } ], "provisioningState": "str (optional)", "publicNetworkAccess": "str (optional). Default value is "Enabled"" }, "sku": { "capacity": "int (optional)", "name": "str (optional)" }, "systemData": { "createdAt": "datetime (optional)", "createdBy": "str (optional)", "createdByType": "str (optional)", "lastModifiedAt": "datetime (optional)", "lastModifiedBy": "str (optional)", "lastModifiedByType": "str (optional)" }, "tags": { "str": "str (optional)" }, "type": "str (optional)" } ``` -------------------------------- ### Example: Create SmsClient from Connection String Source: https://learn.microsoft.com/en-us/python/api/azure-communication-sms/azure.communication.sms.aio.smsclient Demonstrates how to initialize the SmsClient using a provided connection string. ```Python sms_client = SmsClient.from_connection_string(self.connection_string) ``` -------------------------------- ### Get Access Keys Response Example Source: https://learn.microsoft.com/en-us/python/api/azure-purview-account/azure.purview.account.aio.operations.accountsoperations?view=azure-python-preview Example of the JSON response body for a successful (200) get_access_keys operation, showing optional Kafka endpoints. ```python # response body for status code(s): 200 response.json() == { "atlasKafkaPrimaryEndpoint": "str (optional)", "atlasKafkaSecondaryEndpoint": "str (optional)" } ``` -------------------------------- ### setup_resources Method Source: https://learn.microsoft.com/en-us/python/api/semantic-kernel/semantic_kernel.agents.open_ai.azure_responses_agent.azureresponsesagent?view=semantic-kernel-python Creates and configures an Azure OpenAI client and deployment name for specialized "Responses" completions. It can pull configuration from environment variables or provided arguments. ```APIDOC ## setup_resources ### Description Create and configure an Azure OpenAI client plus the deployment name for specialized "Responses" completions, pulling from environment vars or provided arguments. ### Method static setup_resources ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None #### Parameters - **ad_token** (str | None) - Optional - A Microsoft Entra token (string-based). - **ad_token_provider** (Callable[[], str | Awaitable[str]] | None) - Optional - A callback returning or awaiting an Entra token string. - **api_key** (str | None) - Optional - The Azure OpenAI API key. - **api_version** (str | None) - Optional - The Azure OpenAI API version to use. - **base_url** (str | None) - Optional - The base URL. - **default_headers** (dict[str, str] | None) - Optional - Default headers to attach to every request. - **deployment_name** (str | None) - Optional - Name of the specialized "Responses" deployment. - **endpoint** (str | None) - Optional - The Azure OpenAI endpoint. - **env_file_path** (str | None) - Optional - The path of an .env file for environment variables. - **env_file_encoding** (str | None) - Optional - The encoding for the .env file, defaults to utf-8. - **token_scope** (str | None) - Optional - Token scope if using Entra authentication. - **kwargs** (Any) - Optional - Additional advanced keyword args for the client. ### Returns - **tuple[AsyncAzureOpenAI, str]** - A tuple (AsyncAzureOpenAI, model_name) with the client and the associated deployment name. ``` -------------------------------- ### Example Response for Get Copyright for Tile Source: https://learn.microsoft.com/en-us/python/api/azure-maps-render/azure.maps.render.aio.operations.renderoperations?view=azure-python-preview This is an example of the JSON response structure when retrieving copyright information for a specific tile with status code 200. ```json { "formatVersion": "str", "generalCopyrights": [ "str" ], "regions": [ { "copyrights": [ "str" ], "country": { "ISO3": "str", "label": "str" } } ] } ``` -------------------------------- ### Example: Initialize MLClient with Specific File Name Source: https://learn.microsoft.com/en-us/python/api/azure-ai-ml/azure.ai.ml.mlclient?view=azure-python Shows how to initialize an MLClient using a configuration file with a custom name located in the current directory. ```python from azure.ai.ml import MLClient client = MLClient.from_config( credential=DefaultAzureCredential(), file_name="./sdk/ml/azure-ai-ml/samples/team_workspace_configuration.json", ) ``` -------------------------------- ### list_installable_updates_for_device_class Source: https://learn.microsoft.com/en-us/python/api/azure-iot-deviceupdate/azure.iot.deviceupdate.aio.operations.devicemanagementoperations?view=azure-python Gets a list of installable updates for a specific device class. ```APIDOC ## list_installable_updates_for_device_class ### Description Gets a list of installable updates for a specific device class. ### Method GET ### Endpoint /deviceClasses/{device_class_id}/installableUpdates ### Parameters #### Path Parameters - **device_class_id** (str) - Required - Device class identifier. ### Response #### Success Response (200) - **updateId** (object) - Required. Identifier for the update. - **name** (str) - Update name. - **provider** (str) - Update provider. - **version** (str) - Update version. - **description** (str) - Optional. Update description. - **friendlyName** (str) - Optional. Friendly update name. #### Response Example { "updateId": { "name": "str", "provider": "str", "version": "str" }, "description": "str", "friendlyName": "str" } ``` -------------------------------- ### Get OpenShift Version Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-redhatopenshift/azure.mgmt.redhatopenshift.aio.operations.openshiftversionsoperations?view=azure-python Retrieves a specific available OpenShift version for installation in a given Azure region. This method returns the installable OpenShift version as a string. ```APIDOC ## GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/locations/{location}/openshiftVersions/{openShiftVersion} ### Description Gets an available OpenShift version to install in the specified location. This operation returns installable OpenShift version as a string. ### Method GET ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/locations/{location}/openshiftVersions/{openShiftVersion} ### Parameters #### Path Parameters - **location** (str) - Required - The name of the Azure region. - **open_shift_version** (str) - Required - The desired version value of the OpenShiftVersion resource. #### Query Parameters None explicitly documented. #### Request Body None ### Response #### Success Response (200) - **OpenShiftVersion** (OpenShiftVersion) - Represents an available OpenShift version. #### Response Example (Response structure not detailed in source, only type is provided) #### Exceptions - **HttpResponseError** ``` -------------------------------- ### Instantiate ApplicationOptions Source: https://learn.microsoft.com/en-us/python/api/microsoft-agents-hosting-core/microsoft_agents.hosting.core.app.app_options.applicationoptions?view=agent-sdk-python-latest Demonstrates how to create an instance of the ApplicationOptions class with default settings. ```python ApplicationOptions() ``` -------------------------------- ### Get Start Dates for StationaryFeaturizer Source: https://learn.microsoft.com/en-us/python/api/azureml-training-tabular/azureml.training.tabular.featurization.timeseries.stationary_featurizer.stationaryfeaturizer?view=azure-ml-py Retrieves the start dates from the time series data based on grain and time column. Used to identify the earliest timestamps. ```python get_start_dates(grain: Tuple[str] | str | List[str], time_col_name: str) -> Timestamp | None ``` -------------------------------- ### Install the Azure Online Experimentation client library Source: https://learn.microsoft.com/en-us/python/api/overview/azure/onlineexperimentation-readme?view=azure-python-preview Install the azure-onlineexperimentation package using pip. Python 3.9 or later is required. ```bash python -m pip install azure-onlineexperimentation ``` -------------------------------- ### Begin Create Configuration Store Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-appconfiguration/azure.mgmt.appconfiguration.operations.configurationstoresoperations?view=azure-python Creates a configuration store. Requires resource group name, store name, and creation parameters. Returns an LROPoller. ```python begin_create(resource_group_name: str, config_store_name: str, config_store_creation_parameters: _models.ConfigurationStore, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.ConfigurationStore] ``` -------------------------------- ### Get Account Properties Example Source: https://learn.microsoft.com/en-us/python/api/azure-purview-account/azure.purview.account.operations.accountsoperations?view=azure-python-preview Example of retrieving the properties of an Azure Purview account. This snippet illustrates the detailed JSON structure returned for account details. ```Python # response body for status code(s): 200 response.json() == { "id": "str (optional)", "identity": { "principalId": "str (optional)", "tenantId": "str (optional)", "type": "str (optional)" }, "location": "str (optional)", "name": "str (optional)", "properties": { "cloudConnectors": { "awsExternalId": "str (optional)" }, "createdAt": "datetime (optional)", "createdBy": "str (optional)", "createdByObjectId": "str (optional)", "endpoints": { "catalog": "str (optional)", "guardian": "str (optional)", "scan": "str (optional)" }, "friendlyName": "str (optional)", "managedResourceGroupName": "str (optional)", "managedResources": { "eventHubNamespace": "str (optional)", "resourceGroup": "str (optional)", "storageAccount": "str (optional)" }, "privateEndpointConnections": [ { "id": "str (optional)", "name": "str (optional)", "properties": { "privateEndpoint": { "id": "str (optional)" }, "privateLinkServiceConnectionState": { "actionsRequired": "str (optional)", "description": "str (optional)", "status": "str (optional)" }, "provisioningState": "str (optional)" }, "type": "str (optional)" } ], "provisioningState": "str (optional)", "publicNetworkAccess": "str (optional). Default value is \"Enabled\"" }, "sku": { "capacity": "int (optional)", "name": "str (optional)" }, "systemData": { "createdAt": "datetime (optional)", "createdBy": "str (optional)", "createdByType": "str (optional)", "lastModifiedAt": "datetime (optional)", "lastModifiedBy": "str (optional)", "lastModifiedByType": "str (optional)" }, "tags": { "str": "str (optional)" }, "type": "str (optional)" } ``` -------------------------------- ### setup_resources Method Source: https://learn.microsoft.com/en-us/python/api/semantic-kernel/semantic_kernel.agents.open_ai.azure_assistant_agent.azureassistantagent?view=semantic-kernel-python A static method to create an AsyncAzureOpenAI client and deployment name. It can use credentials from arguments, environment variables, or a .env file, supporting both Azure AD and API key authentication. ```APIDOC ## setup_resources Method ### Description A static method to create an AsyncAzureOpenAI client and deployment name. It can use credentials from arguments, environment variables, or a .env file, supporting both Azure AD and API key authentication. ### Method static setup_resources ### Parameters #### Keyword-Only Parameters - **ad_token** (str | None) - Optional - A Microsoft Entra (Azure AD) token string. - **ad_token_provider** (Callable[[], str | Awaitable[str]] | None) - Optional - Callback that returns or awaits an Entra token. - **api_key** (str | None) - Optional - The Azure OpenAI API key. - **api_version** (str | None) - Optional - The Azure OpenAI API version to use. - **base_url** (str | None) - Optional - Base URL including deployment path. - **default_headers** (dict[str, str] | None) - Optional - Default headers to include in each request. - **deployment_name** (str | None) - Optional - The name of the Azure OpenAI deployment. - **endpoint** (str | None) - Optional - The endpoint of the Azure OpenAI service. - **env_file_path** (str | None) - Optional - Optional .env file path for loading credentials. - **env_file_encoding** (str | None) - Optional - Encoding used to load the .env file. - **token_scope** (str | None) - Optional - The token scope for Entra authentication. - **kwargs** (Any) - Optional - Additional keyword arguments for fine-tuning the client setup. ### Returns #### Success Response - **tuple[AsyncAzureOpenAI, str]** - A tuple of (AsyncAzureOpenAI client, deployment name). ``` -------------------------------- ### Get Log Properties Response Example Source: https://learn.microsoft.com/en-us/python/api/azure-ai-personalizer/azure.ai.personalizer.aio.personalizeradministrationclient?view=azure-python-preview This example shows the expected JSON response when retrieving properties of Personalizer logs. It includes a date range for the logs. ```python # response body for status code(s): 200 response == { "dateRange": { "from": "2020-02-20 00:00:00", # Optional. Start date for the range. "to": "2020-02-20 00:00:00" # Optional. End date for the range. } } ``` -------------------------------- ### Send Request Example Source: https://learn.microsoft.com/en-us/python/api/azure-ai-transcription/azure.ai.transcription.aio.transcriptionclient?view=azure-python Demonstrates how to send a network request using the TranscriptionClient. This example shows a GET request to a sample URL and prints the response status. ```python from azure.core.rest import HttpRequest request = HttpRequest("GET", "https://www.example.org/") response = await client.send_request(request) ``` -------------------------------- ### Create Table Example Source: https://learn.microsoft.com/en-us/python/api/azure-data-tables/azure.data.tables.aio.tableserviceclient Demonstrates how to create a table using the `create_table` method. Handles the case where the table already exists by catching `ResourceExistsError`. ```Python async with TableServiceClient.from_connection_string(self.connection_string) as table_service_client: try: table_client = await table_service_client.create_table(table_name=self.table_name) print(f"Created table {table_client.table_name}!") except ResourceExistsError: print("Table already exists") ``` -------------------------------- ### Get Term Template Definition by ID Source: https://learn.microsoft.com/en-us/python/api/azure-purview-datamap/azure.purview.datamap.aio.operations.typedefinitionoperations?view=azure-python-preview Retrieves the term template definition for a given GUID. Requires the term template's GUID as a string parameter. ```Python async get_term_template_by_id(guid: str, **kwargs: Any) -> TermTemplateDef ``` -------------------------------- ### Initialize ConfigurationChannelHost with Parameters Source: https://learn.microsoft.com/en-us/python/api/microsoft-agents-hosting-core/microsoft_agents.hosting.core.client.configuration_channel_host.configurationchannelhost?view=agent-sdk-python-latest Initialize ConfigurationChannelHost with required factory, connections, configuration, and default channel name. ```python __init__(channel_factory: ChannelFactoryProtocol, connections: Connections, configuration: ChannelsConfiguration, default_channel_name: str) ``` -------------------------------- ### Get Period Start Time Index Source: https://learn.microsoft.com/en-us/python/api/azureml-training-tabular/azureml.training.tabular.timeseries.time_series_data_frame.timeseriesdataframe?view=azure-ml-py Infers the period start time from timestamps in a TimeSeriesDataFrame. Useful when timestamps represent a period (e.g., monthly, yearly). Can specify if the index represents the start or end of a period and infer or set the frequency. ```python get_period_start_time_index(is_start_of_period=True, freq=None, floor_freq=None) ``` -------------------------------- ### setup Source: https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.workspace.workspace?view=azure-ml-py Creates a new Azure Machine Learning workspace or retrieves an existing one. This is typically the first step in initializing a workspace context. ```APIDOC ## setup ### Description Create a new workspace or retrieve an existing workspace. ### Method POST or PUT (assumed) ### Endpoint (Not specified, typically relative to workspace context) ### Returns #### Success Response - **Workspace**: A Workspace object representing the initialized workspace. ``` -------------------------------- ### Install Azure Monitor OpenTelemetry Distro Source: https://learn.microsoft.com/en-us/python/api/overview/azure/monitor-opentelemetry-readme Install the Azure Monitor OpenTelemetry Distro for Python using pip. This command ensures you have the necessary package to start instrumenting your application. ```bash pip install azure-monitor-opentelemetry ``` -------------------------------- ### begin_start Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-chaos/azure.mgmt.chaos.operations.experimentsoperations?view=azure-python Start a Experiment resource. This method initiates the execution of a specified experiment. ```APIDOC ## begin_start ### Description Start a Experiment resource. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start ### Parameters #### Path Parameters - **resource_group_name** (str) - Required - The name of the resource group. The name is case insensitive. - **experiment_name** (str) - Required - String that represents a Experiment resource name. ### Returns #### Success Response - **LROPoller[None]** - An instance of LROPoller that returns either None or the result of cls(response) ### Exceptions - **HttpResponseError** ``` -------------------------------- ### Begin deploying a project Source: https://learn.microsoft.com/en-us/python/api/azure-ai-language-questionanswering-authoring/azure.ai.language.questionanswering.authoring.aio.questionansweringauthoringclient?view=azure-python-preview Initiates the deployment of a project to production. This is a long-running operation. ```python async begin_deploy_project(project_name: str, deployment_name: str, **kwargs: Any) -> AsyncLROPoller[None] ``` -------------------------------- ### Get Model Properties Response Example Source: https://learn.microsoft.com/en-us/python/api/azure-ai-personalizer/azure.ai.personalizer.aio.personalizeradministrationclient?view=azure-python-preview This example illustrates the structure of a JSON response when fetching properties of a Personalizer model. It details various attributes of the feature importance job. ```python # response body for status code(s): 200 response == { "creationTime": "2020-02-20 00:00:00", # Optional. The creation time of the feature importance. "description": "str", # Optional. Description of the feature importance job. "endTime": "2020-02-20 00:00:00", # Optional. The end time of the feature importance. "featureScores": [ { "featureName": "str", # Optional. Feature name. "namespace": "str", # Optional. Feature namespace. "score": 0.0 # Optional. Feature score. } ], "id": "str", # Optional. The ID of the feature importance. "name": "str", # Optional. The name of the feature importance. "startTime": "2020-02-20 00:00:00", # Optional. The start time of the feature importance. "status": "str" # Optional. The status of the job processing the feature importance. Known values are: "Succeeded", "Running", "Failed", "NotSubmitted", "Timeout", and "Canceled". } ``` -------------------------------- ### Get Manifest Properties from Azure Container Registry Source: https://learn.microsoft.com/en-us/python/api/azure-containerregistry/azure.containerregistry.aio.containerregistryclient?view=azure-python Retrieves the properties of a manifest for an artifact within a repository. This example lists all manifest properties and then gets specific properties for an artifact. ```Python from azure.containerregistry.aio import ContainerRegistryClient from azure.identity.aio import DefaultAzureCredential endpoint = os.environ["CONTAINERREGISTRY_ENDPOINT"] client = ContainerRegistryClient(endpoint, DefaultAzureCredential(), audience="my_audience") async for artifact in client.list_manifest_properties("my_repository"): properties = await client.get_manifest_properties("my_repository", artifact.digest) ``` -------------------------------- ### begin_start Source: https://learn.microsoft.com/en-us/python/api/azure-mgmt-workloads/azure.mgmt.workloads.aio.operations.sapvirtualinstancesoperations Starts the SAP application, including the Central Services instance and Application server instances. ```APIDOC ## begin_start ### Description Starts the SAP application, that is the Central Services instance and Application server instances. ### Method POST (Assumed based on 'begin_' prefix for LROs, actual HTTP method not specified) ### Endpoint (Endpoint not specified in source) ### Parameters #### Path Parameters - **resource_group_name** (str) - Required - The name of the resource group. The name is case insensitive. - **sap_virtual_instance_name** (str) - Required - The name of the Virtual Instances for SAP solutions resource. #### Keyword-Only Parameters - **cls** (callable) - A custom type or function that will be passed the direct response. - **continuation_token** (str) - A continuation token to restart a poller from a saved state. - **polling** (bool or AsyncPollingMethod) - By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - **polling_interval** (int) - Default waiting time between two polls for LRO operations if no Retry-After header is present. ### Returns #### Success Response - **AsyncLROPoller[OperationStatusResult]** - An instance of AsyncLROPoller that returns either OperationStatusResult or the result of cls(response) #### Exceptions - **HttpResponseError** ``` -------------------------------- ### Platform Initialization Source: https://learn.microsoft.com/en-us/python/api/uamqp/uamqp.c_uamqp?view=azure-python Initializes the platform. ```python platform_init() ```