Skip to content

WordonlinebusinessClient

Attributes

SensitivityLabelMetadata module-attribute

SensitivityLabelMetadata = List[Dict[str, Any]]

GetFiles module-attribute

GetFiles = List[Dict[str, Any]]

Classes

CreateFileItemInput dataclass

CreateFileItemInput(*, additional_properties: Dict[str, Any] = dict())

Populate a Microsoft Word template

Attributes

additional_properties class-attribute instance-attribute
additional_properties: Dict[str, Any] = dataclass_field(default_factory=dict, kw_only=True)

Dynamic properties determined at runtime (similar to .NET [JsonExtensionData])

GetSourcesResponse dataclass

GetSourcesResponse(*, value: Optional[List[Dict[str, Any]]] = None)

Response for Get sources

GetDrivesResponse dataclass

GetDrivesResponse(*, value: Optional[List[Dict[str, Any]]] = None)

Response for Get drives

GetFileSchemaResponse dataclass

GetFileSchemaResponse(*, additional_properties: Dict[str, Any] = dict())

Response for Fetches the schema of the selected file

Attributes

additional_properties class-attribute instance-attribute
additional_properties: Dict[str, Any] = dataclass_field(default_factory=dict, kw_only=True)

Dynamic properties determined at runtime (similar to .NET [JsonExtensionData])

BlobMetadata dataclass

BlobMetadata(*, id: Optional[str] = None, name: Optional[str] = None, display_name: Optional[str] = None, path: Optional[str] = None, media_type: Optional[str] = None, is_folder: Optional[bool] = None, file_locator: Optional[str] = None)

Definition: BlobMetadata

Attributes

id class-attribute instance-attribute
id: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'Id'})

The unique identifier of the file or folder.

name class-attribute instance-attribute
name: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'Name'})

The name of the file or folder.

display_name class-attribute instance-attribute
display_name: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'DisplayName'})

The display name of the file or folder.

path class-attribute instance-attribute
path: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'Path'})

The path of the file or folder.

media_type class-attribute instance-attribute
media_type: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'MediaType'})

The media type of the file or folder.

is_folder class-attribute instance-attribute
is_folder: Optional[bool] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'IsFolder'})

A boolean value (true, false) to indicate whether or not the blob is a folder.

file_locator class-attribute instance-attribute
file_locator: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'FileLocator'})

The file locator of the file or folder.

ContentBody dataclass

ContentBody(content: str)

Definition: ContentBody

Attributes

content instance-attribute
content: str

Content of the word document

WordonlinebusinessClient

WordonlinebusinessClient(connection_runtime_url: str, credential: AsyncTokenCredential | AzureKeyCredential, *, max_retry_attempts: int = 3, timeout: float = 30.0, use_exponential_backoff: bool = True, initial_retry_delay_seconds: float = 0.5, maximum_retry_delay_seconds: float = 120.0, retry_jitter_factor: float = 0.1, retry_unsafe_http_methods: bool = False, transport: Optional[AsyncHttpTransport] = None, **kwargs: Any)

Bases: ConnectorClientBase

Typed client for wordonlinebusiness connector.

Initialize a WordonlinebusinessClient.

Parameters:

Name Type Description Default
connection_runtime_url str

The connection runtime URL from Azure Portal.

required
credential AsyncTokenCredential | AzureKeyCredential

Caller-owned Azure Core credential.

required
max_retry_attempts int

The maximum number of request attempts.

3
timeout float

The network timeout in seconds for each request. The value configures Azure Core retry and transport deadlines. Nonpositive values disable SDK and transport deadlines.

30.0
use_exponential_backoff bool

Whether retries use exponential backoff.

True
initial_retry_delay_seconds float

The initial retry delay in seconds.

0.5
maximum_retry_delay_seconds float

The maximum retry delay in seconds.

120.0
retry_jitter_factor float

The jitter fraction applied to retry delays.

0.1
retry_unsafe_http_methods bool

Whether unsafe HTTP methods may be retried.

False
transport Optional[AsyncHttpTransport]

Optional Azure Core async HTTP transport closed by the client through its asynchronous lifecycle.

None
**kwargs Any

Optional Azure Core pipeline policy settings.

{}

Methods:

create_file_item async
create_file_item(input: CreateFileItemInput | Mapping[str, Any], source: str, drive: str, file: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> bytes

Populate a Microsoft Word template

Reads a Microsoft Word template to then fill the template fields with selected dynamic values to generate a Word Document.

Swagger operation ID: CreateFileItem.

Parameters:

Name Type Description Default
input CreateFileItemInput | Mapping[str, Any]

The request body. Mapping keys use serialized Swagger wire names.

required
source str

Select from the drop-down or specify one of the following: - "me" - "SharePoint Site URL" - "users/someone's UPN" - "groups/group Id" - "sites/SharePoint Site URL:/teams/team name:" (colons are required).

required
drive str

Select a document library from the drop-down.

required
file str

Select a Word file through File Browse.

required
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Name Type Description
bytes bytes

The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.

create_word_file_with_content async
create_word_file_with_content(input: ContentBody | Mapping[str, Any], *, file_name: Optional[str] = None, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

Create a Microsoft Word document with the given content

Creates a Microsoft Word file with the given content in the root directory (use only from Copilot Studio)

Swagger operation ID: CreateWordFileWithContent.

Parameters:

Name Type Description Default
input ContentBody | Mapping[str, Any]

The request body. Mapping keys use serialized Swagger wire names.

required
file_name Optional[str]

Name of the file.

None
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.

get_file_pdf async
get_file_pdf(source: str, drive: str, file: str, *, extract_sensitivity_label: Optional[bool] = None, fetch_sensitivity_label_metadata: Optional[bool] = None, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> bytes

Convert Word Document to PDF

Gets a PDF version of the selected file

Swagger operation ID: GetFilePDF.

Parameters:

Name Type Description Default
source str

Select from the drop-down or specify one of the following: - "me" - "SharePoint Site URL" - "users/someone's UPN" - "groups/group Id" - "sites/SharePoint Site URL:/teams/team name:" (colons are required).

required
drive str

Select a document library from the drop-down.

required
file str

Select a Word file through File Browse.

required
extract_sensitivity_label Optional[bool]

Select if you want to extract Sensitivity label ( false, true).

None
fetch_sensitivity_label_metadata Optional[bool]

A boolean whether to fetch sensitivity label Metadata for associated LabelId.

None
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Name Type Description
bytes bytes

The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.

list_sources
list_sources(*, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]

Get sources

Get a list of sources.

Returns a single-page Azure Core async collection.

Swagger operation ID: GetSources.

Parameters:

Name Type Description Default
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
AsyncItemPaged[dict[str, Any]]

AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector results. Consume it with async for.

Raises:

Type Description
ConnectorException

If the connector request fails.

list_drives
list_drives(*, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]

Get drives

Get a list of drives.

Returns a single-page Azure Core async collection.

Swagger operation ID: GetDrives.

Parameters:

Name Type Description Default
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
AsyncItemPaged[dict[str, Any]]

AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector results. Consume it with async for.

Raises:

Type Description
ConnectorException

If the connector request fails.

get_file_schema async
get_file_schema(source: str, drive: str, file: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

Fetches the schema of the selected file

Fetches the schema of the selected file.

Swagger operation ID: GetFileSchema.

Parameters:

Name Type Description Default
source str

source.

required
drive str

drive.

required
file str

file.

required
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.