OnlineEndpointOperations Class
OnlineEndpointOperations.
You should not instantiate this class directly. Instead, you should create an MLClient instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
azure.ai.ml._scope_dependent_operations._ScopeDependentOperationsOnlineEndpointOperations
Constructor
OnlineEndpointOperations(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, operation_config: azure.ai.ml._scope_dependent_operations.OperationConfig, service_client_02_2022_preview: azure.ai.ml._restclient.v2022_02_01_preview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, local_endpoint_helper: azure.ai.ml.operations._local_endpoint_helper._LocalEndpointHelper, credentials: Optional[azure.core.credentials.TokenCredential] = None, **kwargs: Dict)
Parameters
- operation_scope
- operation_config
- service_client_02_2022_preview
- all_operations
- local_endpoint_helper
- credentials
Methods
begin_create_or_update |
Create or update an endpoint. |
begin_delete |
Delete an Online Endpoint. |
begin_regenerate_keys |
Regenerate keys for endpoint. |
get |
Get a Endpoint resource. |
get_keys |
Get the auth credentials. |
invoke |
Invokes the endpoint with the provided payload. |
list |
List endpoints of the workspace. |
begin_create_or_update
Create or update an endpoint.
begin_create_or_update(endpoint: azure.ai.ml.entities._endpoint.online_endpoint.OnlineEndpoint, *, local: bool = False) -> azure.core.polling._poller.LROPoller[azure.ai.ml.entities._endpoint.online_endpoint.OnlineEndpoint]
Parameters
- local
- bool
Whether to interact with the endpoint in local Docker environment. Defaults to False.
Returns
A poller to track the operation status if remote, else returns None if local.
Return type
Exceptions
Raised if OnlineEndpoint cannot be successfully validated. Details will be provided in the error message.
Raised if OnlineEndpoint assets (e.g. Data, Code, Model, Environment) cannot be successfully validated. Details will be provided in the error message.
Raised if OnlineEndpoint model cannot be successfully validated. Details will be provided in the error message.
Raised if local path provided points to an empty directory.
Raised if local endpoint resource does not exist.
begin_delete
Delete an Online Endpoint.
begin_delete(name: Optional[str] = None, *, local: bool = False) -> azure.core.polling._poller.LROPoller[None]
Parameters
- local
- bool
Whether to interact with the endpoint in local Docker environment. Defaults to False.
Returns
A poller to track the operation status if remote, else returns None if local.
Return type
Exceptions
Raised if local endpoint resource does not exist.
begin_regenerate_keys
Regenerate keys for endpoint.
begin_regenerate_keys(name: str, *, key_type: str = 'primary') -> azure.core.polling._poller.LROPoller[None]
Parameters
- name
- <xref:<xref:The endpoint type. Defaults to ONLINE_ENDPOINT_TYPE.>>
The endpoint name.
Returns
A poller to track the operation status.
Return type
Exceptions
Raised if OnlineEndpoint cannot be successfully validated. Details will be provided in the error message.
Raised if OnlineEndpoint assets (e.g. Data, Code, Model, Environment) cannot be successfully validated. Details will be provided in the error message.
Raised if OnlineEndpoint model cannot be successfully validated. Details will be provided in the error message.
Raised if local path provided points to an empty directory.
Raised if local endpoint resource does not exist.
get
Get a Endpoint resource.
get(name: str, *, local: bool = False) -> azure.ai.ml.entities._endpoint.online_endpoint.OnlineEndpoint
Parameters
- local
- <xref:Optional>[bool]
Indicates whether to interact with endpoints in local Docker environment. Defaults to False.
Returns
Endpoint object retrieved from the service.
Return type
Exceptions
Raised if local endpoint resource does not exist.
get_keys
Get the auth credentials.
get_keys(name: str) -> Union[azure.ai.ml.entities._endpoint.online_endpoint.EndpointAuthKeys, azure.ai.ml.entities._endpoint.online_endpoint.EndpointAuthToken]
Parameters
Returns
Depending on the auth mode in the endpoint, returns either keys or token
Return type
Exceptions
Raised if OnlineEndpoint cannot be successfully validated. Details will be provided in the error message.
Raised if OnlineEndpoint assets (e.g. Data, Code, Model, Environment) cannot be successfully validated. Details will be provided in the error message.
Raised if OnlineEndpoint model cannot be successfully validated. Details will be provided in the error message.
Raised if local path provided points to an empty directory.
Raised if local endpoint resource does not exist.
invoke
Invokes the endpoint with the provided payload.
invoke(endpoint_name: str, *, request_file: Optional[str] = None, deployment_name: Optional[str] = None, input_data: Optional[Union[str, azure.ai.ml.entities._assets._artifacts.data.Data]] = None, params_override=None, local: bool = False, **kwargs) -> str
Parameters
- request_file
- <xref:Optional>[str]
File containing the request payload. This is only valid for online endpoint.
- deployment_name
- <xref:Optional>[str]
Name of a specific deployment to invoke. This is optional. By default requests are routed to any of the deployments according to the traffic rules.
To use a pre-registered data asset, pass str in format
- local
- <xref:Optional>[bool]
Indicates whether to interact with endpoints in local Docker environment. Defaults to False.
Returns
Prediction output for online endpoint.
Return type
Exceptions
Raised if local endpoint resource does not exist.
Raised if there are multiple deployments and no deployment_name is specified.
Raised if local endpoint is None.
list
List endpoints of the workspace.
list(*, local: bool = False) -> azure.core.paging.ItemPaged[azure.ai.ml.entities._endpoint.online_endpoint.OnlineEndpoint]
Parameters
- local
- bool
(Optional) Flag to indicate whether to interact with endpoints in local Docker environment. Default: False
Returns
A list of endpoints
Return type
Exceptions
Raised if OnlineEndpoint cannot be successfully validated. Details will be provided in the error message.
Raised if OnlineEndpoint assets (e.g. Data, Code, Model, Environment) cannot be successfully validated. Details will be provided in the error message.
Raised if OnlineEndpoint model cannot be successfully validated. Details will be provided in the error message.
Raised if local path provided points to an empty directory.
Raised if local endpoint resource does not exist.
Feedback
Submit and view feedback for