Skip to content

Commit 184845f

Browse files
authored
Add sdk for 2022-03-01-preview api generated here in this PR: (#4552)
Azure/azure-rest-api-specs#18319
1 parent 053f5c5 commit 184845f

File tree

64 files changed

+37121
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+37121
-9
lines changed

src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py

Lines changed: 74 additions & 4 deletions
Large diffs are not rendered by default.

src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "6.1.0"
9+
VERSION = "7.0.0"
1010

src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py

Lines changed: 75 additions & 4 deletions
Large diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from ._app_platform_management_client import AppPlatformManagementClient
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
13+
__all__ = ['AppPlatformManagementClient']
14+
15+
# `._patch.py` is used for handwritten extensions to the generated code
16+
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
17+
from ._patch import patch_sdk
18+
patch_sdk()
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from copy import deepcopy
10+
from typing import Any, Optional, TYPE_CHECKING
11+
12+
from azure.core.rest import HttpRequest, HttpResponse
13+
from azure.mgmt.core import ARMPipelineClient
14+
from msrest import Deserializer, Serializer
15+
16+
from . import models
17+
from ._configuration import AppPlatformManagementClientConfiguration
18+
from .operations import ApiPortalCustomDomainsOperations, ApiPortalsOperations, AppsOperations, BindingsOperations, BuildServiceAgentPoolOperations, BuildServiceBuilderOperations, BuildServiceOperations, BuildpackBindingOperations, CertificatesOperations, ConfigServersOperations, ConfigurationServicesOperations, CustomDomainsOperations, DeploymentsOperations, GatewayCustomDomainsOperations, GatewayRouteConfigsOperations, GatewaysOperations, MonitoringSettingsOperations, Operations, RuntimeVersionsOperations, ServiceRegistriesOperations, ServicesOperations, SkusOperations, StoragesOperations
19+
20+
if TYPE_CHECKING:
21+
# pylint: disable=unused-import,ungrouped-imports
22+
from azure.core.credentials import TokenCredential
23+
24+
class AppPlatformManagementClient:
25+
"""REST API for Azure Spring Cloud.
26+
27+
:ivar services: ServicesOperations operations
28+
:vartype services: azure.mgmt.appplatform.v2022_03_01_preview.operations.ServicesOperations
29+
:ivar config_servers: ConfigServersOperations operations
30+
:vartype config_servers:
31+
azure.mgmt.appplatform.v2022_03_01_preview.operations.ConfigServersOperations
32+
:ivar configuration_services: ConfigurationServicesOperations operations
33+
:vartype configuration_services:
34+
azure.mgmt.appplatform.v2022_03_01_preview.operations.ConfigurationServicesOperations
35+
:ivar service_registries: ServiceRegistriesOperations operations
36+
:vartype service_registries:
37+
azure.mgmt.appplatform.v2022_03_01_preview.operations.ServiceRegistriesOperations
38+
:ivar build_service: BuildServiceOperations operations
39+
:vartype build_service:
40+
azure.mgmt.appplatform.v2022_03_01_preview.operations.BuildServiceOperations
41+
:ivar buildpack_binding: BuildpackBindingOperations operations
42+
:vartype buildpack_binding:
43+
azure.mgmt.appplatform.v2022_03_01_preview.operations.BuildpackBindingOperations
44+
:ivar build_service_builder: BuildServiceBuilderOperations operations
45+
:vartype build_service_builder:
46+
azure.mgmt.appplatform.v2022_03_01_preview.operations.BuildServiceBuilderOperations
47+
:ivar build_service_agent_pool: BuildServiceAgentPoolOperations operations
48+
:vartype build_service_agent_pool:
49+
azure.mgmt.appplatform.v2022_03_01_preview.operations.BuildServiceAgentPoolOperations
50+
:ivar monitoring_settings: MonitoringSettingsOperations operations
51+
:vartype monitoring_settings:
52+
azure.mgmt.appplatform.v2022_03_01_preview.operations.MonitoringSettingsOperations
53+
:ivar apps: AppsOperations operations
54+
:vartype apps: azure.mgmt.appplatform.v2022_03_01_preview.operations.AppsOperations
55+
:ivar bindings: BindingsOperations operations
56+
:vartype bindings: azure.mgmt.appplatform.v2022_03_01_preview.operations.BindingsOperations
57+
:ivar storages: StoragesOperations operations
58+
:vartype storages: azure.mgmt.appplatform.v2022_03_01_preview.operations.StoragesOperations
59+
:ivar certificates: CertificatesOperations operations
60+
:vartype certificates:
61+
azure.mgmt.appplatform.v2022_03_01_preview.operations.CertificatesOperations
62+
:ivar custom_domains: CustomDomainsOperations operations
63+
:vartype custom_domains:
64+
azure.mgmt.appplatform.v2022_03_01_preview.operations.CustomDomainsOperations
65+
:ivar deployments: DeploymentsOperations operations
66+
:vartype deployments:
67+
azure.mgmt.appplatform.v2022_03_01_preview.operations.DeploymentsOperations
68+
:ivar operations: Operations operations
69+
:vartype operations: azure.mgmt.appplatform.v2022_03_01_preview.operations.Operations
70+
:ivar runtime_versions: RuntimeVersionsOperations operations
71+
:vartype runtime_versions:
72+
azure.mgmt.appplatform.v2022_03_01_preview.operations.RuntimeVersionsOperations
73+
:ivar skus: SkusOperations operations
74+
:vartype skus: azure.mgmt.appplatform.v2022_03_01_preview.operations.SkusOperations
75+
:ivar gateways: GatewaysOperations operations
76+
:vartype gateways: azure.mgmt.appplatform.v2022_03_01_preview.operations.GatewaysOperations
77+
:ivar gateway_route_configs: GatewayRouteConfigsOperations operations
78+
:vartype gateway_route_configs:
79+
azure.mgmt.appplatform.v2022_03_01_preview.operations.GatewayRouteConfigsOperations
80+
:ivar gateway_custom_domains: GatewayCustomDomainsOperations operations
81+
:vartype gateway_custom_domains:
82+
azure.mgmt.appplatform.v2022_03_01_preview.operations.GatewayCustomDomainsOperations
83+
:ivar api_portals: ApiPortalsOperations operations
84+
:vartype api_portals:
85+
azure.mgmt.appplatform.v2022_03_01_preview.operations.ApiPortalsOperations
86+
:ivar api_portal_custom_domains: ApiPortalCustomDomainsOperations operations
87+
:vartype api_portal_custom_domains:
88+
azure.mgmt.appplatform.v2022_03_01_preview.operations.ApiPortalCustomDomainsOperations
89+
:param credential: Credential needed for the client to connect to Azure.
90+
:type credential: ~azure.core.credentials.TokenCredential
91+
:param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure
92+
subscription. The subscription ID forms part of the URI for every service call.
93+
:type subscription_id: str
94+
:param base_url: Service URL. Default value is 'https://management.azure.com'.
95+
:type base_url: str
96+
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
97+
Retry-After header is present.
98+
"""
99+
100+
def __init__(
101+
self,
102+
credential: "TokenCredential",
103+
subscription_id: str,
104+
base_url: str = "https://management.azure.com",
105+
**kwargs: Any
106+
) -> None:
107+
self._config = AppPlatformManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
108+
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
109+
110+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
111+
self._serialize = Serializer(client_models)
112+
self._deserialize = Deserializer(client_models)
113+
self._serialize.client_side_validation = False
114+
self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize)
115+
self.config_servers = ConfigServersOperations(self._client, self._config, self._serialize, self._deserialize)
116+
self.configuration_services = ConfigurationServicesOperations(self._client, self._config, self._serialize, self._deserialize)
117+
self.service_registries = ServiceRegistriesOperations(self._client, self._config, self._serialize, self._deserialize)
118+
self.build_service = BuildServiceOperations(self._client, self._config, self._serialize, self._deserialize)
119+
self.buildpack_binding = BuildpackBindingOperations(self._client, self._config, self._serialize, self._deserialize)
120+
self.build_service_builder = BuildServiceBuilderOperations(self._client, self._config, self._serialize, self._deserialize)
121+
self.build_service_agent_pool = BuildServiceAgentPoolOperations(self._client, self._config, self._serialize, self._deserialize)
122+
self.monitoring_settings = MonitoringSettingsOperations(self._client, self._config, self._serialize, self._deserialize)
123+
self.apps = AppsOperations(self._client, self._config, self._serialize, self._deserialize)
124+
self.bindings = BindingsOperations(self._client, self._config, self._serialize, self._deserialize)
125+
self.storages = StoragesOperations(self._client, self._config, self._serialize, self._deserialize)
126+
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
127+
self.custom_domains = CustomDomainsOperations(self._client, self._config, self._serialize, self._deserialize)
128+
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
129+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
130+
self.runtime_versions = RuntimeVersionsOperations(self._client, self._config, self._serialize, self._deserialize)
131+
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
132+
self.gateways = GatewaysOperations(self._client, self._config, self._serialize, self._deserialize)
133+
self.gateway_route_configs = GatewayRouteConfigsOperations(self._client, self._config, self._serialize, self._deserialize)
134+
self.gateway_custom_domains = GatewayCustomDomainsOperations(self._client, self._config, self._serialize, self._deserialize)
135+
self.api_portals = ApiPortalsOperations(self._client, self._config, self._serialize, self._deserialize)
136+
self.api_portal_custom_domains = ApiPortalCustomDomainsOperations(self._client, self._config, self._serialize, self._deserialize)
137+
138+
139+
def _send_request(
140+
self,
141+
request, # type: HttpRequest
142+
**kwargs: Any
143+
) -> HttpResponse:
144+
"""Runs the network request through the client's chained policies.
145+
146+
>>> from azure.core.rest import HttpRequest
147+
>>> request = HttpRequest("GET", "https://www.example.org/")
148+
<HttpRequest [GET], url: 'https://www.example.org/'>
149+
>>> response = client._send_request(request)
150+
<HttpResponse: 200 OK>
151+
152+
For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
153+
154+
:param request: The network request you want to make. Required.
155+
:type request: ~azure.core.rest.HttpRequest
156+
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
157+
:return: The response of your network call. Does not do error handling on your response.
158+
:rtype: ~azure.core.rest.HttpResponse
159+
"""
160+
161+
request_copy = deepcopy(request)
162+
request_copy.url = self._client.format_url(request_copy.url)
163+
return self._client.send_request(request_copy, **kwargs)
164+
165+
def close(self):
166+
# type: () -> None
167+
self._client.close()
168+
169+
def __enter__(self):
170+
# type: () -> AppPlatformManagementClient
171+
self._client.__enter__()
172+
return self
173+
174+
def __exit__(self, *exc_details):
175+
# type: (Any) -> None
176+
self._client.__exit__(*exc_details)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from typing import Any, TYPE_CHECKING
10+
11+
from azure.core.configuration import Configuration
12+
from azure.core.pipeline import policies
13+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
14+
15+
from ._version import VERSION
16+
17+
if TYPE_CHECKING:
18+
# pylint: disable=unused-import,ungrouped-imports
19+
from azure.core.credentials import TokenCredential
20+
21+
22+
class AppPlatformManagementClientConfiguration(Configuration):
23+
"""Configuration for AppPlatformManagementClient.
24+
25+
Note that all parameters used to create this instance are saved as instance
26+
attributes.
27+
28+
:param credential: Credential needed for the client to connect to Azure.
29+
:type credential: ~azure.core.credentials.TokenCredential
30+
:param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
31+
:type subscription_id: str
32+
"""
33+
34+
def __init__(
35+
self,
36+
credential: "TokenCredential",
37+
subscription_id: str,
38+
**kwargs: Any
39+
) -> None:
40+
super(AppPlatformManagementClientConfiguration, self).__init__(**kwargs)
41+
if credential is None:
42+
raise ValueError("Parameter 'credential' must not be None.")
43+
if subscription_id is None:
44+
raise ValueError("Parameter 'subscription_id' must not be None.")
45+
46+
self.credential = credential
47+
self.subscription_id = subscription_id
48+
self.api_version = "2022-03-01-preview"
49+
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
50+
kwargs.setdefault('sdk_moniker', 'mgmt-appplatform/{}'.format(VERSION))
51+
self._configure(**kwargs)
52+
53+
def _configure(
54+
self,
55+
**kwargs # type: Any
56+
):
57+
# type: (...) -> None
58+
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
59+
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
60+
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
61+
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
62+
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
63+
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
64+
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
65+
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
66+
self.authentication_policy = kwargs.get('authentication_policy')
67+
if self.credential and not self.authentication_policy:
68+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
#
4+
# Copyright (c) Microsoft Corporation. All rights reserved.
5+
#
6+
# The MIT License (MIT)
7+
#
8+
# Permission is hereby granted, free of charge, to any person obtaining a copy
9+
# of this software and associated documentation files (the ""Software""), to
10+
# deal in the Software without restriction, including without limitation the
11+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12+
# sell copies of the Software, and to permit persons to whom the Software is
13+
# furnished to do so, subject to the following conditions:
14+
#
15+
# The above copyright notice and this permission notice shall be included in
16+
# all copies or substantial portions of the Software.
17+
#
18+
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24+
# IN THE SOFTWARE.
25+
#
26+
# --------------------------------------------------------------------------
27+
28+
# This file is used for handwritten extensions to the generated code. Example:
29+
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
30+
def patch_sdk():
31+
pass
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------
7+
8+
from azure.core.pipeline.transport import HttpRequest
9+
10+
def _convert_request(request, files=None):
11+
data = request.content if not files else None
12+
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
13+
if files:
14+
request.set_formdata_body(files)
15+
return request
16+
17+
def _format_url_section(template, **kwargs):
18+
components = template.split("/")
19+
while components:
20+
try:
21+
return template.format(**kwargs)
22+
except KeyError as key:
23+
formatted_components = template.split("/")
24+
components = [
25+
c for c in formatted_components if "{}".format(key.args[0]) not in c
26+
]
27+
template = "/".join(components)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
VERSION = "6.1.0"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from ._app_platform_management_client import AppPlatformManagementClient
10+
__all__ = ['AppPlatformManagementClient']
11+
12+
# `._patch.py` is used for handwritten extensions to the generated code
13+
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
14+
from ._patch import patch_sdk
15+
patch_sdk()

0 commit comments

Comments
 (0)