|
48 | 48 | from azure.ai.ml._utils._preflight_utils import get_deployments_operation
|
49 | 49 | from azure.ai.ml._utils._registry_utils import get_registry_client
|
50 | 50 | from azure.ai.ml._utils.utils import _is_https_url
|
| 51 | +from azure.ai.ml._utils._experimental import experimental |
51 | 52 | from azure.ai.ml.constants._common import AzureMLResourceType, DefaultOpenEncoding
|
52 | 53 | from azure.ai.ml.entities import (
|
53 | 54 | BatchDeployment,
|
|
66 | 67 | Registry,
|
67 | 68 | Schedule,
|
68 | 69 | Workspace,
|
| 70 | + ServerlessEndpoint, |
| 71 | + MarketplaceSubscription, |
69 | 72 | )
|
70 | 73 | from azure.ai.ml.entities._assets import WorkspaceAssetReference
|
71 | 74 | from azure.ai.ml.exceptions import ErrorCategory, ErrorTarget, ValidationException
|
|
85 | 88 | RegistryOperations,
|
86 | 89 | ConnectionsOperations,
|
87 | 90 | WorkspaceOperations,
|
| 91 | + ServerlessEndpointOperations, |
| 92 | + MarketplaceSubscriptionOperations, |
88 | 93 | )
|
89 | 94 | from azure.ai.ml.operations._code_operations import CodeOperations
|
90 | 95 | from azure.ai.ml.operations._feature_set_operations import FeatureSetOperations
|
@@ -682,9 +687,22 @@ def __init__(
|
682 | 687 | **ops_kwargs, # type: ignore[arg-type]
|
683 | 688 | )
|
684 | 689 |
|
| 690 | + self._serverless_endpoints = ServerlessEndpointOperations( |
| 691 | + self._operation_scope, |
| 692 | + self._operation_config, |
| 693 | + self._service_client_01_2024_preview, |
| 694 | + self._operation_container, |
| 695 | + ) |
| 696 | + self._marketplace_subscriptions = MarketplaceSubscriptionOperations( |
| 697 | + self._operation_scope, |
| 698 | + self._operation_config, |
| 699 | + self._service_client_01_2024_preview, |
| 700 | + ) |
685 | 701 | self._operation_container.add(AzureMLResourceType.FEATURE_STORE, self._featurestores) # type: ignore[arg-type]
|
686 | 702 | self._operation_container.add(AzureMLResourceType.FEATURE_SET, self._featuresets)
|
687 | 703 | self._operation_container.add(AzureMLResourceType.FEATURE_STORE_ENTITY, self._featurestoreentities)
|
| 704 | + self._operation_container.add(AzureMLResourceType.SERVERLESS_ENDPOINT, self._serverless_endpoints) |
| 705 | + self._operation_container.add(AzureMLResourceType.MARKETPLACE_SUBSCRIPTION, self._marketplace_subscriptions) |
688 | 706 |
|
689 | 707 | @classmethod
|
690 | 708 | def from_config(
|
@@ -996,6 +1014,25 @@ def schedules(self) -> ScheduleOperations:
|
996 | 1014 | return self._schedules
|
997 | 1015 |
|
998 | 1016 | @property
|
| 1017 | + @experimental |
| 1018 | + def serverless_endpoints(self) -> ServerlessEndpointOperations: |
| 1019 | + """A collection of serverless endpoint related operations. |
| 1020 | +
|
| 1021 | + :return: Serverless endpoint operations. |
| 1022 | + :rtype: ~azure.ai.ml.operations.ServerlessEndpointOperations |
| 1023 | + """ |
| 1024 | + return self._serverless_endpoints |
| 1025 | + |
| 1026 | + @property |
| 1027 | + @experimental |
| 1028 | + def marketplace_subscriptions(self) -> MarketplaceSubscriptionOperations: |
| 1029 | + """A collection of marketplace subscription related operations. |
| 1030 | +
|
| 1031 | + :return: Marketplace subscription operations. |
| 1032 | + :rtype: ~azure.ai.ml.operations.MarketplaceSubscriptionOperations |
| 1033 | + """ |
| 1034 | + return self._marketplace_subscriptions |
| 1035 | + |
999 | 1036 | def indexes(self) -> IndexOperations:
|
1000 | 1037 | """A collection of index related operations.
|
1001 | 1038 |
|
@@ -1281,3 +1318,15 @@ def _(entity: PipelineComponentBatchDeployment, operations, *args, **kwargs):
|
1281 | 1318 | def _(entity: Schedule, operations, *args, **kwargs):
|
1282 | 1319 | module_logger.debug("Creating or updating schedules")
|
1283 | 1320 | return operations[AzureMLResourceType.SCHEDULE].begin_create_or_update(entity, **kwargs)
|
| 1321 | + |
| 1322 | + |
| 1323 | +@_begin_create_or_update.register(ServerlessEndpoint) |
| 1324 | +def _(entity: ServerlessEndpoint, operations, *args, **kwargs): |
| 1325 | + module_logger.debug("Creating or updating serverless endpoints") |
| 1326 | + return operations[AzureMLResourceType.SERVERLESS_ENDPOINT].begin_create_or_update(entity, **kwargs) |
| 1327 | + |
| 1328 | + |
| 1329 | +@_begin_create_or_update.register(MarketplaceSubscription) |
| 1330 | +def _(entity: MarketplaceSubscription, operations, *args, **kwargs): |
| 1331 | + module_logger.debug("Creating or updating marketplace subscriptions") |
| 1332 | + return operations[AzureMLResourceType.MARKETPLACE_SUBSCRIPTION].begin_create_or_update(entity, **kwargs) |
0 commit comments