UniversalprintClient
Classes
ListRecentSharesResponse
dataclass
UniversalprintClient
UniversalprintClient(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 universalprint connector.
Initialize a UniversalprintClient.
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:
print_file
async
print_file(input: bytes, printer: str, file_name: str, *, configuration_copies: Optional[int] = None, configuration_orientation: Optional[str] = None, configuration_color_mode: Optional[str] = None, configuration_media_size: Optional[str] = None, configuration_duplex_mode: Optional[str] = None, configuration_pages_per_sheet: Optional[int] = None, configuration_dpi: Optional[int] = None, configuration_quality: Optional[str] = None, configuration_media_type: Optional[str] = None, configuration_finishings: Optional[List[str]] = None, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Print PDF
Prints the given pdf.
Swagger operation ID: PrintFile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
bytes
|
The binary request body. |
required |
printer
|
str
|
The name of the printer. |
required |
file_name
|
str
|
The name of file. |
required |
configuration_copies
|
Optional[int]
|
The number of copies that should be printed. |
None
|
configuration_orientation
|
Optional[str]
|
The direction in which document is displayed. |
None
|
configuration_color_mode
|
Optional[str]
|
The color configuration to print the job. |
None
|
configuration_media_size
|
Optional[str]
|
The page size for the paper or other print media. |
None
|
configuration_duplex_mode
|
Optional[str]
|
The setting to print one-sided jobs or double-sided jobs. |
None
|
configuration_pages_per_sheet
|
Optional[int]
|
The number of input Pages to impose upon a single Impression. |
None
|
configuration_dpi
|
Optional[int]
|
The resolution to use when printing the job. |
None
|
configuration_quality
|
Optional[str]
|
The print quality to process a print job. |
None
|
configuration_media_type
|
Optional[str]
|
The type of media to use. |
None
|
configuration_finishings
|
Optional[List[str]]
|
The finishing processes to apply to the printed document. |
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 |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
list_recent_shares
list_recent_shares(*, 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]]
List recently used shares
List recently used printer shares.
Returns a single-page Azure Core async collection.
Swagger operation ID: ListRecentShares.
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 |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |