From b1d1f789c21a03a6e7ab2057933972ddc767f7a1 Mon Sep 17 00:00:00 2001 From: huiquanjiang Date: Tue, 9 Jul 2024 12:56:29 +0800 Subject: [PATCH] replace with auto-generated parameter: --tenant --- .../aaz/latest/acat/report/_list.py | 6 +- .../aaz/latest/acat/report/snapshot/_list.py | 6 +- .../aaz/latest/acat/report/snapshot/_show.py | 601 ------------------ .../aaz/latest/acat/report/webhook/_list.py | 6 +- src/acat/azext_acat/custom.py | 86 +-- 5 files changed, 24 insertions(+), 681 deletions(-) delete mode 100644 src/acat/azext_acat/aaz/latest/acat/report/snapshot/_show.py diff --git a/src/acat/azext_acat/aaz/latest/acat/report/_list.py b/src/acat/azext_acat/aaz/latest/acat/report/_list.py index 60808fabf68..954f7c382e2 100644 --- a/src/acat/azext_acat/aaz/latest/acat/report/_list.py +++ b/src/acat/azext_acat/aaz/latest/acat/report/_list.py @@ -63,8 +63,8 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) - _args_schema.report_creator_tenant_id = AAZStrArg( - options=["--report-creator-tenant-id"], + _args_schema.tenant = AAZStrArg( + options=["--tenant"], help="The tenant id of the report creator.", fmt=AAZStrArgFormat( min_length=1, @@ -157,7 +157,7 @@ def query_parameters(self): "offerGuid", self.ctx.args.offer_guid, ), **self.serialize_query_param( - "reportCreatorTenantId", self.ctx.args.report_creator_tenant_id, + "reportCreatorTenantId", self.ctx.args.tenant, ), **self.serialize_query_param( "api-version", "2024-06-27", diff --git a/src/acat/azext_acat/aaz/latest/acat/report/snapshot/_list.py b/src/acat/azext_acat/aaz/latest/acat/report/snapshot/_list.py index 78a38e7e477..0d458a3e64a 100644 --- a/src/acat/azext_acat/aaz/latest/acat/report/snapshot/_list.py +++ b/src/acat/azext_acat/aaz/latest/acat/report/snapshot/_list.py @@ -72,8 +72,8 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) - _args_schema.report_creator_tenant_id = AAZStrArg( - options=["--report-creator-tenant-id"], + _args_schema.tenant = AAZStrArg( + options=["--tenant"], help="The tenant id of the report creator.", fmt=AAZStrArgFormat( min_length=1, @@ -176,7 +176,7 @@ def query_parameters(self): "offerGuid", self.ctx.args.offer_guid, ), **self.serialize_query_param( - "reportCreatorTenantId", self.ctx.args.report_creator_tenant_id, + "reportCreatorTenantId", self.ctx.args.tenant, ), **self.serialize_query_param( "api-version", "2024-06-27", diff --git a/src/acat/azext_acat/aaz/latest/acat/report/snapshot/_show.py b/src/acat/azext_acat/aaz/latest/acat/report/snapshot/_show.py deleted file mode 100644 index 8577891b6d1..00000000000 --- a/src/acat/azext_acat/aaz/latest/acat/report/snapshot/_show.py +++ /dev/null @@ -1,601 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "acat report snapshot show", -) -class Show(AAZCommand): - """Get the AppComplianceAutomation snapshot and its properties. - """ - - _aaz_info = { - "version": "2024-06-27", - "resources": [ - ["mgmt-plane", "/providers/microsoft.appcomplianceautomation/reports/{}/snapshots/{}", "2024-06-27"], - ] - } - - 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 "" - - _args_schema = cls._args_schema - _args_schema.report_name = AAZStrArg( - options=["--report-name"], - help="Report Name.", - required=True, - fmt=AAZStrArgFormat( - pattern="^[-a-zA-Z0-9_]{1,50}$", - ), - ) - _args_schema.snapshot_name = AAZStrArg( - options=["--snapshot-name"], - help="Snapshot Name.", - required=True, - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-_]{1,64}$", - ), - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.SnapshotGet(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 SnapshotGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - 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( - "/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/snapshots/{snapshotName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "reportName", self.ctx.args.report_name, - required=True, - ), - **self.serialize_url_param( - "snapshotName", self.ctx.args.snapshot_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2024-06-27", - 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.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _ShowHelper._build_schema_system_data_read(_schema_on_200.system_data) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.compliance_results = AAZListType( - serialized_name="complianceResults", - flags={"read_only": True}, - ) - properties.created_at = AAZStrType( - serialized_name="createdAt", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.report_properties = AAZObjectType( - serialized_name="reportProperties", - flags={"read_only": True}, - ) - properties.report_system_data = AAZObjectType( - serialized_name="reportSystemData", - flags={"read_only": True}, - ) - _ShowHelper._build_schema_system_data_read(properties.report_system_data) - properties.snapshot_name = AAZStrType( - serialized_name="snapshotName", - flags={"read_only": True}, - ) - - compliance_results = cls._schema_on_200.properties.compliance_results - compliance_results.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.compliance_results.Element - _element.categories = AAZListType( - flags={"read_only": True}, - ) - _element.compliance_name = AAZStrType( - serialized_name="complianceName", - flags={"read_only": True}, - ) - - categories = cls._schema_on_200.properties.compliance_results.Element.categories - categories.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.compliance_results.Element.categories.Element - _element.category_name = AAZStrType( - serialized_name="categoryName", - flags={"read_only": True}, - ) - _element.category_status = AAZStrType( - serialized_name="categoryStatus", - flags={"read_only": True}, - ) - _element.control_families = AAZListType( - serialized_name="controlFamilies", - flags={"read_only": True}, - ) - - control_families = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families - control_families.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element - _element.control_family_name = AAZStrType( - serialized_name="controlFamilyName", - flags={"read_only": True}, - ) - _element.control_family_status = AAZStrType( - serialized_name="controlFamilyStatus", - flags={"read_only": True}, - ) - _element.controls = AAZListType( - flags={"read_only": True}, - ) - - controls = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls - controls.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element - _element.control_description = AAZStrType( - serialized_name="controlDescription", - flags={"read_only": True}, - ) - _element.control_description_hyper_link = AAZStrType( - serialized_name="controlDescriptionHyperLink", - flags={"read_only": True}, - ) - _element.control_full_name = AAZStrType( - serialized_name="controlFullName", - flags={"read_only": True}, - ) - _element.control_id = AAZStrType( - serialized_name="controlId", - flags={"read_only": True}, - ) - _element.control_name = AAZStrType( - serialized_name="controlName", - flags={"read_only": True}, - ) - _element.control_status = AAZStrType( - serialized_name="controlStatus", - flags={"read_only": True}, - ) - _element.responsibilities = AAZListType( - flags={"read_only": True}, - ) - - responsibilities = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities - responsibilities.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities.Element - _element.evidence_files = AAZListType( - serialized_name="evidenceFiles", - ) - _element.failed_resource_count = AAZIntType( - serialized_name="failedResourceCount", - ) - _element.guidance = AAZStrType( - flags={"read_only": True}, - ) - _element.justification = AAZStrType( - flags={"read_only": True}, - ) - _element.recommendation_list = AAZListType( - serialized_name="recommendationList", - flags={"read_only": True}, - ) - _element.resource_list = AAZListType( - serialized_name="resourceList", - flags={"read_only": True}, - ) - _element.responsibility_description = AAZStrType( - serialized_name="responsibilityDescription", - flags={"read_only": True}, - ) - _element.responsibility_environment = AAZStrType( - serialized_name="responsibilityEnvironment", - flags={"read_only": True}, - ) - _element.responsibility_id = AAZStrType( - serialized_name="responsibilityId", - flags={"read_only": True}, - ) - _element.responsibility_severity = AAZStrType( - serialized_name="responsibilitySeverity", - flags={"read_only": True}, - ) - _element.responsibility_status = AAZStrType( - serialized_name="responsibilityStatus", - flags={"read_only": True}, - ) - _element.responsibility_title = AAZStrType( - serialized_name="responsibilityTitle", - flags={"read_only": True}, - ) - _element.responsibility_type = AAZStrType( - serialized_name="responsibilityType", - flags={"read_only": True}, - ) - _element.total_resource_count = AAZIntType( - serialized_name="totalResourceCount", - ) - - evidence_files = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities.Element.evidence_files - evidence_files.Element = AAZStrType() - - recommendation_list = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities.Element.recommendation_list - recommendation_list.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities.Element.recommendation_list.Element - _element.recommendation_id = AAZStrType( - serialized_name="recommendationId", - flags={"read_only": True}, - ) - _element.recommendation_short_name = AAZStrType( - serialized_name="recommendationShortName", - flags={"read_only": True}, - ) - _element.recommendation_solutions = AAZListType( - serialized_name="recommendationSolutions", - flags={"read_only": True}, - ) - - recommendation_solutions = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities.Element.recommendation_list.Element.recommendation_solutions - recommendation_solutions.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities.Element.recommendation_list.Element.recommendation_solutions.Element - _element.is_recommend_solution = AAZStrType( - serialized_name="isRecommendSolution", - flags={"read_only": True}, - ) - _element.recommendation_solution_content = AAZStrType( - serialized_name="recommendationSolutionContent", - flags={"read_only": True}, - ) - _element.recommendation_solution_index = AAZStrType( - serialized_name="recommendationSolutionIndex", - flags={"read_only": True}, - ) - - resource_list = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities.Element.resource_list - resource_list.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities.Element.resource_list.Element - _element.account_id = AAZStrType( - serialized_name="accountId", - flags={"read_only": True}, - ) - _element.recommendation_ids = AAZListType( - serialized_name="recommendationIds", - ) - _element.resource_id = AAZStrType( - serialized_name="resourceId", - flags={"read_only": True}, - ) - _element.resource_origin = AAZStrType( - serialized_name="resourceOrigin", - flags={"read_only": True}, - ) - _element.resource_status = AAZStrType( - serialized_name="resourceStatus", - flags={"read_only": True}, - ) - _element.resource_status_change_date = AAZStrType( - serialized_name="resourceStatusChangeDate", - flags={"read_only": True}, - ) - _element.resource_type = AAZStrType( - serialized_name="resourceType", - flags={"read_only": True}, - ) - - recommendation_ids = cls._schema_on_200.properties.compliance_results.Element.categories.Element.control_families.Element.controls.Element.responsibilities.Element.resource_list.Element.recommendation_ids - recommendation_ids.Element = AAZStrType() - - report_properties = cls._schema_on_200.properties.report_properties - report_properties.cert_records = AAZListType( - serialized_name="certRecords", - flags={"read_only": True}, - ) - report_properties.compliance_status = AAZObjectType( - serialized_name="complianceStatus", - flags={"read_only": True}, - ) - report_properties.errors = AAZListType( - flags={"read_only": True}, - ) - report_properties.last_trigger_time = AAZStrType( - serialized_name="lastTriggerTime", - flags={"read_only": True}, - ) - report_properties.next_trigger_time = AAZStrType( - serialized_name="nextTriggerTime", - flags={"read_only": True}, - ) - report_properties.offer_guid = AAZStrType( - serialized_name="offerGuid", - ) - report_properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - report_properties.resources = AAZListType( - flags={"required": True}, - ) - report_properties.status = AAZStrType( - flags={"read_only": True}, - ) - report_properties.storage_info = AAZObjectType( - serialized_name="storageInfo", - ) - report_properties.subscriptions = AAZListType( - flags={"read_only": True}, - ) - report_properties.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"read_only": True}, - ) - report_properties.time_zone = AAZStrType( - serialized_name="timeZone", - flags={"required": True}, - ) - report_properties.trigger_time = AAZStrType( - serialized_name="triggerTime", - flags={"required": True}, - ) - - cert_records = cls._schema_on_200.properties.report_properties.cert_records - cert_records.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.report_properties.cert_records.Element - _element.certification_status = AAZStrType( - serialized_name="certificationStatus", - ) - _element.controls = AAZListType() - _element.ingestion_status = AAZStrType( - serialized_name="ingestionStatus", - ) - _element.offer_guid = AAZStrType( - serialized_name="offerGuid", - ) - - controls = cls._schema_on_200.properties.report_properties.cert_records.Element.controls - controls.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.report_properties.cert_records.Element.controls.Element - _element.control_id = AAZStrType( - serialized_name="controlId", - ) - _element.control_status = AAZStrType( - serialized_name="controlStatus", - ) - - compliance_status = cls._schema_on_200.properties.report_properties.compliance_status - compliance_status.m365 = AAZObjectType( - flags={"read_only": True}, - ) - - m365 = cls._schema_on_200.properties.report_properties.compliance_status.m365 - m365.failed_count = AAZIntType( - serialized_name="failedCount", - flags={"read_only": True}, - ) - m365.manual_count = AAZIntType( - serialized_name="manualCount", - flags={"read_only": True}, - ) - m365.not_applicable_count = AAZIntType( - serialized_name="notApplicableCount", - flags={"read_only": True}, - ) - m365.passed_count = AAZIntType( - serialized_name="passedCount", - flags={"read_only": True}, - ) - m365.pending_count = AAZIntType( - serialized_name="pendingCount", - flags={"read_only": True}, - ) - - errors = cls._schema_on_200.properties.report_properties.errors - errors.Element = AAZStrType() - - resources = cls._schema_on_200.properties.report_properties.resources - resources.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.report_properties.resources.Element - _element.account_id = AAZStrType( - serialized_name="accountId", - ) - _element.resource_id = AAZStrType( - serialized_name="resourceId", - flags={"required": True}, - ) - _element.resource_kind = AAZStrType( - serialized_name="resourceKind", - ) - _element.resource_origin = AAZStrType( - serialized_name="resourceOrigin", - ) - _element.resource_type = AAZStrType( - serialized_name="resourceType", - ) - - storage_info = cls._schema_on_200.properties.report_properties.storage_info - storage_info.account_name = AAZStrType( - serialized_name="accountName", - ) - storage_info.location = AAZStrType() - storage_info.resource_group = AAZStrType( - serialized_name="resourceGroup", - ) - storage_info.subscription_id = AAZStrType( - serialized_name="subscriptionId", - ) - - subscriptions = cls._schema_on_200.properties.report_properties.subscriptions - subscriptions.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - _schema_system_data_read = None - - @classmethod - def _build_schema_system_data_read(cls, _schema): - if cls._schema_system_data_read is not None: - _schema.created_at = cls._schema_system_data_read.created_at - _schema.created_by = cls._schema_system_data_read.created_by - _schema.created_by_type = cls._schema_system_data_read.created_by_type - _schema.last_modified_at = cls._schema_system_data_read.last_modified_at - _schema.last_modified_by = cls._schema_system_data_read.last_modified_by - _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type - return - - cls._schema_system_data_read = _schema_system_data_read = AAZObjectType( - flags={"read_only": True} - ) - - system_data_read = _schema_system_data_read - system_data_read.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data_read.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data_read.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data_read.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data_read.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data_read.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - _schema.created_at = cls._schema_system_data_read.created_at - _schema.created_by = cls._schema_system_data_read.created_by - _schema.created_by_type = cls._schema_system_data_read.created_by_type - _schema.last_modified_at = cls._schema_system_data_read.last_modified_at - _schema.last_modified_by = cls._schema_system_data_read.last_modified_by - _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type - - -__all__ = ["Show"] diff --git a/src/acat/azext_acat/aaz/latest/acat/report/webhook/_list.py b/src/acat/azext_acat/aaz/latest/acat/report/webhook/_list.py index b75b45cf7b8..31b2140eba1 100644 --- a/src/acat/azext_acat/aaz/latest/acat/report/webhook/_list.py +++ b/src/acat/azext_acat/aaz/latest/acat/report/webhook/_list.py @@ -71,8 +71,8 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) - _args_schema.report_creator_tenant_id = AAZStrArg( - options=["--report-creator-tenant-id"], + _args_schema.tenant = AAZStrArg( + options=["--tenant"], help="The tenant id of the report creator.", fmt=AAZStrArgFormat( min_length=1, @@ -175,7 +175,7 @@ def query_parameters(self): "offerGuid", self.ctx.args.offer_guid, ), **self.serialize_query_param( - "reportCreatorTenantId", self.ctx.args.report_creator_tenant_id, + "reportCreatorTenantId", self.ctx.args.tenant, ), **self.serialize_query_param( "api-version", "2024-06-27", diff --git a/src/acat/azext_acat/custom.py b/src/acat/azext_acat/custom.py index 59dc3d7bc50..1e58e22521b 100644 --- a/src/acat/azext_acat/custom.py +++ b/src/acat/azext_acat/custom.py @@ -21,32 +21,32 @@ ParseSubsFromResources, saveArrayAsCsv, ) -from .aaz.latest.app_compliance_automation import Onboard as _AcatOnboard -from .aaz.latest.app_compliance_automation import TriggerEvaluation as _AcatTriggerEvaluation -from .aaz.latest.app_compliance_automation.report import List as _AcatListReport -from .aaz.latest.app_compliance_automation.report import Show as _AcatShowReport -from .aaz.latest.app_compliance_automation.report import Create as _AcatCreateReport -from .aaz.latest.app_compliance_automation.report import Update as _AcatUpdateReport -from .aaz.latest.app_compliance_automation.report import Delete as _AcatDeleteReport -from .aaz.latest.app_compliance_automation.report.snapshot import ( +from .aaz.latest.acat import Onboard as _AcatOnboard +from .aaz.latest.acat import TriggerEvaluation as _AcatTriggerEvaluation +from .aaz.latest.acat.report import List as _AcatListReport +from .aaz.latest.acat.report import Show as _AcatShowReport +from .aaz.latest.acat.report import Create as _AcatCreateReport +from .aaz.latest.acat.report import Update as _AcatUpdateReport +from .aaz.latest.acat.report import Delete as _AcatDeleteReport +from .aaz.latest.acat.report.snapshot import ( List as _AcatListSnapshot, ) -from .aaz.latest.app_compliance_automation.report.snapshot import ( +from .aaz.latest.acat.report.snapshot import ( Download as _AcatDownloadSnapshot, ) -from .aaz.latest.app_compliance_automation.report.webhook import ( +from .aaz.latest.acat.report.webhook import ( List as _AcatListReportWebhook, ) -from .aaz.latest.app_compliance_automation.report.webhook import ( +from .aaz.latest.acat.report.webhook import ( Show as _AcatShowReportWebhook, ) -from .aaz.latest.app_compliance_automation.report.webhook import ( +from .aaz.latest.acat.report.webhook import ( Create as _AcatCreateReportWebhook, ) -from .aaz.latest.app_compliance_automation.report.webhook import ( +from .aaz.latest.acat.report.webhook import ( Update as _AcatUpdateReportWebhook, ) -from .aaz.latest.app_compliance_automation.report.webhook import ( +from .aaz.latest.acat.report.webhook import ( Delete as _AcatDeleteReportWebhook, ) @@ -106,25 +106,6 @@ def _execute_operations(self): self.ListAcatReportWithDupAadToken(ctx=self.ctx)() self.post_operations() - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - args_schema = super()._build_arguments_schema(*args, **kwargs) - - from azure.cli.core.aaz import AAZStrArg, AAZStrArgFormat - - args_schema.report_creator_tenant_id._registered = False - args_schema.tenant_id = AAZStrArg( - options=["--tenant"], - help="The tenant id of the report creator.", - fmt=AAZStrArgFormat( - min_length=1, - ), - ) - return args_schema - - def pre_operations(self): - args = self.ctx.args - args.report_creator_tenant_id = args.tenant_id class ShowAcatReport(_AcatShowReport): @@ -237,14 +218,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Name of the downloaded file without postfix", required=False, ) - args_schema.report_creator_tenant_id._registered = False - args_schema.tenant_id = AAZStrArg( - options=["--tenant"], - help="The tenant id of the report creator.", - fmt=AAZStrArgFormat( - min_length=1, - ), - ) return args_schema def _output(self, *args, **kwargs): @@ -273,7 +246,6 @@ def _output(self, *args, **kwargs): def pre_operations(self): args = self.ctx.args - args.report_creator_tenant_id = args.tenant_id cmd = GetControlAssessment(cli_ctx=self.cli_ctx) result = cmd._handler( {"cmd": cmd, "report_name": args.report_name, "compliance_status": "all"} @@ -295,17 +267,9 @@ def _execute_operations(self): def _build_arguments_schema(cls, *args, **kwargs): args_schema = super()._build_arguments_schema(*args, **kwargs) - from azure.cli.core.aaz import AAZStrArg, AAZStrArgFormat + from azure.cli.core.aaz import AAZStrArg - args_schema.report_creator_tenant_id._registered = False - args_schema.tenant_id = AAZStrArg( - options=["--tenant"], - help="The tenant id of the report creator.", - fmt=AAZStrArgFormat( - min_length=1, - ), - ) args_schema.compliance_status = AAZStrArg( options=["--compliance-status"], help="Compliance status.", @@ -318,7 +282,6 @@ def pre_operations(self): args = self.ctx.args args.top = 1 args.skip_token = "0" - args.report_creator_tenant_id = args.tenant_id def _output(self, *args, **kwargs): snapshots = self.deserialize_output( @@ -362,25 +325,6 @@ def _execute_operations(self): self.ListAcatReportWebhookWithDupAadToken(ctx=self.ctx)() self.post_operations() - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - args_schema = super()._build_arguments_schema(*args, **kwargs) - - from azure.cli.core.aaz import AAZStrArg, AAZStrArgFormat - - args_schema.report_creator_tenant_id._registered = False - args_schema.tenant_id = AAZStrArg( - options=["--tenant"], - help="The tenant id of the report creator.", - fmt=AAZStrArgFormat( - min_length=1, - ), - ) - return args_schema - - def pre_operations(self): - args = self.ctx.args - args.report_creator_tenant_id = args.tenant_id class ShowAcatReportWebhook(_AcatShowReportWebhook):