Skip to content

Commit

Permalink
CodeGen from PR 18183 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
config readme.python (Azure#18183)
  • Loading branch information
SDKAuto committed Mar 15, 2022
1 parent 3922dd7 commit 5e7e3cf
Show file tree
Hide file tree
Showing 17 changed files with 171 additions and 16 deletions.
2 changes: 1 addition & 1 deletion sdk/appservice/azure-mgmt-web/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "cf47fa91b882618a1043e3aeb5803b3a7397cd08",
"commit": "71860bf1bf486de15d91f5b30b568f21b624a551",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/web/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/web/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.1.0"
VERSION = "0.42.0"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7584,6 +7584,43 @@ def build_get_auth_settings_slot_request(
)


def build_get_auth_settings_v2_without_secrets_slot_request(
resource_group_name: str,
name: str,
slot: str,
subscription_id: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2021-03-01"
accept = "application/json"
# Construct URL
url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2')
path_format_arguments = {
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'),
"name": _SERIALIZER.url("name", name, 'str'),
"slot": _SERIALIZER.url("slot", slot, 'str'),
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
}

url = _format_url_section(url, **path_format_arguments)

# Construct parameters
query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')

# Construct headers
header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')

return HttpRequest(
method="GET",
url=url,
params=query_parameters,
headers=header_parameters,
**kwargs
)


def build_update_auth_settings_v2_slot_request(
resource_group_name: str,
name: str,
Expand Down Expand Up @@ -28807,6 +28844,65 @@ def get_auth_settings_slot(
get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore


@distributed_trace
def get_auth_settings_v2_without_secrets_slot(
self,
resource_group_name: str,
name: str,
slot: str,
**kwargs: Any
) -> "_models.SiteAuthSettingsV2":
"""Gets site's Authentication / Authorization settings for apps via the V2 format.

Gets site's Authentication / Authorization settings for apps via the V2 format.

:param resource_group_name: Name of the resource group to which the resource belongs.
:type resource_group_name: str
:param name: Name of the app.
:type name: str
:param slot: Name of the deployment slot. If a slot is not specified, the API will get the
settings for the production slot.
:type slot: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: SiteAuthSettingsV2, or the result of cls(response)
:rtype: ~azure.mgmt.web.v2021_03_01.models.SiteAuthSettingsV2
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))


request = build_get_auth_settings_v2_without_secrets_slot_request(
resource_group_name=resource_group_name,
name=name,
slot=slot,
subscription_id=self._config.subscription_id,
template_url=self.get_auth_settings_v2_without_secrets_slot.metadata['url'],
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)

pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized

get_auth_settings_v2_without_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore


@distributed_trace
def update_auth_settings_v2_slot(
self,
Expand Down

0 comments on commit 5e7e3cf

Please sign in to comment.