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.
Constructor
OnlineEndpointOperations(operation_scope: OperationScope, operation_config: OperationConfig, service_client_02_2022_preview: AzureMachineLearningWorkspaces, all_operations: OperationsContainer, local_endpoint_helper: _LocalEndpointHelper, credentials: TokenCredential | None = None, **kwargs: Dict)Parameters
| Name | Description | 
|---|---|
| operation_scope 
				Required
			 |  | 
| operation_config 
				Required
			 |  | 
| service_client_02_2022_preview 
				Required
			 |  | 
| all_operations 
				Required
			 |  | 
| local_endpoint_helper 
				Required
			 |  | 
| credentials | Default value: None | 
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: OnlineEndpoint, *, local: bool = False) -> LROPoller[OnlineEndpoint]Parameters
| Name | Description | 
|---|---|
| endpoint 
				Required
			 | The endpoint entity. | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| local | Whether to interact with the endpoint in local Docker environment. Defaults to False. Default value: False | 
Returns
| Type | Description | 
|---|---|
| A poller to track the operation status if remote, else returns None if local. | 
Exceptions
| Type | Description | 
|---|---|
| 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: str | None = None, *, local: bool = False) -> LROPoller[None]Parameters
| Name | Description | 
|---|---|
| name | Name of the endpoint. Default value: None | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| local | Whether to interact with the endpoint in local Docker environment. Defaults to False. Default value: False | 
Returns
| Type | Description | 
|---|---|
| A poller to track the operation status if remote, else returns None if local. | 
Exceptions
| Type | Description | 
|---|---|
| Raised if local endpoint resource does not exist. | 
begin_regenerate_keys
Regenerate keys for endpoint.
begin_regenerate_keys(name: str, *, key_type: str = 'primary') -> LROPoller[None]Parameters
| Name | Description | 
|---|---|
| name 
				Required
			 | 
				<xref:<xref:The endpoint type. Defaults to ONLINE_ENDPOINT_TYPE.>>
		 The endpoint name. | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| key_type | One of "primary", "secondary". Defaults to "primary". Default value: primary | 
Returns
| Type | Description | 
|---|---|
| A poller to track the operation status. | 
get
Get a Endpoint resource.
get(name: str, *, local: bool = False) -> OnlineEndpointParameters
| Name | Description | 
|---|---|
| name 
				Required
			 | Name of the endpoint. | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| local | Indicates whether to interact with endpoints in local Docker environment. Defaults to False. Default value: False | 
Returns
| Type | Description | 
|---|---|
| Endpoint object retrieved from the service. | 
Exceptions
| Type | Description | 
|---|---|
| Raised if local endpoint resource does not exist. | 
get_keys
Get the auth credentials.
get_keys(name: str) -> EndpointAuthKeys | EndpointAuthToken | EndpointAadTokenParameters
| Name | Description | 
|---|---|
| name 
				Required
			 | The endpoint name | 
Returns
| Type | Description | 
|---|---|
| Depending on the auth mode in the endpoint, returns either keys or token | 
invoke
Invokes the endpoint with the provided payload.
invoke(endpoint_name: str, *, request_file: str | None = None, deployment_name: str | None = None, input_data: str | Data | None = None, params_override: Any = None, local: bool = False, **kwargs: Any) -> strParameters
| Name | Description | 
|---|---|
| endpoint_name 
				Required
			 | The endpoint name | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| request_file | File containing the request payload. This is only valid for online endpoint. Default value: None | 
| deployment_name | 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. Default value: None | 
| input_data | To use a pre-registered data asset, pass str in format Default value: None | 
| params_override | A dictionary of payload parameters to override and their desired values. Default value: None | 
| local | Indicates whether to interact with endpoints in local Docker environment. Defaults to False. Default value: False | 
Returns
| Type | Description | 
|---|---|
| Prediction output for online endpoint. | 
Exceptions
| Type | Description | 
|---|---|
| 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) -> ItemPaged[OnlineEndpoint]Keyword-Only Parameters
| Name | Description | 
|---|---|
| local | (Optional) Flag to indicate whether to interact with endpoints in local Docker environment. Default: False Default value: False | 
Returns
| Type | Description | 
|---|---|
| A list of endpoints |