diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/__init__.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/__init__.py index f6acc11aa4e..6439dd20eb7 100644 --- a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/__init__.py +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/__init__.py @@ -8,3 +8,4 @@ # pylint: skip-file # flake8: noqa +from ._clients import * diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/_clients.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/_clients.py new file mode 100644 index 00000000000..151689d66ce --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/_clients.py @@ -0,0 +1,46 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_client("AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient_playwright_cli_extension") +class AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient(AAZBaseClient): + _CLOUD_HOST_TEMPLATES = { + CloudNameEnum.AzureCloud: "https://{endpoint}", + } + + _AAD_CREDENTIAL_SCOPES = [ + "https://playwright.microsoft.com/.default", + ] + + @classmethod + def _build_base_url(cls, ctx, **kwargs): + endpoint = None + if not endpoint: + endpoint = cls._CLOUD_HOST_TEMPLATES.get(ctx.cli_ctx.cloud.name, None) + return endpoint + + @classmethod + def _build_configuration(cls, ctx, credential, **kwargs): + return AAZClientConfiguration( + credential=credential, + credential_scopes=cls._AAD_CREDENTIAL_SCOPES, + **kwargs + ) + + +class _AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClientHelper: + """Helper class for AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient""" + + +__all__ = [ + "AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient", +] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/__cmd_group.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/__cmd_group.py new file mode 100644 index 00000000000..c0a7d386d92 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "playwright-testing auth-manager", +) +class __CMDGroup(AAZCommandGroup): + """Manage Auth Manager + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/__init__.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/__cmd_group.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/__cmd_group.py new file mode 100644 index 00000000000..c8b94fb1416 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "playwright-testing auth-manager account", +) +class __CMDGroup(AAZCommandGroup): + """Manage Account + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/__init__.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/_show.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/_show.py new file mode 100644 index 00000000000..f65e2a02399 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/_show.py @@ -0,0 +1,211 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "playwright-testing auth-manager account show", +) +class Show(AAZCommand): + """Get details of the Azure resource mapped to an account for the given account id. Authorization required is Bearer JWT Access token provided by EntraID. + """ + + _aaz_info = { + "version": "2024-12-01", + "resources": [ + ["data-plane:microsoft.playwrighttesting.authmanager", "/accounts/{}", "2024-12-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.endpoint = AAZStrArg( + options=["--endpoint"], + arg_group="Client", + help="Supported Azure Playwright Service API Endpoints.", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.account_id = AAZStrArg( + options=["--account-id"], + help="The account id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(_[A-Za-z0-9]+)*(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccountsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AccountsGet(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient_playwright_cli_extension" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/accounts/{accountId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "endpoint", self.ctx.args.endpoint, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "accountId", self.ctx.args.account_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-12-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.local_auth = AAZStrType( + serialized_name="localAuth", + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.regional_affinity = AAZStrType( + serialized_name="regionalAffinity", + flags={"read_only": True}, + ) + _schema_on_200.reporting = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.resource_id = AAZStrType( + serialized_name="resourceId", + flags={"read_only": True}, + ) + _schema_on_200.scalable_execution = AAZStrType( + serialized_name="scalableExecution", + flags={"read_only": True}, + ) + _schema_on_200.state = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.subscription_id = AAZStrType( + serialized_name="subscriptionId", + flags={"read_only": True}, + ) + _schema_on_200.subscription_state = AAZStrType( + serialized_name="subscriptionState", + flags={"read_only": True}, + ) + _schema_on_200.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/__cmd_group.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/__cmd_group.py new file mode 100644 index 00000000000..d2228c68253 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "playwright-testing auth-manager account access-token", +) +class __CMDGroup(AAZCommandGroup): + """Manage Access Token + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/__init__.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_create.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_create.py new file mode 100644 index 00000000000..a0381c245e6 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_create.py @@ -0,0 +1,238 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "playwright-testing auth-manager account access-token create", +) +class Create(AAZCommand): + """Create an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + """ + + _aaz_info = { + "version": "2024-12-01", + "resources": [ + ["data-plane:microsoft.playwrighttesting.authmanager", "/accounts/{}/access-tokens/{}", "2024-12-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.endpoint = AAZStrArg( + options=["--endpoint"], + arg_group="Client", + help="Supported Azure Playwright Service API Endpoints.", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.access_token_id = AAZUuidArg( + options=["--access-token-id"], + help="The access-token id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + _args_schema.account_id = AAZStrArg( + options=["--account-id"], + help="The account id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(_[A-Za-z0-9]+)*(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.expiry_at = AAZDateTimeArg( + options=["--expiry-at"], + arg_group="Resource", + help="The access-token expiryAt utcDateTime.", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + arg_group="Resource", + help="The access-token name.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$", + max_length=64, + min_length=3, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessTokensCreateOrReplace(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AccessTokensCreateOrReplace(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient_playwright_cli_extension" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [201, 200]: + return self.on_201_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/accounts/{accountId}/access-tokens/{accessTokenId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "endpoint", self.ctx.args.endpoint, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "accessTokenId", self.ctx.args.access_token_id, + required=True, + ), + **self.serialize_url_param( + "accountId", self.ctx.args.account_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-12-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("expiryAt", AAZStrType, ".expiry_at", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_201_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_201_200 + ) + + _schema_on_201_200 = None + + @classmethod + def _build_schema_on_201_200(cls): + if cls._schema_on_201_200 is not None: + return cls._schema_on_201_200 + + cls._schema_on_201_200 = AAZObjectType() + + _schema_on_201_200 = cls._schema_on_201_200 + _schema_on_201_200.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _schema_on_201_200.expiry_at = AAZStrType( + serialized_name="expiryAt", + flags={"required": True}, + ) + _schema_on_201_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_201_200.jwt_token = AAZStrType( + serialized_name="jwtToken", + flags={"read_only": True}, + ) + _schema_on_201_200.name = AAZStrType( + flags={"required": True}, + ) + _schema_on_201_200.state = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_201_200 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_delete.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_delete.py new file mode 100644 index 00000000000..7ef4205b8e9 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_delete.py @@ -0,0 +1,151 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "playwright-testing auth-manager account access-token delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + """ + + _aaz_info = { + "version": "2024-12-01", + "resources": [ + ["data-plane:microsoft.playwrighttesting.authmanager", "/accounts/{}/access-tokens/{}", "2024-12-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.endpoint = AAZStrArg( + options=["--endpoint"], + arg_group="Client", + help="Supported Azure Playwright Service API Endpoints.", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.access_token_id = AAZUuidArg( + options=["--access-token-id"], + help="The access-token id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + _args_schema.account_id = AAZStrArg( + options=["--account-id"], + help="The account id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(_[A-Za-z0-9]+)*(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessTokensDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class AccessTokensDelete(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient_playwright_cli_extension" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/accounts/{accountId}/access-tokens/{accessTokenId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "endpoint", self.ctx.args.endpoint, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "accessTokenId", self.ctx.args.access_token_id, + required=True, + ), + **self.serialize_url_param( + "accountId", self.ctx.args.account_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-12-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_list.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_list.py new file mode 100644 index 00000000000..d249f878a39 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_list.py @@ -0,0 +1,202 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "playwright-testing auth-manager account access-token list", +) +class List(AAZCommand): + """List access-tokens for the given account id. It can use OData query params like $select, $filter, $orderby, $top and $skip. The default page size is 10. Use nextLink in response to fetch more objects in the list. Authorization required is Bearer JWT Access token provided by EntraID. + """ + + _aaz_info = { + "version": "2024-12-01", + "resources": [ + ["data-plane:microsoft.playwrighttesting.authmanager", "/accounts/{}/access-tokens", "2024-12-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.endpoint = AAZStrArg( + options=["--endpoint"], + arg_group="Client", + help="Supported Azure Playwright Service API Endpoints.", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.account_id = AAZStrArg( + options=["--account-id"], + help="The account id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(_[A-Za-z0-9]+)*(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessTokensList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class AccessTokensList(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient_playwright_cli_extension" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/accounts/{accountId}/access-tokens", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "endpoint", self.ctx.args.endpoint, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "accountId", self.ctx.args.account_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-12-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.expiry_at = AAZStrType( + serialized_name="expiryAt", + flags={"required": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.jwt_token = AAZStrType( + serialized_name="jwtToken", + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.state = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_show.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_show.py new file mode 100644 index 00000000000..4215bed132c --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_show.py @@ -0,0 +1,202 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "playwright-testing auth-manager account access-token show", +) +class Show(AAZCommand): + """Get an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + """ + + _aaz_info = { + "version": "2024-12-01", + "resources": [ + ["data-plane:microsoft.playwrighttesting.authmanager", "/accounts/{}/access-tokens/{}", "2024-12-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.endpoint = AAZStrArg( + options=["--endpoint"], + arg_group="Client", + help="Supported Azure Playwright Service API Endpoints.", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.access_token_id = AAZUuidArg( + options=["--access-token-id"], + help="The access-token id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + _args_schema.account_id = AAZStrArg( + options=["--account-id"], + help="The account id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(_[A-Za-z0-9]+)*(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessTokensGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AccessTokensGet(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient_playwright_cli_extension" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/accounts/{accountId}/access-tokens/{accessTokenId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "endpoint", self.ctx.args.endpoint, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "accessTokenId", self.ctx.args.access_token_id, + required=True, + ), + **self.serialize_url_param( + "accountId", self.ctx.args.account_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-12-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _schema_on_200.expiry_at = AAZStrType( + serialized_name="expiryAt", + flags={"required": True}, + ) + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.jwt_token = AAZStrType( + serialized_name="jwtToken", + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.state = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_update.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_update.py new file mode 100644 index 00000000000..6ee749905f4 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/access_token/_update.py @@ -0,0 +1,357 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "playwright-testing auth-manager account access-token update", +) +class Update(AAZCommand): + """Update an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + """ + + _aaz_info = { + "version": "2024-12-01", + "resources": [ + ["data-plane:microsoft.playwrighttesting.authmanager", "/accounts/{}/access-tokens/{}", "2024-12-01"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.endpoint = AAZStrArg( + options=["--endpoint"], + arg_group="Client", + help="Supported Azure Playwright Service API Endpoints.", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.access_token_id = AAZUuidArg( + options=["--access-token-id"], + help="The access-token id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + _args_schema.account_id = AAZStrArg( + options=["--account-id"], + help="The account id.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9]+(_[A-Za-z0-9]+)*(-[A-Za-z0-9]+)+", + max_length=64, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccessTokensGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.AccessTokensCreateOrReplace(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AccessTokensGet(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient_playwright_cli_extension" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/accounts/{accountId}/access-tokens/{accessTokenId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "endpoint", self.ctx.args.endpoint, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "accessTokenId", self.ctx.args.access_token_id, + required=True, + ), + **self.serialize_url_param( + "accountId", self.ctx.args.account_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-12-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _schema_on_200.expiry_at = AAZStrType( + serialized_name="expiryAt", + flags={"required": True}, + ) + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.jwt_token = AAZStrType( + serialized_name="jwtToken", + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.state = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + class AccessTokensCreateOrReplace(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient_playwright_cli_extension" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [201, 200]: + return self.on_201_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/accounts/{accountId}/access-tokens/{accessTokenId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "endpoint", self.ctx.args.endpoint, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "accessTokenId", self.ctx.args.access_token_id, + required=True, + ), + **self.serialize_url_param( + "accountId", self.ctx.args.account_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-12-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_201_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_201_200 + ) + + _schema_on_201_200 = None + + @classmethod + def _build_schema_on_201_200(cls): + if cls._schema_on_201_200 is not None: + return cls._schema_on_201_200 + + cls._schema_on_201_200 = AAZObjectType() + + _schema_on_201_200 = cls._schema_on_201_200 + _schema_on_201_200.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _schema_on_201_200.expiry_at = AAZStrType( + serialized_name="expiryAt", + flags={"required": True}, + ) + _schema_on_201_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_201_200.jwt_token = AAZStrType( + serialized_name="jwtToken", + flags={"read_only": True}, + ) + _schema_on_201_200.name = AAZStrType( + flags={"required": True}, + ) + _schema_on_201_200.state = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_201_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/browser/__cmd_group.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/browser/__cmd_group.py new file mode 100644 index 00000000000..0ea5888e78f --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/browser/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "playwright-testing auth-manager account browser", +) +class __CMDGroup(AAZCommandGroup): + """Manage Browser + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/browser/__init__.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/browser/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/browser/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/browser/_show.py b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/browser/_show.py new file mode 100644 index 00000000000..71eecfa3dbf --- /dev/null +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/auth_manager/account/browser/_show.py @@ -0,0 +1,149 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "playwright-testing auth-manager account browser show", +) +class Show(AAZCommand): + """Get remote browsers corresponding to given account id and redirects the client for running Playwright tests. Authorization required is Bearer JWT Access token provided by EntraID or Microsoft Playwright Testing Service. + """ + + _aaz_info = { + "version": "2024-12-01", + "resources": [ + ["data-plane:microsoft.playwrighttesting.authmanager", "/accounts/{}/browsers", "2024-12-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.endpoint = AAZStrArg( + options=["--endpoint"], + arg_group="Client", + help="Supported Azure Playwright Service API Endpoints.", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.account_id = AAZStrArg( + options=["--account-id"], + help="The account id.", + required=True, + ) + _args_schema.os = AAZStrArg( + options=["--os"], + help="The os provided by client for remote test runs.", + default="Linux", + enum={"Linux": "Linux", "Windows": "Windows"}, + ) + _args_schema.run_id = AAZStrArg( + options=["--run-id"], + help="The run id provided by client for corresponding remote test run.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AccountsGetBrowsers(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class AccountsGetBrowsers(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftPlaywrighttestingAuthmanagerDataPlaneClient_playwright_cli_extension" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [302]: + return self.on_302(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/accounts/{accountId}/browsers", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "endpoint", self.ctx.args.endpoint, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "accountId", self.ctx.args.account_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "os", self.ctx.args.os, + ), + **self.serialize_query_param( + "runId", self.ctx.args.run_id, + ), + **self.serialize_query_param( + "api-version", "2024-12-01", + required=True, + ), + } + return parameters + + def on_302(self, session): + pass + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/playwright-cli-extension/azext_playwright_cli_extension/azext_metadata.json b/src/playwright-cli-extension/azext_playwright_cli_extension/azext_metadata.json index b2e481ecb9e..e506328978c 100644 --- a/src/playwright-cli-extension/azext_playwright_cli_extension/azext_metadata.json +++ b/src/playwright-cli-extension/azext_playwright_cli_extension/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.67.0" + "azext.minCliCoreVersion": "2.70.0" } \ No newline at end of file