diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1ca66c5cee4..90407e25e14 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -282,4 +282,6 @@ /src/storage-mover/ @calvinhzy -/src/traffic-controller/ @jaishals \ No newline at end of file +/src/traffic-controller/ @jaishals + +/src/managedccfs/ @msftsettiy \ No newline at end of file diff --git a/linter_exclusions.yml b/linter_exclusions.yml index 1d3d57f63c0..41d508e048c 100644 --- a/linter_exclusions.yml +++ b/linter_exclusions.yml @@ -322,6 +322,9 @@ codespace plan create: default_sku_name: rule_exclusions: - option_length_too_long +confidentialledger managedccfs update: + rule_exclusions: + - missing_command_test_coverage containerapp env create: parameters: infrastructure_subnet_resource_id: diff --git a/src/managedccfs/HISTORY.rst b/src/managedccfs/HISTORY.rst new file mode 100644 index 00000000000..8c34bccfff8 --- /dev/null +++ b/src/managedccfs/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/managedccfs/README.md b/src/managedccfs/README.md new file mode 100644 index 00000000000..e713f271e9a --- /dev/null +++ b/src/managedccfs/README.md @@ -0,0 +1,13 @@ +# Azure CLI Managedccfs Extension # +This is an extension to Azure CLI to manage Managedccfs resources. + +## How to use ## +Install this extension using the below CLI command +``` +az extension add --name managedccfs +``` + +Then, call it as you would any other az command: +``` +az confidentialledger managedccfs -h +``` \ No newline at end of file diff --git a/src/managedccfs/azext_managedccfs/__init__.py b/src/managedccfs/azext_managedccfs/__init__.py new file mode 100644 index 00000000000..82689af15c6 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/__init__.py @@ -0,0 +1,43 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azext_managedccfs._help import helps # pylint: disable=unused-import + + +class ManagedccfsCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + custom_command_type = CliCommandType( + operations_tmpl='azext_managedccfs.custom#{}') + super().__init__(cli_ctx=cli_ctx, + custom_command_type=custom_command_type) + + def load_command_table(self, args): + from azext_managedccfs.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_managedccfs._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = ManagedccfsCommandsLoader diff --git a/src/managedccfs/azext_managedccfs/_help.py b/src/managedccfs/azext_managedccfs/_help.py new file mode 100644 index 00000000000..126d5d00714 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/_help.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: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/managedccfs/azext_managedccfs/_params.py b/src/managedccfs/azext_managedccfs/_params.py new file mode 100644 index 00000000000..cfcec717c9c --- /dev/null +++ b/src/managedccfs/azext_managedccfs/_params.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# 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: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/managedccfs/azext_managedccfs/aaz/__init__.py b/src/managedccfs/azext_managedccfs/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# -------------------------------------------------------------------------------------------- diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/__init__.py b/src/managedccfs/azext_managedccfs/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# -------------------------------------------------------------------------------------------- diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/__cmd_group.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/__cmd_group.py new file mode 100644 index 00000000000..e9a5214c7c8 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "confidentialledger", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Deploy and manage Azure confidential ledgers. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/__init__.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/__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/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/__cmd_group.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/__cmd_group.py new file mode 100644 index 00000000000..0b15ec280c9 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "confidentialledger managedccfs", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Deploy and manage the Azure Managed CCF instances + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/__init__.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 * +from ._wait import * diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_create.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_create.py new file mode 100644 index 00000000000..e218d2212d3 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_create.py @@ -0,0 +1,285 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "confidentialledger managedccfs create", + is_preview=True, +) +class Create(AAZCommand): + """Create an instance of the Azure Managed CCF service. + + :example: Deploy an Azure Managed CCF instance with 3 CCF nodes and the sample JS application. + az confidentialledger managedccfs create --members [{certificate:'c:\certs\member0_cert.pem',identifier:"member0",group:"group1"},{certificate:'c:\certs\member1_cert.pem',identifier:"member1",group:"group2"}] --name mymccfinstance --resource-group mccfRG --location southcentralus --app-type sample + + :example: Deploy an Azure Managed CCF instance with 3 CCF nodes and a custom JS application. + az confidentialledger managedccfs create --members [{certificate:'c:\certs\member0_cert.pem',identifier:"member0"},{certificate:'c:\certs\member1_cert.pem',identifier:"member1"}] --name mymccfinstance --resource-group mccfRG --location southcentralus + + :example: Deploy an Azure Managed CCF instance with 5 CCF nodes and a custom JS application + az confidentialledger managedccfs create --members [{certificate:'c:\certs\member0_cert.pem',identifier:"member0",group:"mygroup1"},{certificate:'c:\certs\member1_cert.pem',identifier:"member1"}] --name mymccfinstance --resource-group mccfRG --location southcentralus --node-count 5 + """ + + _aaz_info = { + "version": "2023-01-26-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.confidentialledger/managedccfs/{}", "2023-01-26-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, 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 "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="A unique name for the instance.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[^-0-9][A-Za-z0-9-]{1,33}[A-Za-z0-9]$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "ManagedCCF" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="ManagedCCF", + help="The geo-location of the instance. The only region that is supported is southcentralus.", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="ManagedCCF", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.deployment_type = AAZObjectArg( + options=["--deployment-type"], + arg_group="Properties", + help="Instance specific data.", + ) + _args_schema.member_certificates = AAZListArg( + options=["--member-certificates"], + arg_group="Properties", + help="A collection of member identity certificates.", + is_preview=True, + ) + _args_schema.node_count = AAZIntArg( + options=["--node-count"], + arg_group="Properties", + help={"short-summary": "Number of CCF nodes in the instance.", "long-summary": "If the argument is omitted, a default value of 3 is used. The maximum supported size is 9 nodes."}, + is_preview=True, + default=3, + ) + + deployment_type = cls._args_schema.deployment_type + deployment_type.app_source_uri = AAZStrArg( + options=["app-source-uri"], + help={"short-summary": "Supply 'sample' to deploy the sample JS application.", "long-summary": "Determines the type of the JS application to deploy."}, + default="customImage", + ) + deployment_type.language_runtime = AAZStrArg( + options=["language-runtime"], + help="The language runtime value is 'JS'", + default="JS", + enum={"CPP": "CPP", "JS": "JS"}, + ) + + member_certificates = cls._args_schema.member_certificates + member_certificates.Element = AAZObjectArg() + + _element = cls._args_schema.member_certificates.Element + _element.certificate = AAZStrArg( + options=["certificate"], + help="Member Identity Certificate", + ) + _element.encryptionkey = AAZStrArg( + options=["encryptionkey"], + help="Member Identity Certificate Encryption Key", + ) + _element.tags = AAZDictArg( + options=["tags"], + help="Tags for Managed CCF Certificates", + ) + + tags = cls._args_schema.member_certificates.Element.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ManagedCCFCreate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ManagedCCFCreate(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 [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "appName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-01-26-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "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("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("deploymentType", AAZObjectType, ".deployment_type") + properties.set_prop("memberIdentityCertificates", AAZListType, ".member_certificates") + properties.set_prop("nodeCount", AAZIntType, ".node_count") + + deployment_type = _builder.get(".properties.deploymentType") + if deployment_type is not None: + deployment_type.set_prop("appSourceUri", AAZStrType, ".app_source_uri") + deployment_type.set_prop("languageRuntime", AAZStrType, ".language_runtime") + + member_identity_certificates = _builder.get(".properties.memberIdentityCertificates") + if member_identity_certificates is not None: + member_identity_certificates.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.memberIdentityCertificates[]") + if _elements is not None: + _elements.set_prop("certificate", AAZStrType, ".certificate") + _elements.set_prop("encryptionkey", AAZStrType, ".encryptionkey") + _elements.set_prop("tags", AAZDictType, ".tags") + + tags = _builder.get(".properties.memberIdentityCertificates[].tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_201(self, session): + pass + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_delete.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_delete.py new file mode 100644 index 00000000000..6d83dde8a67 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_delete.py @@ -0,0 +1,167 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "confidentialledger managedccfs delete", + is_preview=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a Managed CCF instance. + + :example: Delete a Managed CCF instance + az confidentialledger managedccfs delete --name "myMccf" --resource-group "myResourceGroup" + """ + + _aaz_info = { + "version": "2023-01-26-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.confidentialledger/managedccfs/{}", "2023-01-26-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, 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 "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="A unique name for the instance.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[^-0-9][A-Za-z0-9-]{1,33}[A-Za-z0-9]$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ManagedCCFDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ManagedCCFDelete(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 [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "appName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-01-26-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_list.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_list.py new file mode 100644 index 00000000000..b24d6458096 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_list.py @@ -0,0 +1,425 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "confidentialledger managedccfs list", + is_preview=True, +) +class List(AAZCommand): + """View the Azure Managed CCF instances in a resource group. + + :example: View the Managed CCF instances + az confidentialledger managedccfs list --resource-group "myResourceGroup" + """ + + _aaz_info = { + "version": "2023-01-26-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.confidentialledger/managedccfs/", "2023-01-26-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.confidentialledger/managedccfs", "2023-01-26-preview"], + ] + } + + 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 "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.ManagedCCFListBySubscription(ctx=self.ctx)() + if condition_1: + self.ManagedCCFListByResourceGroup(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 ManagedCCFListBySubscription(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( + "/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/managedCCFs/", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-01-26-preview", + 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() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.app_name = AAZStrType( + serialized_name="appName", + flags={"read_only": True}, + ) + properties.app_uri = AAZStrType( + serialized_name="appUri", + flags={"read_only": True}, + ) + properties.deployment_type = AAZObjectType( + serialized_name="deploymentType", + ) + properties.identity_service_uri = AAZStrType( + serialized_name="identityServiceUri", + flags={"read_only": True}, + ) + properties.member_identity_certificates = AAZListType( + serialized_name="memberIdentityCertificates", + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + deployment_type = cls._schema_on_200.value.Element.properties.deployment_type + deployment_type.app_source_uri = AAZStrType( + serialized_name="appSourceUri", + ) + deployment_type.language_runtime = AAZStrType( + serialized_name="languageRuntime", + ) + + member_identity_certificates = cls._schema_on_200.value.Element.properties.member_identity_certificates + member_identity_certificates.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.member_identity_certificates.Element + _element.certificate = AAZStrType() + _element.encryptionkey = AAZStrType() + _element.tags = AAZDictType() + + tags = cls._schema_on_200.value.Element.properties.member_identity_certificates.Element.tags + tags.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class ManagedCCFListByResourceGroup(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( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs", + **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( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-01-26-preview", + 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() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.app_name = AAZStrType( + serialized_name="appName", + flags={"read_only": True}, + ) + properties.app_uri = AAZStrType( + serialized_name="appUri", + flags={"read_only": True}, + ) + properties.deployment_type = AAZObjectType( + serialized_name="deploymentType", + ) + properties.identity_service_uri = AAZStrType( + serialized_name="identityServiceUri", + flags={"read_only": True}, + ) + properties.member_identity_certificates = AAZListType( + serialized_name="memberIdentityCertificates", + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + deployment_type = cls._schema_on_200.value.Element.properties.deployment_type + deployment_type.app_source_uri = AAZStrType( + serialized_name="appSourceUri", + ) + deployment_type.language_runtime = AAZStrType( + serialized_name="languageRuntime", + ) + + member_identity_certificates = cls._schema_on_200.value.Element.properties.member_identity_certificates + member_identity_certificates.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.member_identity_certificates.Element + _element.certificate = AAZStrType() + _element.encryptionkey = AAZStrType() + _element.tags = AAZDictType() + + tags = cls._schema_on_200.value.Element.properties.member_identity_certificates.Element.tags + tags.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_show.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_show.py new file mode 100644 index 00000000000..e7359ec14a9 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_show.py @@ -0,0 +1,254 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "confidentialledger managedccfs show", + is_preview=True, +) +class Show(AAZCommand): + """View the details of an instance. + + :example: View the details of a Managed CCF instance + az confidentialledger managedccfs show --name "myMccf" --resource-group "myResourceGroup" + """ + + _aaz_info = { + "version": "2023-01-26-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.confidentialledger/managedccfs/{}", "2023-01-26-preview"], + ] + } + + 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.name = AAZStrArg( + options=["-n", "--name"], + help="A unique name for the instance.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[^-0-9][A-Za-z0-9-]{1,33}[A-Za-z0-9]$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ManagedCCFGet(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 ManagedCCFGet(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( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", + **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( + "appName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-01-26-preview", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.app_name = AAZStrType( + serialized_name="appName", + flags={"read_only": True}, + ) + properties.app_uri = AAZStrType( + serialized_name="appUri", + flags={"read_only": True}, + ) + properties.deployment_type = AAZObjectType( + serialized_name="deploymentType", + ) + properties.identity_service_uri = AAZStrType( + serialized_name="identityServiceUri", + flags={"read_only": True}, + ) + properties.member_identity_certificates = AAZListType( + serialized_name="memberIdentityCertificates", + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + deployment_type = cls._schema_on_200.properties.deployment_type + deployment_type.app_source_uri = AAZStrType( + serialized_name="appSourceUri", + ) + deployment_type.language_runtime = AAZStrType( + serialized_name="languageRuntime", + ) + + member_identity_certificates = cls._schema_on_200.properties.member_identity_certificates + member_identity_certificates.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.member_identity_certificates.Element + _element.certificate = AAZStrType() + _element.encryptionkey = AAZStrType() + _element.tags = AAZDictType() + + tags = cls._schema_on_200.properties.member_identity_certificates.Element.tags + tags.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_update.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_update.py new file mode 100644 index 00000000000..cc84d5cc058 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_update.py @@ -0,0 +1,265 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "confidentialledger managedccfs update", + is_preview=True, +) +class Update(AAZCommand): + """Patch a Managed CCF instance. + """ + + _aaz_info = { + "version": "2023-01-26-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.confidentialledger/managedccfs/{}", "2023-01-26-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, 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 "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="A unique name for the instance.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[^-0-9][A-Za-z0-9-]{1,33}[A-Za-z0-9]$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "ManagedCCF" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="ManagedCCF", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.deployment_type = AAZObjectArg( + options=["--deployment-type"], + arg_group="Properties", + help="Deployment Type of Managed CCF", + ) + _args_schema.member_certificates = AAZListArg( + options=["--member-certificates"], + arg_group="Properties", + help="List of member identity certificates for Managed CCF", + ) + _args_schema.node_count = AAZIntArg( + options=["--node-count"], + arg_group="Properties", + help="Node consensus requires odd number of nodes. Select a number between 3 and 9.", + is_preview=True, + ) + + deployment_type = cls._args_schema.deployment_type + deployment_type.app_source_uri = AAZStrArg( + options=["app-source-uri"], + help={"short-summary": "Set it to 'customImage' to deploy a custom JS application or 'sample' to deploy the sample JS application.", "long-summary": "Determines the type of the JS application to deploy."}, + is_preview=True, + ) + deployment_type.language_runtime = AAZStrArg( + options=["language-runtime"], + help="The language runtime value is 'JS'", + enum={"CPP": "CPP", "JS": "JS"}, + ) + + member_certificates = cls._args_schema.member_certificates + member_certificates.Element = AAZObjectArg() + + _element = cls._args_schema.member_certificates.Element + _element.certificate = AAZStrArg( + options=["certificate"], + help="Member Identity Certificate", + ) + _element.encryptionkey = AAZStrArg( + options=["encryptionkey"], + help="Member Identity Certificate Encryption Key", + ) + _element.tags = AAZDictArg( + options=["tags"], + help="Tags for Managed CCF Certificates", + ) + + tags = cls._args_schema.member_certificates.Element.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ManagedCCFUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ManagedCCFUpdate(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 [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", + **self.url_parameters + ) + + @property + def method(self): + return "PATCH" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "appName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-01-26-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "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("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("deploymentType", AAZObjectType, ".deployment_type") + properties.set_prop("memberIdentityCertificates", AAZListType, ".member_certificates") + properties.set_prop("nodeCount", AAZIntType, ".node_count") + + deployment_type = _builder.get(".properties.deploymentType") + if deployment_type is not None: + deployment_type.set_prop("appSourceUri", AAZStrType, ".app_source_uri") + deployment_type.set_prop("languageRuntime", AAZStrType, ".language_runtime") + + member_identity_certificates = _builder.get(".properties.memberIdentityCertificates") + if member_identity_certificates is not None: + member_identity_certificates.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.memberIdentityCertificates[]") + if _elements is not None: + _elements.set_prop("certificate", AAZStrType, ".certificate") + _elements.set_prop("encryptionkey", AAZStrType, ".encryptionkey") + _elements.set_prop("tags", AAZDictType, ".tags") + + tags = _builder.get(".properties.memberIdentityCertificates[].tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + pass + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_wait.py b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_wait.py new file mode 100644 index 00000000000..a7500d77281 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/aaz/latest/confidentialledger/managedccfs/_wait.py @@ -0,0 +1,249 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "confidentialledger managedccfs wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.confidentialledger/managedccfs/{}", "2023-01-26-preview"], + ] + } + + 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.name = AAZStrArg( + options=["-n", "--name"], + help="A unique name for the instance.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[^-0-9][A-Za-z0-9-]{1,33}[A-Za-z0-9]$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ManagedCCFGet(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=False) + return result + + class ManagedCCFGet(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( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", + **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( + "appName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-01-26-preview", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.app_name = AAZStrType( + serialized_name="appName", + flags={"read_only": True}, + ) + properties.app_uri = AAZStrType( + serialized_name="appUri", + flags={"read_only": True}, + ) + properties.deployment_type = AAZObjectType( + serialized_name="deploymentType", + ) + properties.identity_service_uri = AAZStrType( + serialized_name="identityServiceUri", + flags={"read_only": True}, + ) + properties.member_identity_certificates = AAZListType( + serialized_name="memberIdentityCertificates", + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + deployment_type = cls._schema_on_200.properties.deployment_type + deployment_type.app_source_uri = AAZStrType( + serialized_name="appSourceUri", + ) + deployment_type.language_runtime = AAZStrType( + serialized_name="languageRuntime", + ) + + member_identity_certificates = cls._schema_on_200.properties.member_identity_certificates + member_identity_certificates.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.member_identity_certificates.Element + _element.certificate = AAZStrType() + _element.encryptionkey = AAZStrType() + _element.tags = AAZDictType() + + tags = cls._schema_on_200.properties.member_identity_certificates.Element.tags + tags.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/managedccfs/azext_managedccfs/azext_metadata.json b/src/managedccfs/azext_managedccfs/azext_metadata.json new file mode 100644 index 00000000000..be5de02d927 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.45.0" +} \ No newline at end of file diff --git a/src/managedccfs/azext_managedccfs/commands.py b/src/managedccfs/azext_managedccfs/commands.py new file mode 100644 index 00000000000..b9ac0d445cd --- /dev/null +++ b/src/managedccfs/azext_managedccfs/commands.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: disable=too-many-lines +# pylint: disable=too-many-statements + +# from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): # pylint: disable=unused-argument + from .custom import MemberIdentityCertificate + self.command_table["confidentialledger managedccfs create"] = MemberIdentityCertificate(loader=self) diff --git a/src/managedccfs/azext_managedccfs/custom.py b/src/managedccfs/azext_managedccfs/custom.py new file mode 100644 index 00000000000..7556360b35f --- /dev/null +++ b/src/managedccfs/azext_managedccfs/custom.py @@ -0,0 +1,107 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# -------------------------------------------------------------------------- + +from azure.cli.core.azclierror import ArgumentUsageError +from .aaz.latest.confidentialledger.managedccfs._create import Create as _ManagedCCFCreate + + +class MemberIdentityCertificate(_ManagedCCFCreate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZListArg, AAZObjectArg, AAZFileArg, AAZStrArg, AAZFileArgTextFormat + + # Member details. + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.members = AAZListArg( + options=['--members'], + help="Member details.", + required=True, + ) + + args_schema.members.Element = AAZObjectArg() + _Element = args_schema.members.Element + _Element.certificate = AAZFileArg( + options=["certificate"], + help="Path to the PEM certificate file.", + required=True, + fmt=AAZFileArgTextFormat(), + ) + + _Element.encryptionkey = AAZFileArg( + options=["encryption-key"], + help="Path to the PEM certificate file containing the encryption key.", + required=False, + fmt=AAZFileArgTextFormat(), + ) + + _Element.identifier = AAZStrArg( + options=["identifier"], + help="A unique identifier for the member.", + required=True, + ) + + _Element.group = AAZStrArg( + options=["group"], + help="A group name for the member.", + required=False, + ) + + # pylint: disable=protected-access + args_schema.member_certificates._registered = False + + # Deployment type properties. + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.app_type = AAZStrArg( + options=['--app-type'], + help="Set it to 'sample' to deploy the sample JS application.", + required=False, + default="customImage", + ) + + # Deployment type properties. + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.language_runtime = AAZStrArg( + options=['--language-runtime'], + help="The application language.", + required=False, + default="JS", + ) + + # pylint: disable=protected-access + args_schema.deployment_type._registered = False + return args_schema + + def pre_operations(self): + from azure.cli.core.aaz.utils import assign_aaz_list_arg + from azure.cli.core.aaz import has_value + args = self.ctx.args + + if args.node_count < 3 or args.node_count > 9 or (args.node_count.to_serialized_data() % 2 == 0): + raise ArgumentUsageError("Node consensus requires odd number of nodes. Select a number between 3 and 9.") + + def members_transform(_, item): + member_cert = {} + member_cert['certificate'] = item.certificate + + member_cert['encryptionkey'] = None + if (has_value(item.encryptionkey) and item.encryptionkey is not None and item.encryptionkey != ""): + member_cert['encryptionkey'] = item.encryptionkey + + tags = {} + tags['identifier'] = item.identifier + tags['group'] = item.group if has_value(item.group) else None + member_cert['tags'] = tags + return member_cert + + args.member_certificates = assign_aaz_list_arg( + args.member_certificates, + args.members, + element_transformer=members_transform + ) + + args.deployment_type.app_source_uri = args.app_type + args.deployment_type.language_runtime = "JS" if not has_value(args.language_runtime) else args.language_runtime diff --git a/src/managedccfs/azext_managedccfs/tests/__init__.py b/src/managedccfs/azext_managedccfs/tests/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# -------------------------------------------------------------------------------------------- diff --git a/src/managedccfs/azext_managedccfs/tests/latest/__init__.py b/src/managedccfs/azext_managedccfs/tests/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# -------------------------------------------------------------------------------------------- diff --git a/src/managedccfs/azext_managedccfs/tests/latest/example_steps.py b/src/managedccfs/azext_managedccfs/tests/latest/example_steps.py new file mode 100644 index 00000000000..8e2902d83fb --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/latest/example_steps.py @@ -0,0 +1,52 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +#import os +#from .. import try_manual + +# EXAMPLE: /Ledger/put/ConfidentialLedgerCreate +#@try_manual +#def step_create(test, checks=None): +# if checks is None: +# checks = [] +# +# return test.cmd( +# "az confidentialledger managedccfs create " +# '--location "southecentralus" ' +# '--members [{certificate:' + os.path.join("{TEST_DIR}", 'member0_cert.pem') + ',identifier:"member0",group:"group1"}] ' +# '--tags dept="finance" ' +# '--name "{myLedger}" ' +# '--resource-group "{rg}"' +# checks=[], +# ) + + # The `create` command already waits for resource creation. Testing the `wait` command + # results in an infinite loop of GET resource -> 200 OK. + +# EXAMPLE: /Ledger/get/ConfidentialLedgerGet +#@try_manual +#def step_show(test, checks=None): +# if checks is None: +# checks = [] +# return test.cmd( +# "az confidentialledger managedccfs show " '--name "{myLedger}" ' '--resource-group "{rg}"', +# checks=checks, +# ) + +# EXAMPLE: /Ledger/delete/ConfidentialLedgerDelete +#@try_manual +#def step_delete(test, checks=None): +# if checks is None: +# checks = [] +# test.cmd( +# "az confidentialledger managedccfs delete -y " +# '--name "{myLedger}" ' +# '--resource-group "{rg}"', +# checks=checks, +# ) diff --git a/src/managedccfs/azext_managedccfs/tests/latest/member0_cert.pem b/src/managedccfs/azext_managedccfs/tests/latest/member0_cert.pem new file mode 100644 index 00000000000..dec9b184425 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/latest/member0_cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw +FjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3 +MTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB +BAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK +K+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4 +5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud +IwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI +KoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg +r1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL +VMUN0Yet/xU4G0d71ZtULNWo +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/managedccfs/azext_managedccfs/tests/latest/member1_cert.pem b/src/managedccfs/azext_managedccfs/tests/latest/member1_cert.pem new file mode 100644 index 00000000000..06c64b8b11c --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/latest/member1_cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBwDCCAUagAwIBAgIUWH8GSUUSqpzG9LCXLIwn5nqbyA0wCgYIKoZIzj0EAwMw +FzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMB4XDTIyMDkyNzE3MzQzMVoXDTIzMDky +NzE3MzQzMVowFzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMHYwEAYHKoZIzj0CAQYF +K4EEACIDYgAEFXbuLSSCZxebkSn6cYREs6L61QuqLCeUvU/GD+a0PZMxSKkphxOD +NeiCIAfdBchQL/6kCaVWg0lKGr9flZs7ELGDREcnIDOzgqgQW2/lFbIVVRLO7b5t +M9BleF1TWR+0o1MwUTAdBgNVHQ4EFgQUBdwerfsmWhB4TfnAUmAmZmMnQHIwHwYD +VR0jBBgwFoAUBdwerfsmWhB4TfnAUmAmZmMnQHIwDwYDVR0TAQH/BAUwAwEB/zAK +BggqhkjOPQQDAwNoADBlAjB7Ng6lwZ6yeAKc1fdL3JgHC1cln6HN+KdOXlx8SdVP +mxAtomMUxM29K8B+4w/pMGYCMQCG0rmEfQBwyeQL9iMuX+kJPZ882B53DsbHpK6v +xozELrY4HVd+PUY0O2FSyKIC+vY= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_custom_3nodes.yaml b/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_custom_3nodes.yaml new file mode 100644 index 00000000000..2ab43e753ee --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_custom_3nodes.yaml @@ -0,0 +1,550 @@ +interactions: +- request: + body: '{"location": "southcentralus", "properties": {"deploymentType": {"appSourceUri": + "customImage", "languageRuntime": "JS"}, "memberIdentityCertificates": [{"certificate": + "-----BEGIN CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----", "tags": {"identifier": "member0", "group": "contoso"}}], + "nodeCount": 3}, "tags": {"dept": "finance"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + Content-Length: + - '949' + Content-Type: + - application/json + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"microsoft.confidentialledger/managedccfs","location":"southcentralus","tags":{"dept":"finance"},"systemData":{"createdBy":"settiy@microsoft.com","createdByType":"User","createdAt":"2023-03-20T16:26:25.254924Z","lastModifiedBy":"settiy@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-03-20T16:26:25.254924Z"},"properties":{"appName":"synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"customImage"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0","group":"contoso"}}],"nodeCount":3,"provisioningState":"Accepted"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + cache-control: + - no-cache + content-length: + - '1465' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:26:27 GMT + etag: + - '"1d035bf2-0000-0700-0000-641889320000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT10M + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-65t9x + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","name":"e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Accepted","startTime":"2023-03-20T16:26:26.7196954Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:26:57 GMT + etag: + - '"2602dd95-0000-0700-0000-641889320000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","name":"e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Accepted","startTime":"2023-03-20T16:26:26.7196954Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:27:27 GMT + etag: + - '"2602dd95-0000-0700-0000-641889320000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","name":"e7217ec3-8ec1-48f9-ad2c-221627b8b0dd*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Succeeded","startTime":"2023-03-20T16:26:26.7196954Z","endTime":"2023-03-20T16:27:43.8375375Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '601' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:27:57 GMT + etag: + - '"260266ab-0000-0700-0000-6418897f0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"Microsoft.ConfidentialLedger/ManagedCCFs","location":"southcentralus","tags":{"dept":"finance"},"properties":{"appName":"synth-azcli-000002","appUri":"https://synth-azcli-000002.confidential-ledger.azure.com","identityServiceUri":"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"customImage"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0","group":"contoso"}}],"nodeCount":3}}' + headers: + cache-control: + - no-cache + content-length: + - '1381' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:27:57 GMT + etag: + - '"1e038710-0000-0700-0000-6418897f0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-65t9x + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"Microsoft.ConfidentialLedger/ManagedCCFs","location":"southcentralus","tags":{"dept":"finance"},"properties":{"appName":"synth-azcli-000002","appUri":"https://synth-azcli-000002.confidential-ledger.azure.com","identityServiceUri":"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"customImage"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0","group":"contoso"}}],"nodeCount":3}}' + headers: + cache-control: + - no-cache + content-length: + - '1381' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:27:58 GMT + etag: + - '"1e038710-0000-0700-0000-6418897f0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-65t9x + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:27:59 GMT + etag: + - '"1e03e519-0000-0700-0000-641889900000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT5M + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","name":"ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:27:59.9737783Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:28:29 GMT + etag: + - '"260208b0-0000-0700-0000-6418898f0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","name":"ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:27:59.9737783Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:28:59 GMT + etag: + - '"260208b0-0000-0700-0000-6418898f0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","name":"ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:27:59.9737783Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:29:30 GMT + etag: + - '"260208b0-0000-0700-0000-6418898f0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","name":"ee37ff5e-72fa-4e1b-b07e-ea8ba9a30de4*8FCC0A05D2B726096F84344A527977D7857E4BA0964CF91117B08ED6CDCFFF15","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Succeeded","startTime":"2023-03-20T16:27:59.9737783Z","endTime":"2023-03-20T16:29:32.8416238Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '601' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:30:00 GMT + etag: + - '"260272ca-0000-0700-0000-641889ec0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_custom_3nodes_nogroup.yaml b/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_custom_3nodes_nogroup.yaml new file mode 100644 index 00000000000..5ef49eab2c9 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_custom_3nodes_nogroup.yaml @@ -0,0 +1,508 @@ +interactions: +- request: + body: '{"location": "southcentralus", "properties": {"deploymentType": {"appSourceUri": + "customImage", "languageRuntime": "JS"}, "memberIdentityCertificates": [{"certificate": + "-----BEGIN CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----", "tags": {"identifier": "member0"}}], "nodeCount": 3}, "tags": + {"dept": "finance"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + Content-Length: + - '929' + Content-Type: + - application/json + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"microsoft.confidentialledger/managedccfs","location":"southcentralus","tags":{"dept":"finance"},"systemData":{"createdBy":"settiy@microsoft.com","createdByType":"User","createdAt":"2023-03-20T16:44:09.6771573Z","lastModifiedBy":"settiy@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-03-20T16:44:09.6771573Z"},"properties":{"appName":"synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"customImage"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0"}}],"nodeCount":3,"provisioningState":"Accepted"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96?api-version=2020-12-01-preview + cache-control: + - no-cache + content-length: + - '1449' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:44:12 GMT + etag: + - '"1f0384af-0000-0700-0000-64188d5c0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT10M + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","name":"6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Accepted","startTime":"2023-03-20T16:44:10.8778891Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:44:42 GMT + etag: + - '"270229ba-0000-0700-0000-64188d5a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","name":"6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Accepted","startTime":"2023-03-20T16:44:10.8778891Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:45:12 GMT + etag: + - '"270229ba-0000-0700-0000-64188d5a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","name":"6bd8239d-642d-48bb-b360-19bcb1724d2e*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Succeeded","startTime":"2023-03-20T16:44:10.8778891Z","endTime":"2023-03-20T16:45:25.8950641Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '601' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:45:42 GMT + etag: + - '"270227cd-0000-0700-0000-64188da50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"Microsoft.ConfidentialLedger/ManagedCCFs","location":"southcentralus","tags":{"dept":"finance"},"properties":{"appName":"synth-azcli-000002","appUri":"https://synth-azcli-000002.confidential-ledger.azure.com","identityServiceUri":"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"customImage"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0"}}],"nodeCount":3}}' + headers: + cache-control: + - no-cache + content-length: + - '1363' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:45:42 GMT + etag: + - '"1f03c2cc-0000-0700-0000-64188da50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"Microsoft.ConfidentialLedger/ManagedCCFs","location":"southcentralus","tags":{"dept":"finance"},"properties":{"appName":"synth-azcli-000002","appUri":"https://synth-azcli-000002.confidential-ledger.azure.com","identityServiceUri":"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"customImage"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0"}}],"nodeCount":3}}' + headers: + cache-control: + - no-cache + content-length: + - '1363' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:45:43 GMT + etag: + - '"1f03c2cc-0000-0700-0000-64188da50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96?api-version=2020-12-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:45:45 GMT + etag: + - '"1f03d5d3-0000-0700-0000-64188db90000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96?api-version=2020-12-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT5M + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","name":"ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:45:45.2557369Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:46:14 GMT + etag: + - '"270268d2-0000-0700-0000-64188db90000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","name":"ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:45:45.2557369Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:46:44 GMT + etag: + - '"270268d2-0000-0700-0000-64188db90000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","name":"ed486041-2964-4cdf-99fe-9da33b1bf9b6*0E4AE1481B349949348CDDA6DC9E5E38ADAF1B54D791C089AC13B4790E358B96","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Succeeded","startTime":"2023-03-20T16:45:45.2557369Z","endTime":"2023-03-20T16:47:15.7906835Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '601' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:47:15 GMT + etag: + - '"27027ee9-0000-0700-0000-64188e130000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_custom_5nodes.yaml b/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_custom_5nodes.yaml new file mode 100644 index 00000000000..61724e5db1e --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_custom_5nodes.yaml @@ -0,0 +1,550 @@ +interactions: +- request: + body: '{"location": "southcentralus", "properties": {"deploymentType": {"appSourceUri": + "customImage", "languageRuntime": "JS"}, "memberIdentityCertificates": [{"certificate": + "-----BEGIN CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----", "tags": {"identifier": "member0", "group": "contoso"}}], + "nodeCount": 5}, "tags": {"dept": "finance"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + Content-Length: + - '949' + Content-Type: + - application/json + ParameterSetName: + - -n -l -g --tags --node-count --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"microsoft.confidentialledger/managedccfs","location":"southcentralus","tags":{"dept":"finance"},"systemData":{"createdBy":"settiy@microsoft.com","createdByType":"User","createdAt":"2023-03-20T16:35:36.1395369Z","lastModifiedBy":"settiy@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-03-20T16:35:36.1395369Z"},"properties":{"appName":"synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"customImage"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0","group":"contoso"}}],"nodeCount":5,"provisioningState":"Accepted"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + cache-control: + - no-cache + content-length: + - '1467' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:35:38 GMT + etag: + - '"1e0333e7-0000-0700-0000-64188b590000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT10M + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --node-count --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","name":"43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Accepted","startTime":"2023-03-20T16:35:37.4682214Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:36:07 GMT + etag: + - '"2702582e-0000-0700-0000-64188b590000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --node-count --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","name":"43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Accepted","startTime":"2023-03-20T16:35:37.4682214Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:36:38 GMT + etag: + - '"2702582e-0000-0700-0000-64188b590000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --node-count --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","name":"43dbaf65-73ca-42b6-81df-5c3116258747*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Succeeded","startTime":"2023-03-20T16:35:37.4682214Z","endTime":"2023-03-20T16:36:55.1471205Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '601' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:37:07 GMT + etag: + - '"27025a43-0000-0700-0000-64188ba70000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - -n -l -g --tags --node-count --members + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"Microsoft.ConfidentialLedger/ManagedCCFs","location":"southcentralus","tags":{"dept":"finance"},"properties":{"appName":"synth-azcli-000002","appUri":"https://synth-azcli-000002.confidential-ledger.azure.com","identityServiceUri":"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"customImage"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0","group":"contoso"}}],"nodeCount":5}}' + headers: + cache-control: + - no-cache + content-length: + - '1381' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:37:08 GMT + etag: + - '"1f03da08-0000-0700-0000-64188ba70000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"Microsoft.ConfidentialLedger/ManagedCCFs","location":"southcentralus","tags":{"dept":"finance"},"properties":{"appName":"synth-azcli-000002","appUri":"https://synth-azcli-000002.confidential-ledger.azure.com","identityServiceUri":"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"customImage"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0","group":"contoso"}}],"nodeCount":5}}' + headers: + cache-control: + - no-cache + content-length: + - '1381' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:37:09 GMT + etag: + - '"1f03da08-0000-0700-0000-64188ba70000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:37:10 GMT + etag: + - '"1f03a110-0000-0700-0000-64188bb70000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT5M + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","name":"8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:37:10.9365724Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:37:40 GMT + etag: + - '"27027547-0000-0700-0000-64188bb60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","name":"8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:37:10.9365724Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:38:10 GMT + etag: + - '"27027547-0000-0700-0000-64188bb60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","name":"8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:37:10.9365724Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:38:40 GMT + etag: + - '"27027547-0000-0700-0000-64188bb60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","name":"8d6c9818-f3cf-480f-a74d-39ab29892e97*1B2A3D073A528F8435786727521F6742690AE20421D8AF30E824FB809825EA30","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Succeeded","startTime":"2023-03-20T16:37:10.9365724Z","endTime":"2023-03-20T16:38:46.4619167Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '601' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:39:10 GMT + etag: + - '"2702bf62-0000-0700-0000-64188c160000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_sample_3nodes.yaml b/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_sample_3nodes.yaml new file mode 100644 index 00000000000..986308a7d13 --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/latest/recordings/test_managedccfs_create_sample_3nodes.yaml @@ -0,0 +1,558 @@ +interactions: +- request: + body: '{"location": "southcentralus", "properties": {"deploymentType": {"appSourceUri": + "sample", "languageRuntime": "JS"}, "memberIdentityCertificates": [{"certificate": + "-----BEGIN CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----", "tags": {"identifier": "member0", "group": "contoso"}}, {"certificate": + "-----BEGIN CERTIFICATE-----\nMIIBwDCCAUagAwIBAgIUWH8GSUUSqpzG9LCXLIwn5nqbyA0wCgYIKoZIzj0EAwMw\nFzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMB4XDTIyMDkyNzE3MzQzMVoXDTIzMDky\nNzE3MzQzMVowFzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMHYwEAYHKoZIzj0CAQYF\nK4EEACIDYgAEFXbuLSSCZxebkSn6cYREs6L61QuqLCeUvU/GD+a0PZMxSKkphxOD\nNeiCIAfdBchQL/6kCaVWg0lKGr9flZs7ELGDREcnIDOzgqgQW2/lFbIVVRLO7b5t\nM9BleF1TWR+0o1MwUTAdBgNVHQ4EFgQUBdwerfsmWhB4TfnAUmAmZmMnQHIwHwYD\nVR0jBBgwFoAUBdwerfsmWhB4TfnAUmAmZmMnQHIwDwYDVR0TAQH/BAUwAwEB/zAK\nBggqhkjOPQQDAwNoADBlAjB7Ng6lwZ6yeAKc1fdL3JgHC1cln6HN+KdOXlx8SdVP\nmxAtomMUxM29K8B+4w/pMGYCMQCG0rmEfQBwyeQL9iMuX+kJPZ882B53DsbHpK6v\nxozELrY4HVd+PUY0O2FSyKIC+vY=\n-----END + CERTIFICATE-----", "tags": {"identifier": "member1", "group": "fabrikam"}}], + "nodeCount": 3}, "tags": {"dept": "finance"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + Content-Length: + - '1699' + Content-Type: + - application/json + ParameterSetName: + - --name -g --location --members --tags --app-type + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"microsoft.confidentialledger/managedccfs","location":"southcentralus","tags":{"dept":"finance"},"systemData":{"createdBy":"settiy@microsoft.com","createdByType":"User","createdAt":"2023-03-20T16:30:33.8959144Z","lastModifiedBy":"settiy@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-03-20T16:30:33.8959144Z"},"properties":{"appName":"synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"sample"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0","group":"contoso"}},{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBwDCCAUagAwIBAgIUWH8GSUUSqpzG9LCXLIwn5nqbyA0wCgYIKoZIzj0EAwMw\nFzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMB4XDTIyMDkyNzE3MzQzMVoXDTIzMDky\nNzE3MzQzMVowFzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMHYwEAYHKoZIzj0CAQYF\nK4EEACIDYgAEFXbuLSSCZxebkSn6cYREs6L61QuqLCeUvU/GD+a0PZMxSKkphxOD\nNeiCIAfdBchQL/6kCaVWg0lKGr9flZs7ELGDREcnIDOzgqgQW2/lFbIVVRLO7b5t\nM9BleF1TWR+0o1MwUTAdBgNVHQ4EFgQUBdwerfsmWhB4TfnAUmAmZmMnQHIwHwYD\nVR0jBBgwFoAUBdwerfsmWhB4TfnAUmAmZmMnQHIwDwYDVR0TAQH/BAUwAwEB/zAK\nBggqhkjOPQQDAwNoADBlAjB7Ng6lwZ6yeAKc1fdL3JgHC1cln6HN+KdOXlx8SdVP\nmxAtomMUxM29K8B+4w/pMGYCMQCG0rmEfQBwyeQL9iMuX+kJPZ882B53DsbHpK6v\nxozELrY4HVd+PUY0O2FSyKIC+vY=\n-----END + CERTIFICATE-----","tags":{"identifier":"member1","group":"fabrikam"}}],"nodeCount":3,"provisioningState":"Accepted"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + cache-control: + - no-cache + content-length: + - '2210' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:30:34 GMT + etag: + - '"1e031161-0000-0700-0000-64188a2b0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT10M + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - --name -g --location --members --tags --app-type + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","name":"b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Accepted","startTime":"2023-03-20T16:30:34.8200165Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:31:05 GMT + etag: + - '"26021fdb-0000-0700-0000-64188a2a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - --name -g --location --members --tags --app-type + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","name":"b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Accepted","startTime":"2023-03-20T16:30:34.8200165Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:31:35 GMT + etag: + - '"26021fdb-0000-0700-0000-64188a2a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - --name -g --location --members --tags --app-type + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","name":"b6354e50-9dd4-4c4d-99ba-4236c4b9cd1f*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Succeeded","startTime":"2023-03-20T16:30:34.8200165Z","endTime":"2023-03-20T16:31:52.1569928Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '601' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:32:05 GMT + etag: + - '"260218f1-0000-0700-0000-64188a780000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs create + Connection: + - keep-alive + ParameterSetName: + - --name -g --location --members --tags --app-type + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"Microsoft.ConfidentialLedger/ManagedCCFs","location":"southcentralus","tags":{"dept":"finance"},"properties":{"appName":"synth-azcli-000002","appUri":"https://synth-azcli-000002.confidential-ledger.azure.com","identityServiceUri":"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"sample"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0","group":"contoso"}},{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBwDCCAUagAwIBAgIUWH8GSUUSqpzG9LCXLIwn5nqbyA0wCgYIKoZIzj0EAwMw\nFzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMB4XDTIyMDkyNzE3MzQzMVoXDTIzMDky\nNzE3MzQzMVowFzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMHYwEAYHKoZIzj0CAQYF\nK4EEACIDYgAEFXbuLSSCZxebkSn6cYREs6L61QuqLCeUvU/GD+a0PZMxSKkphxOD\nNeiCIAfdBchQL/6kCaVWg0lKGr9flZs7ELGDREcnIDOzgqgQW2/lFbIVVRLO7b5t\nM9BleF1TWR+0o1MwUTAdBgNVHQ4EFgQUBdwerfsmWhB4TfnAUmAmZmMnQHIwHwYD\nVR0jBBgwFoAUBdwerfsmWhB4TfnAUmAmZmMnQHIwDwYDVR0TAQH/BAUwAwEB/zAK\nBggqhkjOPQQDAwNoADBlAjB7Ng6lwZ6yeAKc1fdL3JgHC1cln6HN+KdOXlx8SdVP\nmxAtomMUxM29K8B+4w/pMGYCMQCG0rmEfQBwyeQL9iMuX+kJPZ882B53DsbHpK6v\nxozELrY4HVd+PUY0O2FSyKIC+vY=\n-----END + CERTIFICATE-----","tags":{"identifier":"member1","group":"fabrikam"}}],"nodeCount":3}}' + headers: + cache-control: + - no-cache + content-length: + - '2124' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:32:08 GMT + etag: + - '"1e03bc8a-0000-0700-0000-64188a780000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-2ffkw + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/synth-azcli-000002","name":"synth-azcli-000002","type":"Microsoft.ConfidentialLedger/ManagedCCFs","location":"southcentralus","tags":{"dept":"finance"},"properties":{"appName":"synth-azcli-000002","appUri":"https://synth-azcli-000002.confidential-ledger.azure.com","identityServiceUri":"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/synth-azcli-000002","deploymentType":{"languageRuntime":"JS","appSourceUri":"sample"},"memberIdentityCertificates":[{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBvjCCAUSgAwIBAgIUA0YHcPpUCtd3e8wyK9wyAUBUisAwCgYIKoZIzj0EAwMw\nFjEUMBIGA1UEAwwLZGVtb19tZW1iZXIwHhcNMjIwOTI3MTcyNjA1WhcNMjMwOTI3\nMTcyNjA1WjAWMRQwEgYDVQQDDAtkZW1vX21lbWJlcjB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABGoueoYmaNnye59aXQeEo64fXsk+8UyGRUGRyIkNXYcC29JiuPj/1qrK\nK+20YpqI/ythDMhbxwFDHRlThw/7w33dj/hU5MeENeLRZ7Egku3GOtLD1SuHgNp4\n5iLoX8Vrk6NTMFEwHQYDVR0OBBYEFFVucmWHQlh5hu5eUEbmd9qcNeciMB8GA1Ud\nIwQYMBaAFFVucmWHQlh5hu5eUEbmd9qcNeciMA8GA1UdEwEB/wQFMAMBAf8wCgYI\nKoZIzj0EAwMDaAAwZQIxANHQLNvFQtgw0frnSaF88+TV+LXrVC6+q8LeeOfG8GUg\nr1VWKuUgtuMI0rLQ1sA5fQIwTRKWw5uf+xujwmP7iTOpoKsgwQCkVVTtPrm4XaWL\nVMUN0Yet/xU4G0d71ZtULNWo\n-----END + CERTIFICATE-----","tags":{"identifier":"member0","group":"contoso"}},{"certificate":"-----BEGIN + CERTIFICATE-----\nMIIBwDCCAUagAwIBAgIUWH8GSUUSqpzG9LCXLIwn5nqbyA0wCgYIKoZIzj0EAwMw\nFzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMB4XDTIyMDkyNzE3MzQzMVoXDTIzMDky\nNzE3MzQzMVowFzEVMBMGA1UEAwwMZGVtb19tZW1iZXIyMHYwEAYHKoZIzj0CAQYF\nK4EEACIDYgAEFXbuLSSCZxebkSn6cYREs6L61QuqLCeUvU/GD+a0PZMxSKkphxOD\nNeiCIAfdBchQL/6kCaVWg0lKGr9flZs7ELGDREcnIDOzgqgQW2/lFbIVVRLO7b5t\nM9BleF1TWR+0o1MwUTAdBgNVHQ4EFgQUBdwerfsmWhB4TfnAUmAmZmMnQHIwHwYD\nVR0jBBgwFoAUBdwerfsmWhB4TfnAUmAmZmMnQHIwDwYDVR0TAQH/BAUwAwEB/zAK\nBggqhkjOPQQDAwNoADBlAjB7Ng6lwZ6yeAKc1fdL3JgHC1cln6HN+KdOXlx8SdVP\nmxAtomMUxM29K8B+4w/pMGYCMQCG0rmEfQBwyeQL9iMuX+kJPZ882B53DsbHpK6v\nxozELrY4HVd+PUY0O2FSyKIC+vY=\n-----END + CERTIFICATE-----","tags":{"identifier":"member1","group":"fabrikam"}}],"nodeCount":3}}' + headers: + cache-control: + - no-cache + content-length: + - '2124' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:32:08 GMT + etag: + - '"1e03bc8a-0000-0700-0000-64188a780000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-65t9x + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002?api-version=2023-01-26-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:32:09 GMT + etag: + - '"1e03bd94-0000-0700-0000-64188a8a0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT5M + x-ms-image-digest: + - sha256:be43302cbc588ab40aa6787a99aa09cb23236b99fdbe37c3778a32f62213c4b0 + x-ms-image-tag: + - 1.0.02268.78-ad23013975be98251aa63c507aa2c3835bcab550 + x-ms-machinename: + - controlplane-66f8f54-65t9x + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","name":"5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:32:10.0096255Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:32:40 GMT + etag: + - '"2602dff5-0000-0700-0000-64188a8a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","name":"5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:32:10.0096255Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:33:10 GMT + etag: + - '"2602dff5-0000-0700-0000-64188a8a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","name":"5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Deleting","startTime":"2023-03-20T16:32:10.0096255Z"}' + headers: + cache-control: + - no-cache + content-length: + - '541' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:33:40 GMT + etag: + - '"2602dff5-0000-0700-0000-64188a8a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confidentialledger managedccfs delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes + User-Agent: + - AZURECLI/2.45.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120?api-version=2020-12-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.ConfidentialLedger/locations/SOUTHCENTRALUS/operationStatuses/5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","name":"5e85e5d7-239d-445c-a226-5b47d3a0e126*EC32DEBAC2A948DAA6A2D05BF08948DF23865BB815A149C8AE494E5844C07120","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synth_azcli_rg_000001/providers/Microsoft.ConfidentialLedger/managedCCFs/synth-azcli-000002","status":"Succeeded","startTime":"2023-03-20T16:32:10.0096255Z","endTime":"2023-03-20T16:33:41.1770549Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '601' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 20 Mar 2023 16:34:10 GMT + etag: + - '"2702330e-0000-0700-0000-64188ae50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/managedccfs/azext_managedccfs/tests/latest/test_managedccfs_scenario.py b/src/managedccfs/azext_managedccfs/tests/latest/test_managedccfs_scenario.py new file mode 100644 index 00000000000..145f7c0ed9d --- /dev/null +++ b/src/managedccfs/azext_managedccfs/tests/latest/test_managedccfs_scenario.py @@ -0,0 +1,230 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=line-too-long + +import os + +from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ResourceGroupPreparer + +# Test class for Scenario +class ManagedCCFsScenarioTest(ScenarioTest): + def __init__(self, *args, **kwargs): + super(ManagedCCFsScenarioTest, self).__init__(*args, **kwargs) + + # Create an instance with custom JS app and 3 nodes + @ResourceGroupPreparer(name_prefix='synth_azcli_rg_', location='eastus', random_name_length=30) + def test_managedccfs_create_custom_3nodes(self, resource_group): + location = "southcentralus" + tag_key = "dept" + tag_value = "finance" + tags = f"{tag_key}={tag_value}" + member0_tag_group = "contoso" + member0_tag_identifier = "member0" + member0_cert = os.path.join(os.path.abspath(os.path.join(os.path.abspath(__file__), '..')), "member0_cert.pem") + name = self.create_random_name("synth-azcli-", 30) + + self.kwargs.update({ + "name": name, + "location": location, + "tags": tags, + "member0_tag_group": member0_tag_group, + "member0_tag_identifier": member0_tag_identifier, + "member0_cert": member0_cert, + "rg": resource_group + }) + + self.cmd("confidentialledger managedccfs create -n {name} -l {location} -g {rg} --tags {tags} --members \"[{{certificate:'{member0_cert}',identifier:{member0_tag_identifier},group:{member0_tag_group}}}]\" ") + + azcli_instance = self.cmd('confidentialledger managedccfs show -g {rg} -n {name}').get_output_in_json() + + self.assertIsNotNone(azcli_instance) + self.assertEqual(azcli_instance['properties']['appName'], name) + self.assertEqual(azcli_instance['location'], location) + self.assertEqual(azcli_instance['tags'][tag_key], tag_value) + self.assertEqual(azcli_instance['properties']['appUri'], f"https://{name}.confidential-ledger.azure.com") + self.assertEqual(azcli_instance['properties']['identityServiceUri'], f"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/{name}") + self.assertEqual(azcli_instance['properties']['deploymentType']['languageRuntime'], 'JS') + self.assertEqual(azcli_instance['properties']['deploymentType']['appSourceUri'], 'customImage') + self.assertEqual(azcli_instance['properties']['nodeCount'], 3) + + members = azcli_instance['properties']['memberIdentityCertificates'] + self.assertIsNotNone(members) + self.assertEqual(len(members), 1) + for member in members: + self.assertEqual(member['tags']['identifier'],member0_tag_identifier) + self.assertEqual(member['tags']['group'], member0_tag_group) + + # list will be enabled when the CP is fixed + # self.cmd('confidentialledger managedccfs list --resource-group {rg}', checks=self.check('length(@)', 1)) + + self.cmd('confidentialledger managedccfs delete --resource-group {rg} --name {name} --yes') + + # list will be enabled when the CP bug is fixed + # self.cmd('confidentialledger managedccfs list --resource-group {rg}', checks=self.check('length(@)', 0)) + + # Create an instance with the sample JS app + # and multiple members + @ResourceGroupPreparer(name_prefix='synth_azcli_rg_', location='eastus', random_name_length=30) + def test_managedccfs_create_sample_3nodes(self, resource_group): + location = "southcentralus" + tag_key = "dept" + tag_value = "finance" + tags = f"{tag_key}={tag_value}" + member0_tag_group = "contoso" + member0_tag_identifier = "member0" + member0_cert = os.path.join(os.path.abspath(os.path.join(os.path.abspath(__file__), '..')), "member0_cert.pem") + + member1_tag_group = "fabrikam" + member1_tag_identifier = "member1" + member1_cert = os.path.join(os.path.abspath(os.path.join(os.path.abspath(__file__), '..')), "member1_cert.pem") + + name = self.create_random_name("synth-azcli-", 30) + + self.kwargs.update({ + "name": name, + "location": location, + "tags": tags, + "member0_tag_group": member0_tag_group, + "member0_tag_identifier": member0_tag_identifier, + "member0_cert": member0_cert, + "member1_tag_group": member1_tag_group, + "member1_tag_identifier": member1_tag_identifier, + "member1_cert": member1_cert + }) + + response = self.cmd("confidentialledger managedccfs create --name {name} -g {rg} --location {location} " + "--members \"[{{certificate:'{member0_cert}',identifier:{member0_tag_identifier},group:{member0_tag_group}}},{{certificate:'{member1_cert}',identifier:{member1_tag_identifier},group:{member1_tag_group}}}]\" " + "--tags {tags} --app-type sample") + + azcli_instance = self.cmd('confidentialledger managedccfs show --resource-group {rg} --name {name}').get_output_in_json() + self.assertIsNotNone(azcli_instance) + self.assertEqual(azcli_instance['properties']['appName'], name) + self.assertEqual(azcli_instance['location'], location) + self.assertEqual(azcli_instance['tags'][tag_key], tag_value) + self.assertEqual(azcli_instance['properties']['appUri'], f"https://{name}.confidential-ledger.azure.com") + self.assertEqual(azcli_instance['properties']['identityServiceUri'], f"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/{name}") + self.assertEqual(azcli_instance['properties']['deploymentType']['languageRuntime'], "JS") + self.assertEqual(azcli_instance['properties']['deploymentType']['appSourceUri'], "sample") + self.assertEqual(azcli_instance['properties']['nodeCount'], 3) + + members = azcli_instance['properties']['memberIdentityCertificates'] + self.assertIsNotNone(members) + self.assertEqual(len(members), 2) + for member in members: + self.assertIn(member['tags']['identifier'],[member0_tag_identifier,member1_tag_identifier]) + self.assertIn(member['tags']['group'],[member0_tag_group, member1_tag_group]) + + # list will be enabled when the CP bug is fixed + # self.cmd('confidentialledger managedccfs list --resource-group {rg}', checks=self.check('length(@)', 1)) + + self.cmd('confidentialledger managedccfs delete --resource-group {rg} --name {name} --yes') + + # list will be enabled when the CP is fixed + # self.cmd('confidentialledger managedccfs list --resource-group {rg}', checks=self.check('length(@)', 0)) + + # Create an instance with custom JS app and 5 nodes + @ResourceGroupPreparer(name_prefix='synth_azcli_rg_', location='eastus', random_name_length=30) + def test_managedccfs_create_custom_5nodes(self, resource_group): + location = "southcentralus" + tag_key = "dept" + tag_value = "finance" + tags = f"{tag_key}={tag_value}" + member0_tag_group = "contoso" + member0_tag_identifier = "member0" + member0_cert = os.path.join(os.path.abspath(os.path.join(os.path.abspath(__file__), '..')), "member0_cert.pem") + name = self.create_random_name("synth-azcli-", 30) + node_count = 5 + + self.kwargs.update({ + "name": name, + "location": location, + "tags": tags, + "member0_tag_group": member0_tag_group, + "member0_tag_identifier": member0_tag_identifier, + "member0_cert": member0_cert, + "rg": resource_group, + "node_count": node_count + }) + + self.cmd("confidentialledger managedccfs create -n {name} -l {location} -g {rg} --tags {tags} --node-count {node_count} --members \"[{{certificate:'{member0_cert}',identifier:{member0_tag_identifier},group:{member0_tag_group}}}]\" ") + + azcli_instance = self.cmd('confidentialledger managedccfs show --resource-group {rg} --name {name}').get_output_in_json() + self.assertIsNotNone(azcli_instance) + self.assertEqual(azcli_instance['properties']['appName'], name) + self.assertEqual(azcli_instance['location'], location) + self.assertEqual(azcli_instance['tags'][tag_key], tag_value) + self.assertEqual(azcli_instance['properties']['appUri'], f"https://{name}.confidential-ledger.azure.com") + self.assertEqual(azcli_instance['properties']['identityServiceUri'], f"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/{name}") + self.assertEqual(azcli_instance['properties']['deploymentType']['languageRuntime'], "JS") + self.assertEqual(azcli_instance['properties']['deploymentType']['appSourceUri'], "customImage") + self.assertEqual(azcli_instance['properties']['nodeCount'], node_count) + members = azcli_instance['properties']['memberIdentityCertificates'] + self.assertIsNotNone(members) + self.assertEqual(len(members), 1) + for member in members: + self.assertEqual(member['tags']['identifier'], member0_tag_identifier) + self.assertEqual(member['tags']['group'], member0_tag_group) + + # list will be enabled when the CP is fixed + # self.cmd('confidentialledger managedccfs list --resource-group {rg}', checks=self.check('length(@)', 1)) + + self.cmd('confidentialledger managedccfs delete --resource-group {rg} --name {name} --yes') + + # list will be enabled when the CP bug is fixed + # self.cmd('confidentialledger managedccfs list --resource-group {rg}', checks=self.check('length(@)', 0)) + + # Create an instance with custom JS app, 3 nodes and no member group information + @ResourceGroupPreparer(name_prefix='synth_azcli_rg_', location='eastus', random_name_length=30) + def test_managedccfs_create_custom_3nodes_nogroup(self, resource_group): + location = "southcentralus" + tag_key = "dept" + tag_value = "finance" + tags = f"{tag_key}={tag_value}" + member0_tag_identifier = "member0" + member0_cert = os.path.join(os.path.abspath(os.path.join(os.path.abspath(__file__), '..')), "member0_cert.pem") + name = self.create_random_name("synth-azcli-", 30) + + self.kwargs.update({ + "name": name, + "location": location, + "tags": tags, + "member0_tag_identifier": member0_tag_identifier, + "member0_cert": member0_cert, + "rg": resource_group + }) + + self.cmd("confidentialledger managedccfs create -n {name} -l {location} -g {rg} --tags {tags} --members \"[{{certificate:'{member0_cert}',identifier:{member0_tag_identifier}}}]\" ") + + azcli_instance = self.cmd('confidentialledger managedccfs show -g {rg} -n {name}').get_output_in_json() + + self.assertIsNotNone(azcli_instance) + self.assertEqual(azcli_instance['properties']['appName'], name) + self.assertEqual(azcli_instance['location'], location) + self.assertEqual(azcli_instance['tags'][tag_key], tag_value) + self.assertEqual(azcli_instance['properties']['appUri'], f"https://{name}.confidential-ledger.azure.com") + self.assertEqual(azcli_instance['properties']['identityServiceUri'], f"https://identity.confidential-ledger.core.azure.com/ledgerIdentity/{name}") + self.assertEqual(azcli_instance['properties']['deploymentType']['languageRuntime'], 'JS') + self.assertEqual(azcli_instance['properties']['deploymentType']['appSourceUri'], 'customImage') + self.assertEqual(azcli_instance['properties']['nodeCount'], 3) + + members = azcli_instance['properties']['memberIdentityCertificates'] + self.assertIsNotNone(members) + self.assertEqual(len(members), 1) + for member in members: + self.assertEqual(member['tags']['identifier'],member0_tag_identifier) + + # list will be enabled when the CP is fixed + # self.cmd('confidentialledger managedccfs list --resource-group {rg}', checks=self.check('length(@)', 1)) + + self.cmd('confidentialledger managedccfs delete --resource-group {rg} --name {name} --yes') + + # list will be enabled when the CP bug is fixed + # self.cmd('confidentialledger managedccfs list --resource-group {rg}', checks=self.check('length(@)', 0)) \ No newline at end of file diff --git a/src/managedccfs/setup.cfg b/src/managedccfs/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/managedccfs/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/managedccfs/setup.py b/src/managedccfs/setup.py new file mode 100644 index 00000000000..d0e86bfd532 --- /dev/null +++ b/src/managedccfs/setup.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# -------------------------------------------------------------------------------------------- + +from codecs import open +from setuptools import setup, find_packages + + +# HISTORY.rst entry. +VERSION = '0.1.0' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='managedccfs', + version=VERSION, + description='Microsoft Azure Command-Line Tools Managedccfs Extension.', + long_description=README + '\n\n' + HISTORY, + license='MIT', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/main/src/managedccfs', + classifiers=CLASSIFIERS, + packages=find_packages(exclude=["tests"]), + package_data={'azext_managedccfs': ['azext_metadata.json']}, + install_requires=DEPENDENCIES +) diff --git a/src/service_name.json b/src/service_name.json index 2bfc92e4cb8..6539dfc2213 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -723,5 +723,10 @@ "Command": "az service-networking", "AzureServiceName": "Service Networking", "URL": "" + }, + { + "Command": "az confidentialledger managedccfs", + "AzureServiceName": "Azure Managed Confidential Consortium Framework", + "URL": "https://docs.microsoft.com/en-us/azure/confidential-ledger/" } ] \ No newline at end of file