Skip to content

Kshitij microsoft #42478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 30 commits into
base: feature/deployment-templates
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
561d2e5
testing
achauhan-scc Jan 2, 2025
4de739d
Merge branch 'Azure:main' into main
achauhan-scc Jan 17, 2025
fd48755
Merge branch 'Azure:main' into main
achauhan-scc Jan 27, 2025
aa0e38c
Merge branch 'Azure:main' into main
achauhan-scc Jan 28, 2025
fc47088
Merge branch 'Azure:main' into main
achauhan-scc Jan 30, 2025
9b3b0f1
Merge branch 'Azure:main' into main
achauhan-scc Feb 3, 2025
4e05a44
Merge branch 'Azure:main' into main
achauhan-scc Feb 3, 2025
3ef3043
Merge branch 'Azure:main' into main
achauhan-scc Feb 5, 2025
0fdf2d7
Merge branch 'Azure:main' into main
achauhan-scc Feb 5, 2025
f230ef7
api review comment for kwargs in job entity
achauhan-scc Feb 5, 2025
3f360f9
remove unuse entry in change log
achauhan-scc Feb 5, 2025
9999fdf
Merge branch 'Azure:main' into main
achauhan-scc Feb 11, 2025
960f8ef
Merge branch 'Azure:main' into main
achauhan-scc Feb 17, 2025
4e0187e
Merge branch 'Azure:main' into main
achauhan-scc Feb 20, 2025
65614ee
Merge branch 'Azure:main' into main
achauhan-scc Feb 20, 2025
1ef1b5f
Merge branch 'Azure:main' into main
achauhan-scc Feb 24, 2025
7226ff1
Merge branch 'Azure:main' into main
achauhan-scc Apr 8, 2025
2b00850
Merge branch 'Azure:main' into main
achauhan-scc Apr 17, 2025
3d1a866
Merge branch 'Azure:main' into main
achauhan-scc Apr 23, 2025
ccca95d
Merge branch 'Azure:main' into main
achauhan-scc Apr 23, 2025
e31dd4d
Merge branch 'Azure:main' into main
achauhan-scc Apr 28, 2025
a64b091
Merge branch 'Azure:main' into main
achauhan-scc Apr 28, 2025
5e0720c
Merge branch 'Azure:main' into main
achauhan-scc Apr 29, 2025
13351ff
Merge branch 'Azure:main' into main
achauhan-scc May 20, 2025
77a576c
Merge branch 'Azure:main' into main
achauhan-scc Jun 10, 2025
04b37e1
Merge branch 'Azure:main' into main
achauhan-scc Aug 5, 2025
299b73a
adding 2024-04 data plane
achauhan-scc Aug 5, 2025
bd5bac1
Merge branch 'feature/deployment-templates' into kshitij-microsoft
kshitij-microsoft Aug 5, 2025
8381053
regenerating rest client
achauhan-scc Aug 12, 2025
830014b
Merge branch 'kshitij-microsoft' of https://github.com/achauhan-scc/a…
achauhan-scc Aug 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._azure_machine_learning_workspaces import AzureMachineLearningWorkspaces
from ._version import VERSION

__version__ = VERSION
__all__ = ['AzureMachineLearningWorkspaces']

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.mgmt.core import ARMPipelineClient

from . import models
from ._configuration import AzureMachineLearningWorkspacesConfiguration
from .operations import DeploymentTemplatesOperations, IndexesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential
from azure.core.rest import HttpRequest, HttpResponse

class AzureMachineLearningWorkspaces(object):
"""AzureMachineLearningWorkspaces.

:ivar deployment_templates: DeploymentTemplatesOperations operations
:vartype deployment_templates:
azure.mgmt.machinelearningservices.operations.DeploymentTemplatesOperations
:ivar indexes: IndexesOperations operations
:vartype indexes: azure.mgmt.machinelearningservices.operations.IndexesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: Api Version. The default value is "2024-04-01-preview". Note that
overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
**kwargs # type: Any
):
# type: (...) -> None
_base_url = '{endpoint}/genericasset/v2.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices'
self._config = AzureMachineLearningWorkspacesConfiguration(credential=credential, **kwargs)
self._client = ARMPipelineClient(base_url=_base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.deployment_templates = DeploymentTemplatesOperations(self._client, self._config, self._serialize, self._deserialize)
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)


def _send_request(
self,
request, # type: HttpRequest
**kwargs # type: Any
):
# type: (...) -> HttpResponse
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = client._send_request(request)
<HttpResponse: 200 OK>

For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

:param request: The network request you want to make. Required.
:type request: ~azure.core.rest.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.rest.HttpResponse
"""

request_copy = deepcopy(request)
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)

def close(self):
# type: () -> None
self._client.close()

def __enter__(self):
# type: () -> AzureMachineLearningWorkspaces
self._client.__enter__()
return self

def __exit__(self, *exc_details):
# type: (Any) -> None
self._client.__exit__(*exc_details)
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential


class AzureMachineLearningWorkspacesConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for AzureMachineLearningWorkspaces.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: Api Version. The default value is "2024-04-01-preview". Note that
overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
**kwargs # type: Any
):
# type: (...) -> None
super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2024-04-01-preview") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")

self.credential = credential
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningservices/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
self,
**kwargs # type: Any
):
# type: (...) -> None
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# --------------------------------------------------------------------------

# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from azure.core.pipeline.transport import HttpRequest

def _convert_request(request, files=None):
data = request.content if not files else None
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
if files:
request.set_formdata_body(files)
return request

def _format_url_section(template, **kwargs):
components = template.split("/")
while components:
try:
return template.format(**kwargs)
except KeyError as key:
formatted_components = template.split("/")
components = [
c for c in formatted_components if "{}".format(key.args[0]) not in c
]
template = "/".join(components)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "0.1.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._azure_machine_learning_workspaces import AzureMachineLearningWorkspaces
__all__ = ['AzureMachineLearningWorkspaces']

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Awaitable, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient

from .. import models
from ._configuration import AzureMachineLearningWorkspacesConfiguration
from .operations import DeploymentTemplatesOperations, IndexesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

class AzureMachineLearningWorkspaces:
"""AzureMachineLearningWorkspaces.

:ivar deployment_templates: DeploymentTemplatesOperations operations
:vartype deployment_templates:
azure.mgmt.machinelearningservices.aio.operations.DeploymentTemplatesOperations
:ivar indexes: IndexesOperations operations
:vartype indexes: azure.mgmt.machinelearningservices.aio.operations.IndexesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:keyword api_version: Api Version. The default value is "2024-04-01-preview". Note that
overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
self,
credential: "AsyncTokenCredential",
**kwargs: Any
) -> None:
_base_url = '{endpoint}/genericasset/v2.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices'
self._config = AzureMachineLearningWorkspacesConfiguration(credential=credential, **kwargs)
self._client = AsyncARMPipelineClient(base_url=_base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.deployment_templates = DeploymentTemplatesOperations(self._client, self._config, self._serialize, self._deserialize)
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)


def _send_request(
self,
request: HttpRequest,
**kwargs: Any
) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = await client._send_request(request)
<AsyncHttpResponse: 200 OK>

For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

:param request: The network request you want to make. Required.
:type request: ~azure.core.rest.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.rest.AsyncHttpResponse
"""

request_copy = deepcopy(request)
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)

async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "AzureMachineLearningWorkspaces":
await self._client.__aenter__()
return self

async def __aexit__(self, *exc_details) -> None:
await self._client.__aexit__(*exc_details)
Loading