Configuration#
- class ansys.platform.instancemanagement.Configuration(headers: Sequence[Tuple[str, str]], uri: str, access_token: str | None = None, transport: str | None = None, cert_files: CertificateFiles | None = None, certs_dir: str | None = None)#
Configuration for the PIM client.
Built from a configuration file (
from_file(), either version 1 or version 2) or from programmatic parameters (from_parameters()). The resolvedtransportis always one ofinsecure,tls,uds,mtls, orwnua, regardless of how it was built. See Security for the full picture of PyPIM’s transport security model.- Returns:
- Configuration:
settingstoconfigurethePIMclient
- Configuration:
- Raises:
- InvalidConfigurationError:
configurationfileisnotawellformattedjsonfile - InvalidConfigurationError:
versionisnotsupported - InvalidConfigurationError:
akeyismissingintheconfigurationfile
- InvalidConfigurationError:
Methods
Create a PyPIM configuration based on the environment configuration.
Configuration.from_file(config_path)Initialize the PyPIM configuration based on the configuration file.
Configuration.from_parameters(uri[, ...])Build a configuration from programmatic parameters.
Attributes
Access token.
MTLS client certificate files, or
None.MTLS certificates directory, or
None.Headers to add to the requests to PIM.
Whether the connection to PIM requires encryption with a bearer token.
Canonical transport:
insecure,tls,uds,mtls, orwnua.Uri of the PIM service.