diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 48b243a321f..d0db472afab 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -246,4 +246,6 @@ /src/fleet/ @pdaru -/src/traffic-collector/ @rmodh @japani @kukulkarni1 \ No newline at end of file +/src/traffic-collector/ @rmodh @japani @kukulkarni1 + +/src/nginx/ @liftr-nginx diff --git a/src/nginx/HISTORY.rst b/src/nginx/HISTORY.rst new file mode 100644 index 00000000000..8c34bccfff8 --- /dev/null +++ b/src/nginx/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/nginx/README.rst b/src/nginx/README.rst new file mode 100644 index 00000000000..1d5b97fbd48 --- /dev/null +++ b/src/nginx/README.rst @@ -0,0 +1,5 @@ +Microsoft Azure CLI 'nginx' Extension +========================================== + +This package is for the 'nginx' extension. +i.e. 'az nginx' \ No newline at end of file diff --git a/src/nginx/azext_nginx/__init__.py b/src/nginx/azext_nginx/__init__.py new file mode 100644 index 00000000000..d20c842ab71 --- /dev/null +++ b/src/nginx/azext_nginx/__init__.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 import AzCommandsLoader + +from azext_nginx._help import helps # pylint: disable=unused-import + + +class NginxCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + nginx_custom = CliCommandType( + operations_tmpl='azext_nginx.custom#{}') + super(NginxCommandsLoader, self).__init__(cli_ctx=cli_ctx, + custom_command_type=nginx_custom) + + def load_command_table(self, args): + from azext_nginx.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_nginx._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = NginxCommandsLoader diff --git a/src/nginx/azext_nginx/_help.py b/src/nginx/azext_nginx/_help.py new file mode 100644 index 00000000000..126d5d00714 --- /dev/null +++ b/src/nginx/azext_nginx/_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/nginx/azext_nginx/_params.py b/src/nginx/azext_nginx/_params.py new file mode 100644 index 00000000000..3c6c24c42c9 --- /dev/null +++ b/src/nginx/azext_nginx/_params.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. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + +from knack.arguments import CLIArgumentType + + +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/nginx/azext_nginx/aaz/__init__.py b/src/nginx/azext_nginx/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/nginx/azext_nginx/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/nginx/azext_nginx/aaz/latest/__init__.py b/src/nginx/azext_nginx/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/nginx/azext_nginx/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/nginx/azext_nginx/aaz/latest/nginx/__cmd_group.py b/src/nginx/azext_nginx/aaz/latest/nginx/__cmd_group.py new file mode 100644 index 00000000000..c08e78552dc --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "nginx", +) +class __CMDGroup(AAZCommandGroup): + """Manage NGINX deployment resources + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/__init__.py b/src/nginx/azext_nginx/aaz/latest/nginx/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/__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/nginx/azext_nginx/aaz/latest/nginx/deployment/__cmd_group.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/__cmd_group.py new file mode 100644 index 00000000000..e523983e446 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "nginx deployment", +) +class __CMDGroup(AAZCommandGroup): + """Manage NGINX deployment resources + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/__init__.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/__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/nginx/azext_nginx/aaz/latest/nginx/deployment/_create.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_create.py new file mode 100644 index 00000000000..ef8afd482ad --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_create.py @@ -0,0 +1,542 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment create", +) +class Create(AAZCommand): + """Create an NGINX for Azure resource + + :example: Deployment Create with PublicIP + az nginx deployment create --name myDeployment --resource-group myResourceGroup --location eastus2 --sku name="preview_Monthly_gmz7xq9ge3py" --network-profile front-end-ip-configuration="{public-ip-addresses:[{id:/subscriptions/mySubscription/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/myPublicIP}]}" network-interface-configuration="{subnet-id:/subscriptions/mySubscription/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet}" + + :example: Deployment Create with PrivateIP + az nginx deployment create --name myDeployment --resource-group myResourceGroup --location eastus2 --sku name="preview_Monthly_gmz7xq9ge3py" --network-profile front-end-ip-configuration="{private-ip-addresses:[{private-ip-allocation-method:Static,subnet-id:/subscriptions/mySubscription/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet,private-ip-address:10.0.0.2}]}" network-interface-configuration="{subnet-id:/subscriptions/mySubscription/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet}" + az nginx deployment create --name myDeployment --resource-group myResourceGroup --location eastus2 --sku name="preview_Monthly_gmz7xq9ge3py" --network-profile front-end-ip-configuration="{private-ip-addresses:[{private-ip-allocation-method:Dynamic,subnet-id:/subscriptions/mySubscription/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet,private-ip-address:10.0.0.2}]}" network-interface-configuration="{subnet-id:/subscriptions/mySubscription/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet}" + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}", "2022-08-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(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.deployment_name = AAZStrArg( + options=["-n", "--name", "--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="Body", + ) + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="Body", + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned, UserAssigned": "SystemAssigned, UserAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZDictArg( + options=["user-assigned-identities"], + ) + + user_assigned_identities = cls._args_schema.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg( + blank={}, + ) + + sku = cls._args_schema.sku + sku.name = AAZStrArg( + options=["name"], + help="Name of the SKU.", + required=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.enable_diagnostics = AAZBoolArg( + options=["--enable-diagnostics"], + help="Boolean to enable or disable diagnostics on your deployment", + arg_group="Properties", + ) + _args_schema.logging = AAZObjectArg( + options=["--logging"], + arg_group="Properties", + ) + _args_schema.managed_resource_group = AAZStrArg( + options=["--managed-resource-group"], + arg_group="Properties", + help="The managed resource group to deploy VNet injection related network resources.", + ) + _args_schema.network_profile = AAZObjectArg( + options=["--network-profile"], + arg_group="Properties", + ) + _args_schema.provisioning_state = AAZStrArg( + options=["--provisioning-state"], + help="State of the deployment", + arg_group="Properties", + enum={"Accepted": "Accepted", "Canceled": "Canceled", "Creating": "Creating", "Deleted": "Deleted", "Deleting": "Deleting", "Failed": "Failed", "NotSpecified": "NotSpecified", "Succeeded": "Succeeded", "Updating": "Updating"}, + ) + + logging = cls._args_schema.logging + logging.storage_account = AAZObjectArg( + options=["storage-account"], + ) + + storage_account = cls._args_schema.logging.storage_account + storage_account.account_name = AAZStrArg( + options=["account-name"], + ) + storage_account.container_name = AAZStrArg( + options=["container-name"], + ) + + network_profile = cls._args_schema.network_profile + network_profile.front_end_ip_configuration = AAZObjectArg( + options=["front-end-ip-configuration"], + ) + network_profile.network_interface_configuration = AAZObjectArg( + options=["network-interface-configuration"], + ) + + front_end_ip_configuration = cls._args_schema.network_profile.front_end_ip_configuration + front_end_ip_configuration.private_ip_addresses = AAZListArg( + options=["private-ip-addresses"], + ) + front_end_ip_configuration.public_ip_addresses = AAZListArg( + options=["public-ip-addresses"], + ) + + private_ip_addresses = cls._args_schema.network_profile.front_end_ip_configuration.private_ip_addresses + private_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.network_profile.front_end_ip_configuration.private_ip_addresses.Element + _element.private_ip_address = AAZStrArg( + options=["private-ip-address"], + ) + _element.private_ip_allocation_method = AAZStrArg( + options=["private-ip-allocation-method"], + enum={"Dynamic": "Dynamic", "Static": "Static"}, + ) + _element.subnet_id = AAZStrArg( + options=["subnet-id"], + ) + + public_ip_addresses = cls._args_schema.network_profile.front_end_ip_configuration.public_ip_addresses + public_ip_addresses.Element = AAZObjectArg() + + _element = cls._args_schema.network_profile.front_end_ip_configuration.public_ip_addresses.Element + _element.id = AAZStrArg( + options=["id"], + ) + + network_interface_configuration = cls._args_schema.network_profile.network_interface_configuration + network_interface_configuration.subnet_id = AAZStrArg( + options=["subnet-id"], + ) + return cls._args_schema + + def _execute_operations(self): + yield self.DeploymentsCreate(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class DeploymentsCreate(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_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 [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_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/Nginx.NginxPlus/nginxDeployments/{deploymentName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"client_flatten": True}} + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("sku", AAZObjectType, ".sku") + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type") + identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".identity.userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("enableDiagnosticsSupport", AAZBoolType, ".enable_diagnostics") + properties.set_prop("logging", AAZObjectType, ".logging") + properties.set_prop("managedResourceGroup", AAZStrType, ".managed_resource_group") + properties.set_prop("networkProfile", AAZObjectType, ".network_profile") + properties.set_prop("provisioningState", AAZStrType, ".provisioning_state") + + logging = _builder.get(".properties.logging") + if logging is not None: + logging.set_prop("storageAccount", AAZObjectType, ".storage_account") + + storage_account = _builder.get(".properties.logging.storageAccount") + if storage_account is not None: + storage_account.set_prop("accountName", AAZStrType, ".account_name") + storage_account.set_prop("containerName", AAZStrType, ".container_name") + + network_profile = _builder.get(".properties.networkProfile") + if network_profile is not None: + network_profile.set_prop("frontEndIPConfiguration", AAZObjectType, ".front_end_ip_configuration") + network_profile.set_prop("networkInterfaceConfiguration", AAZObjectType, ".network_interface_configuration") + + front_end_ip_configuration = _builder.get(".properties.networkProfile.frontEndIPConfiguration") + if front_end_ip_configuration is not None: + front_end_ip_configuration.set_prop("privateIPAddresses", AAZListType, ".private_ip_addresses") + front_end_ip_configuration.set_prop("publicIPAddresses", AAZListType, ".public_ip_addresses") + + private_ip_addresses = _builder.get(".properties.networkProfile.frontEndIPConfiguration.privateIPAddresses") + if private_ip_addresses is not None: + private_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.networkProfile.frontEndIPConfiguration.privateIPAddresses[]") + if _elements is not None: + _elements.set_prop("privateIPAddress", AAZStrType, ".private_ip_address") + _elements.set_prop("privateIPAllocationMethod", AAZStrType, ".private_ip_allocation_method") + _elements.set_prop("subnetId", AAZStrType, ".subnet_id") + + public_ip_addresses = _builder.get(".properties.networkProfile.frontEndIPConfiguration.publicIPAddresses") + if public_ip_addresses is not None: + public_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.networkProfile.frontEndIPConfiguration.publicIPAddresses[]") + if _elements is not None: + _elements.set_prop("id", AAZStrType, ".id") + + network_interface_configuration = _builder.get(".properties.networkProfile.networkInterfaceConfiguration") + if network_interface_configuration is not None: + network_interface_configuration.set_prop("subnetId", AAZStrType, ".subnet_id") + + sku = _builder.get(".sku") + if sku is not None: + sku.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.identity = AAZObjectType() + _schema_on_200_201.location = AAZStrType() + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.sku = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200_201.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200_201.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.enable_diagnostics_support = AAZBoolType( + serialized_name="enableDiagnosticsSupport", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + flags={"read_only": True}, + ) + properties.logging = AAZObjectType() + properties.managed_resource_group = AAZStrType( + serialized_name="managedResourceGroup", + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + ) + properties.nginx_version = AAZStrType( + serialized_name="nginxVersion", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + logging = cls._schema_on_200_201.properties.logging + logging.storage_account = AAZObjectType( + serialized_name="storageAccount", + ) + + storage_account = cls._schema_on_200_201.properties.logging.storage_account + storage_account.account_name = AAZStrType( + serialized_name="accountName", + ) + storage_account.container_name = AAZStrType( + serialized_name="containerName", + ) + + network_profile = cls._schema_on_200_201.properties.network_profile + network_profile.front_end_ip_configuration = AAZObjectType( + serialized_name="frontEndIPConfiguration", + ) + network_profile.network_interface_configuration = AAZObjectType( + serialized_name="networkInterfaceConfiguration", + ) + + front_end_ip_configuration = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration + front_end_ip_configuration.private_ip_addresses = AAZListType( + serialized_name="privateIPAddresses", + ) + front_end_ip_configuration.public_ip_addresses = AAZListType( + serialized_name="publicIPAddresses", + ) + + private_ip_addresses = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration.private_ip_addresses + private_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element + _element.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + _element.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + _element.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + public_ip_addresses = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration.public_ip_addresses + public_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element + _element.id = AAZStrType() + + network_interface_configuration = cls._schema_on_200_201.properties.network_profile.network_interface_configuration + network_interface_configuration.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + sku = cls._schema_on_200_201.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +__all__ = ["Create"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_delete.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_delete.py new file mode 100644 index 00000000000..13c32e84f5f --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_delete.py @@ -0,0 +1,149 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "nginx deployment delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete an Nginx deployment + + :example: Deployment Delete + az nginx deployment delete --name myDeployment --resource-group myResourceGroup + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}", "2022-08-01"], + ] + } + + 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.deployment_name = AAZStrArg( + options=["-n", "--name", "--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + yield self.DeploymentsDelete(ctx=self.ctx)() + + class DeploymentsDelete(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +__all__ = ["Delete"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_list.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_list.py new file mode 100644 index 00000000000..5a4676f0001 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_list.py @@ -0,0 +1,554 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment list", +) +class List(AAZCommand): + """List of Nginx deployments + + List all deployments under the specified subscription. + List all Nginx Deployments under the specified resource group + + :example: Deployment List + az nginx deployment list + az nginx deployment list --resource-group myResourceGroup + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/nginx.nginxplus/nginxdeployments", "2022-08-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments", "2022-08-01"], + ] + } + + 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): + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.DeploymentsListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.DeploymentsList(ctx=self.ctx)() + + 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 DeploymentsListByResourceGroup(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/Nginx.NginxPlus/nginxDeployments", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @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 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.identity = AAZObjectType() + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.sku = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.enable_diagnostics_support = AAZBoolType( + serialized_name="enableDiagnosticsSupport", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + flags={"read_only": True}, + ) + properties.logging = AAZObjectType() + properties.managed_resource_group = AAZStrType( + serialized_name="managedResourceGroup", + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + ) + properties.nginx_version = AAZStrType( + serialized_name="nginxVersion", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + logging = cls._schema_on_200.value.Element.properties.logging + logging.storage_account = AAZObjectType( + serialized_name="storageAccount", + ) + + storage_account = cls._schema_on_200.value.Element.properties.logging.storage_account + storage_account.account_name = AAZStrType( + serialized_name="accountName", + ) + storage_account.container_name = AAZStrType( + serialized_name="containerName", + ) + + network_profile = cls._schema_on_200.value.Element.properties.network_profile + network_profile.front_end_ip_configuration = AAZObjectType( + serialized_name="frontEndIPConfiguration", + ) + network_profile.network_interface_configuration = AAZObjectType( + serialized_name="networkInterfaceConfiguration", + ) + + front_end_ip_configuration = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration + front_end_ip_configuration.private_ip_addresses = AAZListType( + serialized_name="privateIPAddresses", + ) + front_end_ip_configuration.public_ip_addresses = AAZListType( + serialized_name="publicIPAddresses", + ) + + private_ip_addresses = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.private_ip_addresses + private_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element + _element.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + _element.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + _element.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + public_ip_addresses = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.public_ip_addresses + public_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element + _element.id = AAZStrType() + + network_interface_configuration = cls._schema_on_200.value.Element.properties.network_profile.network_interface_configuration + network_interface_configuration.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class DeploymentsList(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/Nginx.NginxPlus/nginxDeployments", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + 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.identity = AAZObjectType() + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.sku = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.enable_diagnostics_support = AAZBoolType( + serialized_name="enableDiagnosticsSupport", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + flags={"read_only": True}, + ) + properties.logging = AAZObjectType() + properties.managed_resource_group = AAZStrType( + serialized_name="managedResourceGroup", + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + ) + properties.nginx_version = AAZStrType( + serialized_name="nginxVersion", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + logging = cls._schema_on_200.value.Element.properties.logging + logging.storage_account = AAZObjectType( + serialized_name="storageAccount", + ) + + storage_account = cls._schema_on_200.value.Element.properties.logging.storage_account + storage_account.account_name = AAZStrType( + serialized_name="accountName", + ) + storage_account.container_name = AAZStrType( + serialized_name="containerName", + ) + + network_profile = cls._schema_on_200.value.Element.properties.network_profile + network_profile.front_end_ip_configuration = AAZObjectType( + serialized_name="frontEndIPConfiguration", + ) + network_profile.network_interface_configuration = AAZObjectType( + serialized_name="networkInterfaceConfiguration", + ) + + front_end_ip_configuration = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration + front_end_ip_configuration.private_ip_addresses = AAZListType( + serialized_name="privateIPAddresses", + ) + front_end_ip_configuration.public_ip_addresses = AAZListType( + serialized_name="publicIPAddresses", + ) + + private_ip_addresses = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.private_ip_addresses + private_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element + _element.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + _element.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + _element.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + public_ip_addresses = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.public_ip_addresses + public_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element + _element.id = AAZStrType() + + network_interface_configuration = cls._schema_on_200.value.Element.properties.network_profile.network_interface_configuration + network_interface_configuration.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["List"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_show.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_show.py new file mode 100644 index 00000000000..a778784314a --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_show.py @@ -0,0 +1,306 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment show", +) +class Show(AAZCommand): + """Get the properties of a specific Nginx Deployment + + :example: Deployment Get + az nginx deployment show --name myDeployment --resource-group myResourceGroup + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.deployment_name = AAZStrArg( + options=["-n", "--name", "--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.DeploymentsGet(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class DeploymentsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 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.identity = AAZObjectType() + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.sku = 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}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.enable_diagnostics_support = AAZBoolType( + serialized_name="enableDiagnosticsSupport", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + flags={"read_only": True}, + ) + properties.logging = AAZObjectType() + properties.managed_resource_group = AAZStrType( + serialized_name="managedResourceGroup", + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + ) + properties.nginx_version = AAZStrType( + serialized_name="nginxVersion", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + logging = cls._schema_on_200.properties.logging + logging.storage_account = AAZObjectType( + serialized_name="storageAccount", + ) + + storage_account = cls._schema_on_200.properties.logging.storage_account + storage_account.account_name = AAZStrType( + serialized_name="accountName", + ) + storage_account.container_name = AAZStrType( + serialized_name="containerName", + ) + + network_profile = cls._schema_on_200.properties.network_profile + network_profile.front_end_ip_configuration = AAZObjectType( + serialized_name="frontEndIPConfiguration", + ) + network_profile.network_interface_configuration = AAZObjectType( + serialized_name="networkInterfaceConfiguration", + ) + + front_end_ip_configuration = cls._schema_on_200.properties.network_profile.front_end_ip_configuration + front_end_ip_configuration.private_ip_addresses = AAZListType( + serialized_name="privateIPAddresses", + ) + front_end_ip_configuration.public_ip_addresses = AAZListType( + serialized_name="publicIPAddresses", + ) + + private_ip_addresses = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.private_ip_addresses + private_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element + _element.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + _element.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + _element.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + public_ip_addresses = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.public_ip_addresses + public_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element + _element.id = AAZStrType() + + network_interface_configuration = cls._schema_on_200.properties.network_profile.network_interface_configuration + network_interface_configuration.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["Show"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_update.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_update.py new file mode 100644 index 00000000000..70a6e235d65 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_update.py @@ -0,0 +1,697 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment update", +) +class Update(AAZCommand): + """Update an Nginx deployment + + :example: Update tags and enable diagnostics support for a deployment + az nginx deployment update --name myDeployment --resource-group myResourceGroup --location eastus2 --tags tag1="value1" tag2="value2" --enable-diagnostics + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}", "2022-08-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(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.deployment_name = AAZStrArg( + options=["-n", "--name", "--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="Body", + nullable=True, + ) + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + nullable=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="Body", + nullable=True, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + nullable=True, + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + nullable=True, + enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned, UserAssigned": "SystemAssigned, UserAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZObjectArg( + options=["user-assigned-identities"], + nullable=True, + ) + + sku = cls._args_schema.sku + sku.name = AAZStrArg( + options=["name"], + help="Name of the SKU.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.enable_diagnostics = AAZBoolArg( + options=["--enable-diagnostics"], + help="Boolean to enable or disable diagnostics on your deployment", + arg_group="Properties", + nullable=True, + ) + _args_schema.logging = AAZObjectArg( + options=["--logging"], + arg_group="Properties", + nullable=True, + ) + _args_schema.managed_resource_group = AAZStrArg( + options=["--managed-resource-group"], + arg_group="Properties", + help="The managed resource group to deploy VNet injection related network resources.", + nullable=True, + ) + _args_schema.network_profile = AAZObjectArg( + options=["--network-profile"], + arg_group="Properties", + nullable=True, + ) + _args_schema.provisioning_state = AAZStrArg( + options=["--provisioning-state"], + help="State of the deployment", + arg_group="Properties", + nullable=True, + enum={"Accepted": "Accepted", "Canceled": "Canceled", "Creating": "Creating", "Deleted": "Deleted", "Deleting": "Deleting", "Failed": "Failed", "NotSpecified": "NotSpecified", "Succeeded": "Succeeded", "Updating": "Updating"}, + ) + + logging = cls._args_schema.logging + logging.storage_account = AAZObjectArg( + options=["storage-account"], + nullable=True, + ) + + storage_account = cls._args_schema.logging.storage_account + storage_account.account_name = AAZStrArg( + options=["account-name"], + nullable=True, + ) + storage_account.container_name = AAZStrArg( + options=["container-name"], + nullable=True, + ) + + network_profile = cls._args_schema.network_profile + network_profile.front_end_ip_configuration = AAZObjectArg( + options=["front-end-ip-configuration"], + nullable=True, + ) + network_profile.network_interface_configuration = AAZObjectArg( + options=["network-interface-configuration"], + nullable=True, + ) + + front_end_ip_configuration = cls._args_schema.network_profile.front_end_ip_configuration + front_end_ip_configuration.private_ip_addresses = AAZListArg( + options=["private-ip-addresses"], + nullable=True, + ) + front_end_ip_configuration.public_ip_addresses = AAZListArg( + options=["public-ip-addresses"], + nullable=True, + ) + + private_ip_addresses = cls._args_schema.network_profile.front_end_ip_configuration.private_ip_addresses + private_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.network_profile.front_end_ip_configuration.private_ip_addresses.Element + _element.private_ip_address = AAZStrArg( + options=["private-ip-address"], + nullable=True, + ) + _element.private_ip_allocation_method = AAZStrArg( + options=["private-ip-allocation-method"], + nullable=True, + enum={"Dynamic": "Dynamic", "Static": "Static"}, + ) + _element.subnet_id = AAZStrArg( + options=["subnet-id"], + nullable=True, + ) + + public_ip_addresses = cls._args_schema.network_profile.front_end_ip_configuration.public_ip_addresses + public_ip_addresses.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.network_profile.front_end_ip_configuration.public_ip_addresses.Element + _element.id = AAZStrArg( + options=["id"], + nullable=True, + ) + + network_interface_configuration = cls._args_schema.network_profile.network_interface_configuration + network_interface_configuration.subnet_id = AAZStrArg( + options=["subnet-id"], + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.DeploymentsGet(ctx=self.ctx)() + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + yield self.DeploymentsCreate(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class DeploymentsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 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() + _build_schema_nginx_deployment_read(cls._schema_on_200) + + return cls._schema_on_200 + + class DeploymentsCreate(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_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 [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_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/Nginx.NginxPlus/nginxDeployments/{deploymentName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _build_schema_nginx_deployment_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("sku", AAZObjectType, ".sku") + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type") + identity.set_prop("userAssignedIdentities", AAZObjectType, ".user_assigned_identities") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("enableDiagnosticsSupport", AAZBoolType, ".enable_diagnostics") + properties.set_prop("logging", AAZObjectType, ".logging") + properties.set_prop("managedResourceGroup", AAZStrType, ".managed_resource_group") + properties.set_prop("networkProfile", AAZObjectType, ".network_profile") + properties.set_prop("provisioningState", AAZStrType, ".provisioning_state") + + logging = _builder.get(".properties.logging") + if logging is not None: + logging.set_prop("storageAccount", AAZObjectType, ".storage_account") + + storage_account = _builder.get(".properties.logging.storageAccount") + if storage_account is not None: + storage_account.set_prop("accountName", AAZStrType, ".account_name") + storage_account.set_prop("containerName", AAZStrType, ".container_name") + + network_profile = _builder.get(".properties.networkProfile") + if network_profile is not None: + network_profile.set_prop("frontEndIPConfiguration", AAZObjectType, ".front_end_ip_configuration") + network_profile.set_prop("networkInterfaceConfiguration", AAZObjectType, ".network_interface_configuration") + + front_end_ip_configuration = _builder.get(".properties.networkProfile.frontEndIPConfiguration") + if front_end_ip_configuration is not None: + front_end_ip_configuration.set_prop("privateIPAddresses", AAZListType, ".private_ip_addresses") + front_end_ip_configuration.set_prop("publicIPAddresses", AAZListType, ".public_ip_addresses") + + private_ip_addresses = _builder.get(".properties.networkProfile.frontEndIPConfiguration.privateIPAddresses") + if private_ip_addresses is not None: + private_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.networkProfile.frontEndIPConfiguration.privateIPAddresses[]") + if _elements is not None: + _elements.set_prop("privateIPAddress", AAZStrType, ".private_ip_address") + _elements.set_prop("privateIPAllocationMethod", AAZStrType, ".private_ip_allocation_method") + _elements.set_prop("subnetId", AAZStrType, ".subnet_id") + + public_ip_addresses = _builder.get(".properties.networkProfile.frontEndIPConfiguration.publicIPAddresses") + if public_ip_addresses is not None: + public_ip_addresses.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.networkProfile.frontEndIPConfiguration.publicIPAddresses[]") + if _elements is not None: + _elements.set_prop("id", AAZStrType, ".id") + + network_interface_configuration = _builder.get(".properties.networkProfile.networkInterfaceConfiguration") + if network_interface_configuration is not None: + network_interface_configuration.set_prop("subnetId", AAZStrType, ".subnet_id") + + sku = _builder.get(".sku") + if sku is not None: + sku.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +_schema_nginx_deployment_read = None + + +def _build_schema_nginx_deployment_read(_schema): + global _schema_nginx_deployment_read + if _schema_nginx_deployment_read is not None: + _schema.id = _schema_nginx_deployment_read.id + _schema.identity = _schema_nginx_deployment_read.identity + _schema.location = _schema_nginx_deployment_read.location + _schema.name = _schema_nginx_deployment_read.name + _schema.properties = _schema_nginx_deployment_read.properties + _schema.sku = _schema_nginx_deployment_read.sku + _schema.system_data = _schema_nginx_deployment_read.system_data + _schema.tags = _schema_nginx_deployment_read.tags + _schema.type = _schema_nginx_deployment_read.type + return + + _schema_nginx_deployment_read = AAZObjectType() + + nginx_deployment_read = _schema_nginx_deployment_read + nginx_deployment_read.id = AAZStrType( + flags={"read_only": True}, + ) + nginx_deployment_read.identity = AAZObjectType() + nginx_deployment_read.location = AAZStrType() + nginx_deployment_read.name = AAZStrType( + flags={"read_only": True}, + ) + nginx_deployment_read.properties = AAZObjectType() + nginx_deployment_read.sku = AAZObjectType() + nginx_deployment_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + nginx_deployment_read.tags = AAZDictType() + nginx_deployment_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_nginx_deployment_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = _schema_nginx_deployment_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = _schema_nginx_deployment_read.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = _schema_nginx_deployment_read.properties + properties.enable_diagnostics_support = AAZBoolType( + serialized_name="enableDiagnosticsSupport", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + flags={"read_only": True}, + ) + properties.logging = AAZObjectType() + properties.managed_resource_group = AAZStrType( + serialized_name="managedResourceGroup", + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + ) + properties.nginx_version = AAZStrType( + serialized_name="nginxVersion", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + logging = _schema_nginx_deployment_read.properties.logging + logging.storage_account = AAZObjectType( + serialized_name="storageAccount", + ) + + storage_account = _schema_nginx_deployment_read.properties.logging.storage_account + storage_account.account_name = AAZStrType( + serialized_name="accountName", + ) + storage_account.container_name = AAZStrType( + serialized_name="containerName", + ) + + network_profile = _schema_nginx_deployment_read.properties.network_profile + network_profile.front_end_ip_configuration = AAZObjectType( + serialized_name="frontEndIPConfiguration", + ) + network_profile.network_interface_configuration = AAZObjectType( + serialized_name="networkInterfaceConfiguration", + ) + + front_end_ip_configuration = _schema_nginx_deployment_read.properties.network_profile.front_end_ip_configuration + front_end_ip_configuration.private_ip_addresses = AAZListType( + serialized_name="privateIPAddresses", + ) + front_end_ip_configuration.public_ip_addresses = AAZListType( + serialized_name="publicIPAddresses", + ) + + private_ip_addresses = _schema_nginx_deployment_read.properties.network_profile.front_end_ip_configuration.private_ip_addresses + private_ip_addresses.Element = AAZObjectType() + + _element = _schema_nginx_deployment_read.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element + _element.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + _element.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + _element.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + public_ip_addresses = _schema_nginx_deployment_read.properties.network_profile.front_end_ip_configuration.public_ip_addresses + public_ip_addresses.Element = AAZObjectType() + + _element = _schema_nginx_deployment_read.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element + _element.id = AAZStrType() + + network_interface_configuration = _schema_nginx_deployment_read.properties.network_profile.network_interface_configuration + network_interface_configuration.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + sku = _schema_nginx_deployment_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + system_data = _schema_nginx_deployment_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = _schema_nginx_deployment_read.tags + tags.Element = AAZStrType() + + _schema.id = _schema_nginx_deployment_read.id + _schema.identity = _schema_nginx_deployment_read.identity + _schema.location = _schema_nginx_deployment_read.location + _schema.name = _schema_nginx_deployment_read.name + _schema.properties = _schema_nginx_deployment_read.properties + _schema.sku = _schema_nginx_deployment_read.sku + _schema.system_data = _schema_nginx_deployment_read.system_data + _schema.tags = _schema_nginx_deployment_read.tags + _schema.type = _schema_nginx_deployment_read.type + + +__all__ = ["Update"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_wait.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_wait.py new file mode 100644 index 00000000000..a59f5feaaf3 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/_wait.py @@ -0,0 +1,302 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.deployment_name = AAZStrArg( + options=["-n", "--name", "--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.DeploymentsGet(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class DeploymentsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 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.identity = AAZObjectType() + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.sku = 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}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.enable_diagnostics_support = AAZBoolType( + serialized_name="enableDiagnosticsSupport", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + flags={"read_only": True}, + ) + properties.logging = AAZObjectType() + properties.managed_resource_group = AAZStrType( + serialized_name="managedResourceGroup", + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + ) + properties.nginx_version = AAZStrType( + serialized_name="nginxVersion", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + logging = cls._schema_on_200.properties.logging + logging.storage_account = AAZObjectType( + serialized_name="storageAccount", + ) + + storage_account = cls._schema_on_200.properties.logging.storage_account + storage_account.account_name = AAZStrType( + serialized_name="accountName", + ) + storage_account.container_name = AAZStrType( + serialized_name="containerName", + ) + + network_profile = cls._schema_on_200.properties.network_profile + network_profile.front_end_ip_configuration = AAZObjectType( + serialized_name="frontEndIPConfiguration", + ) + network_profile.network_interface_configuration = AAZObjectType( + serialized_name="networkInterfaceConfiguration", + ) + + front_end_ip_configuration = cls._schema_on_200.properties.network_profile.front_end_ip_configuration + front_end_ip_configuration.private_ip_addresses = AAZListType( + serialized_name="privateIPAddresses", + ) + front_end_ip_configuration.public_ip_addresses = AAZListType( + serialized_name="publicIPAddresses", + ) + + private_ip_addresses = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.private_ip_addresses + private_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.private_ip_addresses.Element + _element.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + _element.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + _element.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + public_ip_addresses = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.public_ip_addresses + public_ip_addresses.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.network_profile.front_end_ip_configuration.public_ip_addresses.Element + _element.id = AAZStrType() + + network_interface_configuration = cls._schema_on_200.properties.network_profile.network_interface_configuration + network_interface_configuration.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["Wait"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/__cmd_group.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/__cmd_group.py new file mode 100644 index 00000000000..643dbf9709a --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "nginx deployment certificate", +) +class __CMDGroup(AAZCommandGroup): + """Manage NGINX certificate resources + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/__init__.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/__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/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_create.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_create.py new file mode 100644 index 00000000000..1f4441819b1 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_create.py @@ -0,0 +1,305 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment certificate create", +) +class Create(AAZCommand): + """Create a certificate for an NGINX deployment + + :example: Certificate Create + az nginx deployment certificate create --certificate-name myCertificate --deployment-name myDeployment --resource-group myResourceGroup --certificate-path /etc/nginx/test.cert --key-path /etc/nginx/test.key --key-vault-secret-id keyVaultSecretId + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/certificates/{}", "2022-08-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(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.certificate_name = AAZStrArg( + options=["-n", "--name", "--certificate-name"], + help="The name of certificate", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.certificate_path = AAZStrArg( + options=["--certificate-path"], + help="This path must match one or more ssl_certificate directive file argument in your Nginx configuration. This path must be unique between certificates within the same deployment", + arg_group="Properties", + ) + _args_schema.key_vault_secret_id = AAZStrArg( + options=["--key-vault-secret-id"], + help="The secret id to the certificate in KeyVault", + arg_group="Properties", + ) + _args_schema.key_path = AAZStrArg( + options=["--key-path"], + help="This path must match one or more ssl_certificate_key directive file argument in your Nginx configuration. This path must be unique between certificates within the same deployment", + arg_group="Properties", + ) + _args_schema.provisioning_state = AAZStrArg( + options=["--provisioning-state"], + arg_group="Properties", + help="State of the certificate deployment", + enum={"Accepted": "Accepted", "Canceled": "Canceled", "Creating": "Creating", "Deleted": "Deleted", "Deleting": "Deleting", "Failed": "Failed", "NotSpecified": "NotSpecified", "Succeeded": "Succeeded", "Updating": "Updating"}, + ) + return cls._args_schema + + def _execute_operations(self): + yield self.CertificatesCreate(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CertificatesCreate(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_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 [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "certificateName", self.ctx.args.certificate_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("certificateVirtualPath", AAZStrType, ".certificate_path") + properties.set_prop("keyVaultSecretId", AAZStrType, ".key_vault_secret_id") + properties.set_prop("keyVirtualPath", AAZStrType, ".key_path") + properties.set_prop("provisioningState", AAZStrType, ".provisioning_state") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType() + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.certificate_virtual_path = AAZStrType( + serialized_name="certificateVirtualPath", + ) + properties.key_vault_secret_id = AAZStrType( + serialized_name="keyVaultSecretId", + ) + properties.key_virtual_path = AAZStrType( + serialized_name="keyVirtualPath", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +__all__ = ["Create"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_delete.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_delete.py new file mode 100644 index 00000000000..837f1aa7c87 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_delete.py @@ -0,0 +1,159 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment certificate delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete an Nginx deployment certificate + + :example: Certificate_Delete + az nginx deployment certificate delete --certificate-name myCertificate --deployment-name myDeployment --resource-group myResourceGroup + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/certificates/{}", "2022-08-01"], + ] + } + + 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.certificate_name = AAZStrArg( + options=["-n", "--name", "--certificate-name"], + help="The name of certificate", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + yield self.CertificatesDelete(ctx=self.ctx)() + + class CertificatesDelete(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "certificateName", self.ctx.args.certificate_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +__all__ = ["Delete"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_list.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_list.py new file mode 100644 index 00000000000..044ea774cca --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_list.py @@ -0,0 +1,227 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment certificate list", +) +class List(AAZCommand): + """List all certificates under the specified deployment and resource group + + :example: Certificate ListByDeployment + az nginx deployment certificate list --deployment-name myDeployment --resource-group myResourceGroup + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/certificates", "2022-08-01"], + ] + } + + 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.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.CertificatesList(ctx=self.ctx)() + + 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 CertificatesList(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + 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() + _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.certificate_virtual_path = AAZStrType( + serialized_name="certificateVirtualPath", + ) + properties.key_vault_secret_id = AAZStrType( + serialized_name="keyVaultSecretId", + ) + properties.key_virtual_path = AAZStrType( + serialized_name="keyVirtualPath", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["List"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_show.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_show.py new file mode 100644 index 00000000000..d97e3a1a1da --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_show.py @@ -0,0 +1,219 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment certificate show", +) +class Show(AAZCommand): + """Get the properties of a specific Nginx certificate. + + :example: Certificate Get + az nginx deployment certificate show --certificate-name myCertificate --deployment-name myDeployment --resource-group myResourceGroup + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/certificates/{}", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.certificate_name = AAZStrArg( + options=["-n", "--name", "--certificate-name"], + help="The name of certificate", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.CertificatesGet(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CertificatesGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "certificateName", self.ctx.args.certificate_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 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() + _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.certificate_virtual_path = AAZStrType( + serialized_name="certificateVirtualPath", + ) + properties.key_vault_secret_id = AAZStrType( + serialized_name="keyVaultSecretId", + ) + properties.key_virtual_path = AAZStrType( + serialized_name="keyVirtualPath", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["Show"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_update.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_update.py new file mode 100644 index 00000000000..f482169b978 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_update.py @@ -0,0 +1,453 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment certificate update", +) +class Update(AAZCommand): + """Update an Nginx deployment certificate + + :example: Update the certificate virtual path, key virtual path and certificate + az nginx deployment certificate update --certificate-name myCertificate --deployment-name myDeployment --resource-group myResourceGroup --certificate-path /etc/nginx/testupdated.cert --key-path /etc/nginx/testupdated.key --key-vault-secret-id newKeyVaultSecretId + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/certificates/{}", "2022-08-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(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.certificate_name = AAZStrArg( + options=["-n", "--name", "--certificate-name"], + help="The name of certificate", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + nullable=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.certificate_path = AAZStrArg( + options=["--certificate-path"], + help="This path must match one or more ssl_certificate directive file argument in your Nginx configuration. This path must be unique between certificates within the same deployment", + arg_group="Properties", + nullable=True, + ) + _args_schema.key_vault_secret_id = AAZStrArg( + options=["--key-vault-secret-id"], + help="The secret id to the certificate in KeyVault", + arg_group="Properties", + nullable=True, + ) + _args_schema.key_path = AAZStrArg( + options=["--key-path"], + help="This path must match one or more ssl_certificate_key directive file argument in your Nginx configuration. This path must be unique between certificates within the same deployment", + arg_group="Properties", + nullable=True, + ) + _args_schema.provisioning_state = AAZStrArg( + options=["--provisioning-state"], + help="State of the certificate deployment", + arg_group="Properties", + nullable=True, + enum={"Accepted": "Accepted", "Canceled": "Canceled", "Creating": "Creating", "Deleted": "Deleted", "Deleting": "Deleting", "Failed": "Failed", "NotSpecified": "NotSpecified", "Succeeded": "Succeeded", "Updating": "Updating"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.CertificatesGet(ctx=self.ctx)() + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + yield self.CertificatesCreate(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CertificatesGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "certificateName", self.ctx.args.certificate_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 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() + _build_schema_nginx_certificate_read(cls._schema_on_200) + + return cls._schema_on_200 + + class CertificatesCreate(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_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 [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "certificateName", self.ctx.args.certificate_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _build_schema_nginx_certificate_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("certificateVirtualPath", AAZStrType, ".certificate_path") + properties.set_prop("keyVaultSecretId", AAZStrType, ".key_vault_secret_id") + properties.set_prop("keyVirtualPath", AAZStrType, ".key_path") + properties.set_prop("provisioningState", AAZStrType, ".provisioning_state") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +_schema_nginx_certificate_read = None + + +def _build_schema_nginx_certificate_read(_schema): + global _schema_nginx_certificate_read + if _schema_nginx_certificate_read is not None: + _schema.id = _schema_nginx_certificate_read.id + _schema.location = _schema_nginx_certificate_read.location + _schema.name = _schema_nginx_certificate_read.name + _schema.properties = _schema_nginx_certificate_read.properties + _schema.system_data = _schema_nginx_certificate_read.system_data + _schema.tags = _schema_nginx_certificate_read.tags + _schema.type = _schema_nginx_certificate_read.type + return + + _schema_nginx_certificate_read = AAZObjectType() + + nginx_certificate_read = _schema_nginx_certificate_read + nginx_certificate_read.id = AAZStrType( + flags={"read_only": True}, + ) + nginx_certificate_read.location = AAZStrType() + nginx_certificate_read.name = AAZStrType( + flags={"read_only": True}, + ) + nginx_certificate_read.properties = AAZObjectType() + nginx_certificate_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + nginx_certificate_read.tags = AAZDictType() + nginx_certificate_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_nginx_certificate_read.properties + properties.certificate_virtual_path = AAZStrType( + serialized_name="certificateVirtualPath", + ) + properties.key_vault_secret_id = AAZStrType( + serialized_name="keyVaultSecretId", + ) + properties.key_virtual_path = AAZStrType( + serialized_name="keyVirtualPath", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = _schema_nginx_certificate_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = _schema_nginx_certificate_read.tags + tags.Element = AAZStrType() + + _schema.id = _schema_nginx_certificate_read.id + _schema.location = _schema_nginx_certificate_read.location + _schema.name = _schema_nginx_certificate_read.name + _schema.properties = _schema_nginx_certificate_read.properties + _schema.system_data = _schema_nginx_certificate_read.system_data + _schema.tags = _schema_nginx_certificate_read.tags + _schema.type = _schema_nginx_certificate_read.type + + +__all__ = ["Update"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_wait.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_wait.py new file mode 100644 index 00000000000..9f67aa3b041 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/certificate/_wait.py @@ -0,0 +1,215 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment certificate wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/certificates/{}", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.certificate_name = AAZStrArg( + options=["-n", "--name", "--certificate-name"], + help="The name of certificate", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.CertificatesGet(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class CertificatesGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "certificateName", self.ctx.args.certificate_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 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() + _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.certificate_virtual_path = AAZStrType( + serialized_name="certificateVirtualPath", + ) + properties.key_vault_secret_id = AAZStrType( + serialized_name="keyVaultSecretId", + ) + properties.key_virtual_path = AAZStrType( + serialized_name="keyVirtualPath", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +__all__ = ["Wait"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/__cmd_group.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/__cmd_group.py new file mode 100644 index 00000000000..ee950656336 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "nginx deployment configuration", +) +class __CMDGroup(AAZCommandGroup): + """Manage NGINX configuration resources + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/__init__.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/__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/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_create.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_create.py new file mode 100644 index 00000000000..6228f552753 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_create.py @@ -0,0 +1,397 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment configuration create", +) +class Create(AAZCommand): + """Create a configuration for an NGINX deployment + + :example: Single file Configuration Create + az nginx deployment configuration create --name default --deployment-name myDeployment --resource-group myResourceGroup --root-file /etc/nginx/nginx.conf --files "[{content:'aHR0cCB7CiAgICB1cHN0cmVhbSBhcHAgewogICAgICAgIHpvbmUgYXBwIDY0azsKICAgICAgICBsZWFzdF9jb25uOwogICAgICAgIHNlcnZlciAxMC4wLjEuNDo4MDAwOwogICAgfQoKICAgIHNlcnZlciB7CiAgICAgICAgbGlzdGVuIDgwOwogICAgICAgIHNlcnZlcl9uYW1lICouZXhhbXBsZS5jb207CgogICAgICAgIGxvY2F0aW9uIC8gewogICAgICAgICAgICBwcm94eV9zZXRfaGVhZGVyIEhvc3QgJGhvc3Q7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgWC1SZWFsLUlQICRyZW1vdGVfYWRkcjsKICAgICAgICAgICAgcHJveHlfc2V0X2hlYWRlciBYLVByb3h5LUFwcCBhcHA7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgR2l0aHViLVJ1bi1JZCAwMDAwMDA7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcmluZyBvbjsKICAgICAgICAgICAgcHJveHlfYnVmZmVyX3NpemUgNGs7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcnMgOCA4azsKICAgICAgICAgICAgcHJveHlfcmVhZF90aW1lb3V0IDYwczsKICAgICAgICAgICAgcHJveHlfcGFzcyBodHRwOi8vYXBwOwogICAgICAgICAgICBoZWFsdGhfY2hlY2s7CiAgICAgICAgfQogICAgICAgIAogICAgfQp9',virtual-path:'/etc/nginx/nginx.conf'}]" + + :example: Multi-file Configuration Create + az nginx deployment configuration create --name default --deployment-name myDeployment --resource-group myResourceGroup --root-file /etc/nginx/nginx.conf --files "[{'content':'aHR0cCB7CiAgICB1cHN0cmVhbSBhcHAgewogICAgICAgIHpvbmUgYXBwIDY0azsKICAgICAgICBsZWFzdF9jb25uOwogICAgICAgIHNlcnZlciAxMC4wLjEuNDo4MDAwOwogICAgfQoKICAgIHNlcnZlciB7CiAgICAgICAgbGlzdGVuIDgwOwogICAgICAgIHNlcnZlcl9uYW1lICouZXhhbXBsZS5jb207CgogICAgICAgIGxvY2F0aW9uIC8gewogICAgICAgICAgICBpbmNsdWRlIC9ldGMvbmdpbngvY29uZi5kL3Byb3h5LmNvbmY7CiAgICAgICAgICAgIHByb3h5X3Bhc3MgaHR0cDovL2FwcDsKICAgICAgICAgICAgaGVhbHRoX2NoZWNrOwogICAgICAgIH0KICAgICAgICAKICAgIH0KfQ==','virtual-path':'/etc/nginx/nginx.conf'},{'content':'cHJveHlfc2V0X2hlYWRlciBIb3N0ICRob3N0Owpwcm94eV9zZXRfaGVhZGVyIFgtUmVhbC1JUCAkcmVtb3RlX2FkZHI7CnByb3h5X3NldF9oZWFkZXIgWC1Qcm94eS1BcHAgYXBwOwpwcm94eV9zZXRfaGVhZGVyIEdpdGh1Yi1SdW4tSWQgMDAwMDAwOwpwcm94eV9idWZmZXJpbmcgb247CnByb3h5X2J1ZmZlcl9zaXplIDRrOwpwcm94eV9idWZmZXJzIDggOGs7CnByb3h5X3JlYWRfdGltZW91dCA2MHM7','virtual-path':'/etc/nginx/conf.d/proxy.conf'}]" + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/configurations/{}", "2022-08-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(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.configuration_name = AAZStrArg( + options=["-n", "--name", "--configuration-name"], + help="The name of configuration, only 'default' is supported value due to the singleton of Nginx conf", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.files = AAZListArg( + options=["--files"], + arg_group="Properties", + ) + _args_schema.package = AAZObjectArg( + options=["--package"], + arg_group="Properties", + ) + _args_schema.protected_files = AAZListArg( + options=["--protected-files"], + arg_group="Properties", + ) + _args_schema.provisioning_state = AAZStrArg( + options=["--provisioning-state"], + help="State of the configuration deployment", + arg_group="Properties", + enum={"Accepted": "Accepted", "Canceled": "Canceled", "Creating": "Creating", "Deleted": "Deleted", "Deleting": "Deleting", "Failed": "Failed", "NotSpecified": "NotSpecified", "Succeeded": "Succeeded", "Updating": "Updating"}, + ) + _args_schema.root_file = AAZStrArg( + options=["--root-file"], + help="Aligns with your Nginx configuration structure", + arg_group="Properties", + ) + + files = cls._args_schema.files + files.Element = AAZObjectArg() + cls._build_args_nginx_configuration_file_create(files.Element) + + package = cls._args_schema.package + package.data = AAZStrArg( + options=["data"], + ) + + protected_files = cls._args_schema.protected_files + protected_files.Element = AAZObjectArg() + cls._build_args_nginx_configuration_file_create(protected_files.Element) + return cls._args_schema + + _args_nginx_configuration_file_create = None + + @classmethod + def _build_args_nginx_configuration_file_create(cls, _schema): + if cls._args_nginx_configuration_file_create is not None: + _schema.content = cls._args_nginx_configuration_file_create.content + _schema.virtual_path = cls._args_nginx_configuration_file_create.virtual_path + return + + cls._args_nginx_configuration_file_create = AAZObjectArg() + + nginx_configuration_file_create = cls._args_nginx_configuration_file_create + nginx_configuration_file_create.content = AAZStrArg( + options=["content"], + ) + nginx_configuration_file_create.virtual_path = AAZStrArg( + options=["virtual-path"], + ) + + _schema.content = cls._args_nginx_configuration_file_create.content + _schema.virtual_path = cls._args_nginx_configuration_file_create.virtual_path + + def _execute_operations(self): + yield self.ConfigurationsCreateOrUpdate(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ConfigurationsCreateOrUpdate(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_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 [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "configurationName", self.ctx.args.configuration_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("files", AAZListType, ".files") + properties.set_prop("package", AAZObjectType, ".package") + properties.set_prop("protectedFiles", AAZListType, ".protected_files") + properties.set_prop("provisioningState", AAZStrType, ".provisioning_state") + properties.set_prop("rootFile", AAZStrType, ".root_file") + + files = _builder.get(".properties.files") + if files is not None: + _build_schema_nginx_configuration_file_create(files.set_elements(AAZObjectType, ".")) + + package = _builder.get(".properties.package") + if package is not None: + package.set_prop("data", AAZStrType, ".data") + + protected_files = _builder.get(".properties.protectedFiles") + if protected_files is not None: + _build_schema_nginx_configuration_file_create(protected_files.set_elements(AAZObjectType, ".")) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType() + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.files = AAZListType() + properties.package = AAZObjectType() + properties.protected_files = AAZListType( + serialized_name="protectedFiles", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.root_file = AAZStrType( + serialized_name="rootFile", + ) + + files = cls._schema_on_200_201.properties.files + files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(files.Element) + + package = cls._schema_on_200_201.properties.package + package.data = AAZStrType() + + protected_files = cls._schema_on_200_201.properties.protected_files + protected_files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(protected_files.Element) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +def _build_schema_nginx_configuration_file_create(_builder): + if _builder is None: + return + _builder.set_prop("content", AAZStrType, ".content") + _builder.set_prop("virtualPath", AAZStrType, ".virtual_path") + + +_schema_nginx_configuration_file_read = None + + +def _build_schema_nginx_configuration_file_read(_schema): + global _schema_nginx_configuration_file_read + if _schema_nginx_configuration_file_read is not None: + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + return + + _schema_nginx_configuration_file_read = AAZObjectType() + + nginx_configuration_file_read = _schema_nginx_configuration_file_read + nginx_configuration_file_read.content = AAZStrType() + nginx_configuration_file_read.virtual_path = AAZStrType( + serialized_name="virtualPath", + ) + + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + + +__all__ = ["Create"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_delete.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_delete.py new file mode 100644 index 00000000000..eda30ed4b52 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_delete.py @@ -0,0 +1,159 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment configuration delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete an Nginx configuration + + :example: Configuration Delete + az nginx deployment configuration delete --name default --deployment-name myDeployment --resource-group myResourceGroup + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/configurations/{}", "2022-08-01"], + ] + } + + 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.configuration_name = AAZStrArg( + options=["-n", "--name", "--configuration-name"], + help="The name of configuration, only 'default' is supported value due to the singleton of Nginx conf", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + yield self.ConfigurationsDelete(ctx=self.ctx)() + + class ConfigurationsDelete(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "configurationName", self.ctx.args.configuration_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +__all__ = ["Delete"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_list.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_list.py new file mode 100644 index 00000000000..df4e1e5be64 --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_list.py @@ -0,0 +1,259 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment configuration list", +) +class List(AAZCommand): + """List all configurations under the specified deployment and resource group + + :example: Configuration ListByDeployment + az nginx deployment configuration list --deployment-name myDeployment --resource-group myResourceGroup + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/configurations", "2022-08-01"], + ] + } + + 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.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.ConfigurationsList(ctx=self.ctx)() + + 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 ConfigurationsList(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + 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() + _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.files = AAZListType() + properties.package = AAZObjectType() + properties.protected_files = AAZListType( + serialized_name="protectedFiles", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.root_file = AAZStrType( + serialized_name="rootFile", + ) + + files = cls._schema_on_200.value.Element.properties.files + files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(files.Element) + + package = cls._schema_on_200.value.Element.properties.package + package.data = AAZStrType() + + protected_files = cls._schema_on_200.value.Element.properties.protected_files + protected_files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(protected_files.Element) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +_schema_nginx_configuration_file_read = None + + +def _build_schema_nginx_configuration_file_read(_schema): + global _schema_nginx_configuration_file_read + if _schema_nginx_configuration_file_read is not None: + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + return + + _schema_nginx_configuration_file_read = AAZObjectType() + + nginx_configuration_file_read = _schema_nginx_configuration_file_read + nginx_configuration_file_read.content = AAZStrType() + nginx_configuration_file_read.virtual_path = AAZStrType( + serialized_name="virtualPath", + ) + + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + + +__all__ = ["List"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_show.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_show.py new file mode 100644 index 00000000000..0e0fd2ab8aa --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_show.py @@ -0,0 +1,251 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment configuration show", +) +class Show(AAZCommand): + """Get the properties of a specific Nginx configuration + + :example: Configuration Get + az nginx deployment configuration show --name default --deployment-name myDeployment --resource-group myResourceGroup + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/configurations/{}", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.configuration_name = AAZStrArg( + options=["-n", "--name", "--configuration-name"], + help="The name of configuration, only 'default' is supported value due to the singleton of Nginx conf", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.ConfigurationsGet(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ConfigurationsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "configurationName", self.ctx.args.configuration_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 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() + _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.files = AAZListType() + properties.package = AAZObjectType() + properties.protected_files = AAZListType( + serialized_name="protectedFiles", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.root_file = AAZStrType( + serialized_name="rootFile", + ) + + files = cls._schema_on_200.properties.files + files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(files.Element) + + package = cls._schema_on_200.properties.package + package.data = AAZStrType() + + protected_files = cls._schema_on_200.properties.protected_files + protected_files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(protected_files.Element) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +_schema_nginx_configuration_file_read = None + + +def _build_schema_nginx_configuration_file_read(_schema): + global _schema_nginx_configuration_file_read + if _schema_nginx_configuration_file_read is not None: + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + return + + _schema_nginx_configuration_file_read = AAZObjectType() + + nginx_configuration_file_read = _schema_nginx_configuration_file_read + nginx_configuration_file_read.content = AAZStrType() + nginx_configuration_file_read.virtual_path = AAZStrType( + serialized_name="virtualPath", + ) + + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + + +__all__ = ["Show"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_update.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_update.py new file mode 100644 index 00000000000..633fdedff0f --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_update.py @@ -0,0 +1,552 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment configuration update", +) +class Update(AAZCommand): + """Update an Nginx configuration + + :example: Update content of the first file in a configuration + az nginx deployment configuration update --name default --deployment-name myDeployment --resource-group myResourceGroup --files [0].content="aHR0cCB7CiAgICB1cHN0cmVhbSBhcHAgewogICAgICAgIHpvbmUgYXBwIDY0azsKICAgICAgICBsZWFzdF9jb25uOwogICAgICAgIHNlcnZlciAxMC4wLjEuNDo4MDAwOwogICAgfQoKICAgIHNlcnZlciB7CiAgICAgICAgbGlzdGVuIDgwOwogICAgICAgIHNlcnZlcl9uYW1lICouZXhhbXBsZS5jb207CgogICAgICAgIGxvY2F0aW9uIC8gewogICAgICAgICAgICBwcm94eV9zZXRfaGVhZGVyIEhvc3QgJGhvc3Q7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgWC1SZWFsLUlQICRyZW1vdGVfYWRkcjsKICAgICAgICAgICAgcHJveHlfc2V0X2hlYWRlciBYLVByb3h5LUFwcCBhcHA7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgR2l0aHViLVJ1bi1JZCAwMDAwMDA7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcmluZyBvbjsKICAgICAgICAgICAgcHJveHlfYnVmZmVyX3NpemUgNGs7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcnMgOCA4azsKICAgICAgICAgICAgcHJveHlfcmVhZF90aW1lb3V0IDYwczsKICAgICAgICAgICAgcHJveHlfcGFzcyBodHRwOi8vYXBwOwogICAgICAgICAgICBoZWFsdGhfY2hlY2s7CiAgICAgICAgfQogICAgICAgIAogICAgfQp9" + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/configurations/{}", "2022-08-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(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.configuration_name = AAZStrArg( + options=["-n", "--name", "--configuration-name"], + help="The name of configuration, only 'default' is supported value due to the singleton of Nginx conf", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + nullable=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.files = AAZListArg( + options=["--files"], + arg_group="Properties", + nullable=True, + ) + _args_schema.package = AAZObjectArg( + options=["--package"], + arg_group="Properties", + nullable=True, + ) + _args_schema.protected_files = AAZListArg( + options=["--protected-files"], + arg_group="Properties", + nullable=True, + ) + _args_schema.provisioning_state = AAZStrArg( + options=["--provisioning-state"], + help="State of the configuration deployment", + arg_group="Properties", + nullable=True, + enum={"Accepted": "Accepted", "Canceled": "Canceled", "Creating": "Creating", "Deleted": "Deleted", "Deleting": "Deleting", "Failed": "Failed", "NotSpecified": "NotSpecified", "Succeeded": "Succeeded", "Updating": "Updating"}, + ) + _args_schema.root_file = AAZStrArg( + options=["--root-file"], + help="Aligns with your Nginx configuration structure", + arg_group="Properties", + nullable=True, + ) + + files = cls._args_schema.files + files.Element = AAZObjectArg( + nullable=True, + ) + cls._build_args_nginx_configuration_file_update(files.Element) + + package = cls._args_schema.package + package.data = AAZStrArg( + options=["data"], + nullable=True, + ) + + protected_files = cls._args_schema.protected_files + protected_files.Element = AAZObjectArg( + nullable=True, + ) + cls._build_args_nginx_configuration_file_update(protected_files.Element) + return cls._args_schema + + _args_nginx_configuration_file_update = None + + @classmethod + def _build_args_nginx_configuration_file_update(cls, _schema): + if cls._args_nginx_configuration_file_update is not None: + _schema.content = cls._args_nginx_configuration_file_update.content + _schema.virtual_path = cls._args_nginx_configuration_file_update.virtual_path + return + + cls._args_nginx_configuration_file_update = AAZObjectArg( + nullable=True, + ) + + nginx_configuration_file_update = cls._args_nginx_configuration_file_update + nginx_configuration_file_update.content = AAZStrArg( + options=["content"], + nullable=True, + ) + nginx_configuration_file_update.virtual_path = AAZStrArg( + options=["virtual-path"], + nullable=True, + ) + + _schema.content = cls._args_nginx_configuration_file_update.content + _schema.virtual_path = cls._args_nginx_configuration_file_update.virtual_path + + def _execute_operations(self): + self.ConfigurationsGet(ctx=self.ctx)() + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + yield self.ConfigurationsCreateOrUpdate(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ConfigurationsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "configurationName", self.ctx.args.configuration_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 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() + _build_schema_nginx_configuration_read(cls._schema_on_200) + + return cls._schema_on_200 + + class ConfigurationsCreateOrUpdate(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_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 [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "configurationName", self.ctx.args.configuration_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _build_schema_nginx_configuration_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("files", AAZListType, ".files") + properties.set_prop("package", AAZObjectType, ".package") + properties.set_prop("protectedFiles", AAZListType, ".protected_files") + properties.set_prop("provisioningState", AAZStrType, ".provisioning_state") + properties.set_prop("rootFile", AAZStrType, ".root_file") + + files = _builder.get(".properties.files") + if files is not None: + _build_schema_nginx_configuration_file_update(files.set_elements(AAZObjectType, ".")) + + package = _builder.get(".properties.package") + if package is not None: + package.set_prop("data", AAZStrType, ".data") + + protected_files = _builder.get(".properties.protectedFiles") + if protected_files is not None: + _build_schema_nginx_configuration_file_update(protected_files.set_elements(AAZObjectType, ".")) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +def _build_schema_nginx_configuration_file_update(_builder): + if _builder is None: + return + _builder.set_prop("content", AAZStrType, ".content") + _builder.set_prop("virtualPath", AAZStrType, ".virtual_path") + + +_schema_nginx_configuration_file_read = None + + +def _build_schema_nginx_configuration_file_read(_schema): + global _schema_nginx_configuration_file_read + if _schema_nginx_configuration_file_read is not None: + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + return + + _schema_nginx_configuration_file_read = AAZObjectType() + + nginx_configuration_file_read = _schema_nginx_configuration_file_read + nginx_configuration_file_read.content = AAZStrType() + nginx_configuration_file_read.virtual_path = AAZStrType( + serialized_name="virtualPath", + ) + + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + + +_schema_nginx_configuration_read = None + + +def _build_schema_nginx_configuration_read(_schema): + global _schema_nginx_configuration_read + if _schema_nginx_configuration_read is not None: + _schema.id = _schema_nginx_configuration_read.id + _schema.location = _schema_nginx_configuration_read.location + _schema.name = _schema_nginx_configuration_read.name + _schema.properties = _schema_nginx_configuration_read.properties + _schema.system_data = _schema_nginx_configuration_read.system_data + _schema.tags = _schema_nginx_configuration_read.tags + _schema.type = _schema_nginx_configuration_read.type + return + + _schema_nginx_configuration_read = AAZObjectType() + + nginx_configuration_read = _schema_nginx_configuration_read + nginx_configuration_read.id = AAZStrType( + flags={"read_only": True}, + ) + nginx_configuration_read.location = AAZStrType() + nginx_configuration_read.name = AAZStrType( + flags={"read_only": True}, + ) + nginx_configuration_read.properties = AAZObjectType() + nginx_configuration_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + nginx_configuration_read.tags = AAZDictType() + nginx_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_nginx_configuration_read.properties + properties.files = AAZListType() + properties.package = AAZObjectType() + properties.protected_files = AAZListType( + serialized_name="protectedFiles", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.root_file = AAZStrType( + serialized_name="rootFile", + ) + + files = _schema_nginx_configuration_read.properties.files + files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(files.Element) + + package = _schema_nginx_configuration_read.properties.package + package.data = AAZStrType() + + protected_files = _schema_nginx_configuration_read.properties.protected_files + protected_files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(protected_files.Element) + + system_data = _schema_nginx_configuration_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = _schema_nginx_configuration_read.tags + tags.Element = AAZStrType() + + _schema.id = _schema_nginx_configuration_read.id + _schema.location = _schema_nginx_configuration_read.location + _schema.name = _schema_nginx_configuration_read.name + _schema.properties = _schema_nginx_configuration_read.properties + _schema.system_data = _schema_nginx_configuration_read.system_data + _schema.tags = _schema_nginx_configuration_read.tags + _schema.type = _schema_nginx_configuration_read.type + + +__all__ = ["Update"] diff --git a/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_wait.py b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_wait.py new file mode 100644 index 00000000000..e4b6b36e85c --- /dev/null +++ b/src/nginx/azext_nginx/aaz/latest/nginx/deployment/configuration/_wait.py @@ -0,0 +1,247 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "nginx deployment configuration wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/nginx.nginxplus/nginxdeployments/{}/configurations/{}", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.configuration_name = AAZStrArg( + options=["-n", "--name", "--configuration-name"], + help="The name of configuration, only 'default' is supported value due to the singleton of Nginx conf", + required=True, + id_part="child_name_1", + ) + _args_schema.deployment_name = AAZStrArg( + options=["--deployment-name"], + help="The name of targeted Nginx deployment", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.ConfigurationsGet(ctx=self.ctx)() + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class ConfigurationsGet(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/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "configurationName", self.ctx.args.configuration_name, + required=True, + ), + **self.serialize_url_param( + "deploymentName", self.ctx.args.deployment_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 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() + _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.files = AAZListType() + properties.package = AAZObjectType() + properties.protected_files = AAZListType( + serialized_name="protectedFiles", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.root_file = AAZStrType( + serialized_name="rootFile", + ) + + files = cls._schema_on_200.properties.files + files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(files.Element) + + package = cls._schema_on_200.properties.package + package.data = AAZStrType() + + protected_files = cls._schema_on_200.properties.protected_files + protected_files.Element = AAZObjectType() + _build_schema_nginx_configuration_file_read(protected_files.Element) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +_schema_nginx_configuration_file_read = None + + +def _build_schema_nginx_configuration_file_read(_schema): + global _schema_nginx_configuration_file_read + if _schema_nginx_configuration_file_read is not None: + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + return + + _schema_nginx_configuration_file_read = AAZObjectType() + + nginx_configuration_file_read = _schema_nginx_configuration_file_read + nginx_configuration_file_read.content = AAZStrType() + nginx_configuration_file_read.virtual_path = AAZStrType( + serialized_name="virtualPath", + ) + + _schema.content = _schema_nginx_configuration_file_read.content + _schema.virtual_path = _schema_nginx_configuration_file_read.virtual_path + + +__all__ = ["Wait"] diff --git a/src/nginx/azext_nginx/azext_metadata.json b/src/nginx/azext_nginx/azext_metadata.json new file mode 100644 index 00000000000..e36add0a323 --- /dev/null +++ b/src/nginx/azext_nginx/azext_metadata.json @@ -0,0 +1,3 @@ +{ + "azext.minCliCoreVersion": "2.40.0" +} \ No newline at end of file diff --git a/src/nginx/azext_nginx/commands.py b/src/nginx/azext_nginx/commands.py new file mode 100644 index 00000000000..667317b505a --- /dev/null +++ b/src/nginx/azext_nginx/commands.py @@ -0,0 +1,10 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long + + +def load_command_table(self, _): # pylint: disable=unused-argument + pass diff --git a/src/nginx/azext_nginx/tests/__init__.py b/src/nginx/azext_nginx/tests/__init__.py new file mode 100644 index 00000000000..99c0f28cd71 --- /dev/null +++ b/src/nginx/azext_nginx/tests/__init__.py @@ -0,0 +1,5 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------------------------- diff --git a/src/nginx/azext_nginx/tests/latest/__init__.py b/src/nginx/azext_nginx/tests/latest/__init__.py new file mode 100644 index 00000000000..99c0f28cd71 --- /dev/null +++ b/src/nginx/azext_nginx/tests/latest/__init__.py @@ -0,0 +1,5 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------------------------- diff --git a/src/nginx/azext_nginx/tests/latest/recordings/test_deployment_cert_config.yaml b/src/nginx/azext_nginx/tests/latest/recordings/test_deployment_cert_config.yaml new file mode 100644 index 00000000000..13f8ddbaf96 --- /dev/null +++ b/src/nginx/azext_nginx/tests/latest/recordings/test_deployment_cert_config.yaml @@ -0,0 +1,3927 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --version --sku --zone + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AZCLIDeploymentTestRG_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001","name":"AZCLIDeploymentTestRG_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T11:54:33Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '339' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:54:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "sku": {"name": "Standard"}, "zones": ["2"], + "properties": {"publicIPAllocationMethod": "Static", "publicIPAddressVersion": + "IPv4", "idleTimeoutInMinutes": 4}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + Content-Length: + - '187' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --version --sku --zone + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"azclitest-public-ip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip\"\ + ,\r\n \"etag\": \"W/\\\"2e43a7a9-8397-4d69-9a1c-bfceedccee40\\\"\",\r\n \ + \ \"location\": \"eastus2euap\",\r\n \"zones\": [\r\n \"2\"\r\n ],\r\n\ + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ + resourceGuid\": \"0ff0939e-4ab7-405c-9ae3-197768a24483\",\r\n \"publicIPAddressVersion\"\ + : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\"\ + : 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\"\ + ,\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ + \r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/e5a4a735-4be2-47b2-abef-878a86ca6c95?api-version=2022-01-01 + cache-control: + - no-cache + content-length: + - '700' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:54:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 3bfc6497-fa37-47b6-a41f-02f45dd427a4 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --version --sku --zone + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/e5a4a735-4be2-47b2-abef-878a86ca6c95?api-version=2022-01-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:54:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 6bbf5296-bd72-45c0-8912-32297c4d6c04 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --version --sku --zone + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"azclitest-public-ip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip\"\ + ,\r\n \"etag\": \"W/\\\"cca55565-bc4a-4a4b-a0bd-6a232976ab97\\\"\",\r\n \ + \ \"location\": \"eastus2euap\",\r\n \"zones\": [\r\n \"2\"\r\n ],\r\n\ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + resourceGuid\": \"0ff0939e-4ab7-405c-9ae3-197768a24483\",\r\n \"ipAddress\"\ + : \"20.47.162.158\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"\ + publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\ + \n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\"\ + ,\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ + \r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '736' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:54:56 GMT + etag: + - W/"cca55565-bc4a-4a4b-a0bd-6a232976ab97" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 38841e60-bba4-40be-b396-e399e621fd88 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --address-prefixes --subnet-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AZCLIDeploymentTestRG_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001","name":"AZCLIDeploymentTestRG_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T11:54:33Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '339' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:54:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "tags": {}, "properties": {"addressSpace": + {"addressPrefixes": ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"name": + "azclitest-subnet", "properties": {"addressPrefix": "10.0.0.0/24", "privateEndpointNetworkPolicies": + "Disabled", "privateLinkServiceNetworkPolicies": "Enabled"}}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + Content-Length: + - '313' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --address-prefixes --subnet-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"azclitest-vnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet\"\ + ,\r\n \"etag\": \"W/\\\"19500b87-f629-4a91-b88a-3742bedc82a0\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Updating\",\r\n \"resourceGuid\": \"31a12cc0-1935-44c9-a872-af42b4afffd9\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"azclitest-subnet\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet\"\ + ,\r\n \"etag\": \"W/\\\"19500b87-f629-4a91-b88a-3742bedc82a0\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\"\ + : [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \ + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\ + \n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n \ + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\"\ + : false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/c22dd807-61eb-4fdd-bac0-097bd08cb3c4?api-version=2022-01-01 + cache-control: + - no-cache + content-length: + - '1360' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:55:10 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - febe6bd8-2011-43eb-b316-997be4f769c9 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --address-prefixes --subnet-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/c22dd807-61eb-4fdd-bac0-097bd08cb3c4?api-version=2022-01-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:55:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 23d65d0d-b606-479c-8823-f6573282f177 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --address-prefixes --subnet-name + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"azclitest-vnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet\"\ + ,\r\n \"etag\": \"W/\\\"33fa1908-54a9-4335-bb8a-1175058b6e84\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Succeeded\",\r\n \"resourceGuid\": \"31a12cc0-1935-44c9-a872-af42b4afffd9\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"azclitest-subnet\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet\"\ + ,\r\n \"etag\": \"W/\\\"33fa1908-54a9-4335-bb8a-1175058b6e84\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\"\ + : [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \ + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\ + \n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n \ + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\"\ + : false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1362' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:55:17 GMT + etag: + - W/"33fa1908-54a9-4335-bb8a-1175058b6e84" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - fbe5f823-87c0-4ec7-972b-815581701499 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vnet-name --delegations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"azclitest-subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet\"\ + ,\r\n \"etag\": \"W/\\\"33fa1908-54a9-4335-bb8a-1175058b6e84\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ + : \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ + \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '567' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:55:21 GMT + etag: + - W/"33fa1908-54a9-4335-bb8a-1175058b6e84" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 2da2b0e4-158e-4340-8789-5fb9ee883397 + status: + code: 200 + message: '' +- request: + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet", + "name": "azclitest-subnet", "type": "Microsoft.Network/virtualNetworks/subnets", + "properties": {"addressPrefix": "10.0.0.0/24", "delegations": [{"name": "0", + "properties": {"serviceName": "NGINX.NGINXPLUS/nginxDeployments"}}], "privateEndpointNetworkPolicies": + "Disabled", "privateLinkServiceNetworkPolicies": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + Content-Length: + - '511' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --vnet-name --delegations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"azclitest-subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet\"\ + ,\r\n \"etag\": \"W/\\\"954f7deb-66e1-4da2-b988-cbeb65f0de21\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ + addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [\r\n {\r\n\ + \ \"name\": \"0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet/delegations/0\"\ + ,\r\n \"etag\": \"W/\\\"954f7deb-66e1-4da2-b988-cbeb65f0de21\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"serviceName\": \"NGINX.NGINXPLUS/nginxDeployments\",\r\n\ + \ \"actions\": [\r\n \"Microsoft.Network/virtualNetworks/subnets/join/action\"\ + \r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets/delegations\"\ + \r\n }\r\n ],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\"\ + ,\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"\ + type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/09af3879-aed1-4d1a-a490-6077d3c99b29?api-version=2022-01-01 + cache-control: + - no-cache + content-length: + - '1210' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:55:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - a5961c29-3b84-4ce0-bf9e-892b3dcffa41 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vnet-name --delegations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/09af3879-aed1-4d1a-a490-6077d3c99b29?api-version=2022-01-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:55:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 1b873f0a-590f-4f11-9ad0-d84025604d42 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vnet-name --delegations + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"azclitest-subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet\"\ + ,\r\n \"etag\": \"W/\\\"8273100d-08a5-4c0d-b477-4270ef4a6834\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [\r\n {\r\n\ + \ \"name\": \"0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet/delegations/0\"\ + ,\r\n \"etag\": \"W/\\\"8273100d-08a5-4c0d-b477-4270ef4a6834\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"serviceName\": \"NGINX.NGINXPLUS/nginxDeployments\",\r\n\ + \ \"actions\": [\r\n \"Microsoft.Network/virtualNetworks/subnets/join/action\"\ + \r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets/delegations\"\ + \r\n }\r\n ],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\"\ + ,\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"\ + type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1211' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:55:28 GMT + etag: + - W/"8273100d-08a5-4c0d-b477-4270ef4a6834" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 1d38dfaf-47c7-486f-8683-b74a9f1ae6cb + status: + code: 200 + message: '' +- request: + body: '{"location": "eastus2euap", "properties": {"enableDiagnosticsSupport": + true, "networkProfile": {"frontEndIPConfiguration": {"publicIPAddresses": [{"id": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]}, + "networkInterfaceConfiguration": {"subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}}}, + "sku": {"name": "preview_Monthly_gmz7xq9ge3py"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment create + Connection: + - keep-alive + Content-Length: + - '601' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --location --sku --enable-diagnostics --network-profile + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","name":"azclitest-deployment","type":"nginx.nginxplus/nginxdeployments","sku":{"name":"preview_Monthly_gmz7xq9ge3py"},"location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T11:55:31.727496Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T11:55:31.727496Z"},"properties":{"provisioningState":"Accepted","nginxVersion":null,"managedResourceGroup":null,"ipAddress":null,"networkProfile":{"frontEndIPConfiguration":{"publicIPAddresses":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]},"networkInterfaceConfiguration":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}},"enableDiagnosticsSupport":true,"logging":null}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + cache-control: + - no-cache + content-length: + - '1176' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:55:38 GMT + etag: + - '"d200837e-0000-3400-0000-6329aa380000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --sku --enable-diagnostics --network-profile + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Accepted","startTime":"2022-09-20T11:55:35.7229086Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:56:08 GMT + etag: + - '"03000401-0000-3400-0000-6329aa370000"' + 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: + - nginx deployment create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --sku --enable-diagnostics --network-profile + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Accepted","startTime":"2022-09-20T11:55:35.7229086Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:56:38 GMT + etag: + - '"03000401-0000-3400-0000-6329aa370000"' + 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: + - nginx deployment create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --sku --enable-diagnostics --network-profile + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Accepted","startTime":"2022-09-20T11:55:35.7229086Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:57:09 GMT + etag: + - '"03000401-0000-3400-0000-6329aa370000"' + 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: + - nginx deployment create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --sku --enable-diagnostics --network-profile + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Accepted","startTime":"2022-09-20T11:55:35.7229086Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:57:39 GMT + etag: + - '"03000401-0000-3400-0000-6329aa370000"' + 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: + - nginx deployment create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --sku --enable-diagnostics --network-profile + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Accepted","startTime":"2022-09-20T11:55:35.7229086Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:58:09 GMT + etag: + - '"03000401-0000-3400-0000-6329aa370000"' + 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: + - nginx deployment create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --sku --enable-diagnostics --network-profile + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Accepted","startTime":"2022-09-20T11:55:35.7229086Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:58:40 GMT + etag: + - '"03000401-0000-3400-0000-6329aa370000"' + 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: + - nginx deployment create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --sku --enable-diagnostics --network-profile + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"81ce1629-a593-4a4f-ac9f-b3d388206bac*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Succeeded","startTime":"2022-09-20T11:55:35.7229086Z","endTime":"2022-09-20T11:58:44.4423629Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '597' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:59:11 GMT + etag: + - '"03000501-0000-3400-0000-6329aaf40000"' + 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: + - nginx deployment create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --sku --enable-diagnostics --network-profile + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","name":"azclitest-deployment","type":"nginx.nginxplus/nginxdeployments","sku":{"name":"preview_Monthly_gmz7xq9ge3py"},"location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T11:55:31.727496Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T11:55:31.727496Z"},"properties":{"provisioningState":"Succeeded","nginxVersion":"","managedResourceGroup":"NGX_AZCLIDeploymentTestRG_000001_azclitest-deployment_eastus2euap","ipAddress":"20.47.162.158","networkProfile":{"frontEndIPConfiguration":{"publicIPAddresses":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]},"networkInterfaceConfiguration":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}},"enableDiagnosticsSupport":true}}' + headers: + cache-control: + - no-cache + content-length: + - '1234' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:59:12 GMT + etag: + - '"d2004b83-0000-3400-0000-6329aaf40000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments?api-version=2022-08-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","name":"azclitest-deployment","type":"nginx.nginxplus/nginxdeployments","sku":{"name":"preview_Monthly_gmz7xq9ge3py"},"location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T11:55:31.727496Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T11:55:31.727496Z"},"properties":{"provisioningState":"Succeeded","nginxVersion":"","managedResourceGroup":"NGX_AZCLIDeploymentTestRG_000001_azclitest-deployment_eastus2euap","ipAddress":"20.47.162.158","networkProfile":{"frontEndIPConfiguration":{"publicIPAddresses":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]},"networkInterfaceConfiguration":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}},"enableDiagnosticsSupport":true}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1246' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:59:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 3ceb70b8-2a20-4567-aeab-e9e897d93847 + - a950ec6f-40ce-41ac-a08a-d0dd4330dde5 + - cc3b6798-cf45-4779-9666-6cce08e6ed9f + - e329178d-e69e-4af5-bcec-db162b139791 + - 2826d8cd-9502-4b45-b4b3-d6def340e627 + - 315cfd8e-f7fc-48dc-a35f-bd36b7809a06 + - 785552b2-b354-46d4-a7f3-6d4294bad3ca + - 62507f5b-e5a8-48cc-b10a-d5574af9d5a8 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment update + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --tags --enable-diagnostics + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","name":"azclitest-deployment","type":"nginx.nginxplus/nginxdeployments","sku":{"name":"preview_Monthly_gmz7xq9ge3py"},"location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T11:55:31.727496Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T11:55:31.727496Z"},"properties":{"provisioningState":"Succeeded","nginxVersion":"","managedResourceGroup":"NGX_AZCLIDeploymentTestRG_000001_azclitest-deployment_eastus2euap","ipAddress":"20.47.162.158","networkProfile":{"frontEndIPConfiguration":{"publicIPAddresses":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]},"networkInterfaceConfiguration":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}},"enableDiagnosticsSupport":true}}' + headers: + cache-control: + - no-cache + content-length: + - '1234' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:59:21 GMT + etag: + - '"d2004b83-0000-3400-0000-6329aaf40000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "properties": {"enableDiagnosticsSupport": + false, "managedResourceGroup": "NGX_AZCLIDeploymentTestRG_000001_azclitest-deployment_eastus2euap", + "networkProfile": {"frontEndIPConfiguration": {"publicIPAddresses": [{"id": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]}, + "networkInterfaceConfiguration": {"subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}}, + "provisioningState": "Succeeded"}, "sku": {"name": "preview_Monthly_gmz7xq9ge3py"}, + "tags": {"tag1": "value1", "tag2": "value2"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment update + Connection: + - keep-alive + Content-Length: + - '775' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --location --tags --enable-diagnostics + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","name":"azclitest-deployment","type":"nginx.nginxplus/nginxdeployments","sku":{"name":"preview_Monthly_gmz7xq9ge3py"},"location":"eastus2euap","tags":{"tag1":"value1","tag2":"value2"},"systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T11:55:31.727496Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T11:59:25.1693125Z"},"properties":{"provisioningState":"Accepted","nginxVersion":"","managedResourceGroup":"NGX_AZCLIDeploymentTestRG_000001_azclitest-deployment_eastus2euap","ipAddress":"20.47.162.158","networkProfile":{"frontEndIPConfiguration":{"publicIPAddresses":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]},"networkInterfaceConfiguration":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}},"enableDiagnosticsSupport":false,"logging":null}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/4ddc3930-5161-499d-bc34-347d074eeebd*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + cache-control: + - no-cache + content-length: + - '1291' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 11:59:33 GMT + etag: + - '"d2003285-0000-3400-0000-6329ab200000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/4ddc3930-5161-499d-bc34-347d074eeebd*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + 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: + - nginx deployment update + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --tags --enable-diagnostics + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/4ddc3930-5161-499d-bc34-347d074eeebd*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/4ddc3930-5161-499d-bc34-347d074eeebd*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"4ddc3930-5161-499d-bc34-347d074eeebd*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Succeeded","startTime":"2022-09-20T11:59:27.0419019Z","endTime":"2022-09-20T12:00:01.0824201Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '597' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:03 GMT + etag: + - '"03000701-0000-3400-0000-6329ab410000"' + 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: + - nginx deployment update + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --tags --enable-diagnostics + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","name":"azclitest-deployment","type":"nginx.nginxplus/nginxdeployments","sku":{"name":"preview_Monthly_gmz7xq9ge3py"},"location":"eastus2euap","tags":{"tag1":"value1","tag2":"value2"},"systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T11:55:31.727496Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T11:59:25.1693125Z"},"properties":{"provisioningState":"Succeeded","nginxVersion":"1.21.6 + (nginx-plus-r27)","managedResourceGroup":"NGX_AZCLIDeploymentTestRG_000001_azclitest-deployment_eastus2euap","ipAddress":"20.47.162.158","networkProfile":{"frontEndIPConfiguration":{"publicIPAddresses":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]},"networkInterfaceConfiguration":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}},"enableDiagnosticsSupport":false}}' + headers: + cache-control: + - no-cache + content-length: + - '1300' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:04 GMT + etag: + - '"d2003586-0000-3400-0000-6329ab410000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment wait + Connection: + - keep-alive + ParameterSetName: + - --updated --name --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","name":"azclitest-deployment","type":"nginx.nginxplus/nginxdeployments","sku":{"name":"preview_Monthly_gmz7xq9ge3py"},"location":"eastus2euap","tags":{"tag1":"value1","tag2":"value2"},"systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T11:55:31.727496Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T11:59:25.1693125Z"},"properties":{"provisioningState":"Succeeded","nginxVersion":"1.21.6 + (nginx-plus-r27)","managedResourceGroup":"NGX_AZCLIDeploymentTestRG_000001_azclitest-deployment_eastus2euap","ipAddress":"20.47.162.158","networkProfile":{"frontEndIPConfiguration":{"publicIPAddresses":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]},"networkInterfaceConfiguration":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}},"enableDiagnosticsSupport":false}}' + headers: + cache-control: + - no-cache + content-length: + - '1300' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:07 GMT + etag: + - '"d2003586-0000-3400-0000-6329ab410000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment show + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","name":"azclitest-deployment","type":"nginx.nginxplus/nginxdeployments","sku":{"name":"preview_Monthly_gmz7xq9ge3py"},"location":"eastus2euap","tags":{"tag1":"value1","tag2":"value2"},"systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T11:55:31.727496Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T11:59:25.1693125Z"},"properties":{"provisioningState":"Succeeded","nginxVersion":"1.21.6 + (nginx-plus-r27)","managedResourceGroup":"NGX_AZCLIDeploymentTestRG_000001_azclitest-deployment_eastus2euap","ipAddress":"20.47.162.158","networkProfile":{"frontEndIPConfiguration":{"publicIPAddresses":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/publicIPAddresses/azclitest-public-ip"}]},"networkInterfaceConfiguration":{"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.Network/virtualNetworks/azclitest-vnet/subnets/azclitest-subnet"}},"enableDiagnosticsSupport":false}}' + headers: + cache-control: + - no-cache + content-length: + - '1300' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:08 GMT + etag: + - '"d2003586-0000-3400-0000-6329ab410000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-keyvault/10.1.0 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.KeyVault/vaults/cli000002?api-version=2022-07-01 + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.KeyVault/vaults/cli000002'' + under resource group ''AZCLIDeploymentTestRG_000001'' was not found. For more + details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '235' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location + User-Agent: + - python/3.10.7 (Windows-10-10.0.22000-SP0) AZURECLI/2.40.0 (PIP) + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":["+254 + (20) 7268140"],"displayName":"George Ngugi","givenName":"George","jobTitle":"SOFTWARE + ENGINEER","mail":"georgengugi@microsoft.com","mobilePhone":null,"officeLocation":"NAIROBI-WAIYAKI + WAY/Mobile","preferredLanguage":null,"surname":"Ngugi","userPrincipalName":"georgengugi@microsoft.com","id":"44307965-0ae2-4620-9a3d-0a9a0371e958"}' + headers: + cache-control: + - no-cache + content-length: + - '432' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:12 GMT + odata-version: + - '4.0' + request-id: + - 7599ddfd-6555-4376-a997-c323e029d9d8 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"AM1PEPF00016715"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "properties": {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": "44307965-0ae2-4620-9a3d-0a9a0371e958", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}], "softDeleteRetentionInDays": 90, "networkAcls": {"bypass": + "AzureServices", "defaultAction": "Allow"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + Content-Length: + - '467' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --location + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-keyvault/10.1.0 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.KeyVault/vaults/cli000002?api-version=2022-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.KeyVault/vaults/cli000002","name":"cli000002","type":"Microsoft.KeyVault/vaults","location":"eastus2euap","tags":{},"systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:00:20.448Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:00:20.448Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"44307965-0ae2-4620-9a3d-0a9a0371e958","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"vaultUri":"https://cli000002.vault.azure.net","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '988' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.517.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-keyvault/10.1.0 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.KeyVault/vaults/cli000002?api-version=2022-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Microsoft.KeyVault/vaults/cli000002","name":"cli000002","type":"Microsoft.KeyVault/vaults","location":"eastus2euap","tags":{},"systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:00:20.448Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:00:20.448Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"44307965-0ae2-4620-9a3d-0a9a0371e958","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"vaultUri":"https://cli000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '984' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.517.0 + status: + code: 200 + message: OK +- request: + body: '' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - 0 + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.10.7 (Windows-10-10.0.22000-SP0) msrest/0.7.1 msrest_azure/0.6.4 + azure-keyvault/7.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://cli000002.vault.azure.net/certificates/azclitestcert/create?api-version=7.0 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '97' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=41.80.97.57;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - eastus2euap + x-ms-keyvault-service-version: + - 1.9.538.1 + status: + code: 401 + message: Unauthorized +- request: + body: '{"policy": {"key_props": {"exportable": true, "kty": "RSA", "key_size": + 2048, "reuse_key": true}, "secret_props": {"contentType": "application/x-pkcs12"}, + "x509_props": {"subject": "CN=CLIGetDefaultPolicy", "key_usage": ["cRLSign", + "dataEncipherment", "digitalSignature", "keyEncipherment", "keyAgreement", "keyCertSign"], + "validity_months": 12}, "lifetime_actions": [{"trigger": {"days_before_expiry": + 90}, "action": {"action_type": "AutoRenew"}}], "issuer": {"name": "Self"}}, + "attributes": {"enabled": true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '511' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.10.7 (Windows-10-10.0.22000-SP0) msrest/0.7.1 msrest_azure/0.6.4 + azure-keyvault/7.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://cli000002.vault.azure.net/certificates/azclitestcert/create?api-version=7.0 + response: + body: + string: '{"id":"https://cli000002.vault.azure.net/certificates/azclitestcert/pending","issuer":{"name":"Self"},"csr":"MIICrjCCAZYCAQAwHjEcMBoGA1UEAxMTQ0xJR2V0RGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMXDeemfCx2N38yRPPM9MxYc0CF4tyQ3xd6CJloiS4v5/td/4OWR57OZzg/BKdWSGtdIKUJhbFWxXH5ZX2EFwEqLkvn8AO8D25kWOJqizL2DFFyut3Hl8S+ANcv3czHtZRRe4z87J49z2v+oe3Nesa7YTAOlP7TGW5M5yE8hxGc7p+oszHwlto4vOKVx1mudtq01uf9WaJjq2Le0mYcFT/t9ySj+iVweuSUQLBxp8LErY8MNGKhjdph4YLOZqD7hKBhicLT+M3Qzt3U00RlgWxFm03m5nFAFzM1msvM36vLn1JyeiUggaOKb0Q6xEGaI+6XdzCLG2QuEGsLVp0tDw1kCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgG+MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAVCnLjFIWiAYPwtkrhoiwJDai/7pTkkKEj/3ij3NMtMnRqsqIbZYovDfxM8KUPjQXwJ0Lfs2uC8v1hch5XO5aYisMIss0EtAM0f2Ex2ifFSPRiooW8xolFe7JE9wC12dQXr1tvxNjLuQcdUi8IAilv5jclkxBLycwZHtz1BRh78KX0GCcfd95oAcj+EAVNvOH12Datb3STWa9HLEYEP8TCT66VNx4lPEA87pqFhTbp4s4q4ulWg21NZy6muOENjkNH+TiBd/7xof8lr+us9ouh1kDzq22jEMe5p+Pq99ph0kevtGX0zdJ0+ISwRGvjHSpDxOrK3N9XxaqAXpgVNagz","cancellation_requested":false,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"b7ec94271b96444bbd618792b6ade03f"}' + headers: + cache-control: + - no-cache + content-length: + - '1296' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:00:59 GMT + expires: + - '-1' + location: + - https://cli000002.vault.azure.net/certificates/azclitestcert/pending?api-version=7.0&request_id=b7ec94271b96444bbd618792b6ade03f + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=41.80.97.57;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - eastus2euap + x-ms-keyvault-service-version: + - 1.9.538.1 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.10.7 (Windows-10-10.0.22000-SP0) msrest/0.7.1 msrest_azure/0.6.4 + azure-keyvault/7.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://cli000002.vault.azure.net/certificates/azclitestcert/pending?api-version=7.0 + response: + body: + string: '{"id":"https://cli000002.vault.azure.net/certificates/azclitestcert/pending","issuer":{"name":"Self"},"csr":"MIICrjCCAZYCAQAwHjEcMBoGA1UEAxMTQ0xJR2V0RGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMXDeemfCx2N38yRPPM9MxYc0CF4tyQ3xd6CJloiS4v5/td/4OWR57OZzg/BKdWSGtdIKUJhbFWxXH5ZX2EFwEqLkvn8AO8D25kWOJqizL2DFFyut3Hl8S+ANcv3czHtZRRe4z87J49z2v+oe3Nesa7YTAOlP7TGW5M5yE8hxGc7p+oszHwlto4vOKVx1mudtq01uf9WaJjq2Le0mYcFT/t9ySj+iVweuSUQLBxp8LErY8MNGKhjdph4YLOZqD7hKBhicLT+M3Qzt3U00RlgWxFm03m5nFAFzM1msvM36vLn1JyeiUggaOKb0Q6xEGaI+6XdzCLG2QuEGsLVp0tDw1kCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgG+MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAVCnLjFIWiAYPwtkrhoiwJDai/7pTkkKEj/3ij3NMtMnRqsqIbZYovDfxM8KUPjQXwJ0Lfs2uC8v1hch5XO5aYisMIss0EtAM0f2Ex2ifFSPRiooW8xolFe7JE9wC12dQXr1tvxNjLuQcdUi8IAilv5jclkxBLycwZHtz1BRh78KX0GCcfd95oAcj+EAVNvOH12Datb3STWa9HLEYEP8TCT66VNx4lPEA87pqFhTbp4s4q4ulWg21NZy6muOENjkNH+TiBd/7xof8lr+us9ouh1kDzq22jEMe5p+Pq99ph0kevtGX0zdJ0+ISwRGvjHSpDxOrK3N9XxaqAXpgVNagz","cancellation_requested":false,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"b7ec94271b96444bbd618792b6ade03f"}' + headers: + cache-control: + - no-cache + content-length: + - '1296' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:01:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=41.80.97.57;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - eastus2euap + x-ms-keyvault-service-version: + - 1.9.538.1 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.10.7 (Windows-10-10.0.22000-SP0) msrest/0.7.1 msrest_azure/0.6.4 + azure-keyvault/7.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://cli000002.vault.azure.net/certificates/azclitestcert/pending?api-version=7.0 + response: + body: + string: '{"id":"https://cli000002.vault.azure.net/certificates/azclitestcert/pending","issuer":{"name":"Self"},"csr":"MIICrjCCAZYCAQAwHjEcMBoGA1UEAxMTQ0xJR2V0RGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMXDeemfCx2N38yRPPM9MxYc0CF4tyQ3xd6CJloiS4v5/td/4OWR57OZzg/BKdWSGtdIKUJhbFWxXH5ZX2EFwEqLkvn8AO8D25kWOJqizL2DFFyut3Hl8S+ANcv3czHtZRRe4z87J49z2v+oe3Nesa7YTAOlP7TGW5M5yE8hxGc7p+oszHwlto4vOKVx1mudtq01uf9WaJjq2Le0mYcFT/t9ySj+iVweuSUQLBxp8LErY8MNGKhjdph4YLOZqD7hKBhicLT+M3Qzt3U00RlgWxFm03m5nFAFzM1msvM36vLn1JyeiUggaOKb0Q6xEGaI+6XdzCLG2QuEGsLVp0tDw1kCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgG+MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQAVCnLjFIWiAYPwtkrhoiwJDai/7pTkkKEj/3ij3NMtMnRqsqIbZYovDfxM8KUPjQXwJ0Lfs2uC8v1hch5XO5aYisMIss0EtAM0f2Ex2ifFSPRiooW8xolFe7JE9wC12dQXr1tvxNjLuQcdUi8IAilv5jclkxBLycwZHtz1BRh78KX0GCcfd95oAcj+EAVNvOH12Datb3STWa9HLEYEP8TCT66VNx4lPEA87pqFhTbp4s4q4ulWg21NZy6muOENjkNH+TiBd/7xof8lr+us9ouh1kDzq22jEMe5p+Pq99ph0kevtGX0zdJ0+ISwRGvjHSpDxOrK3N9XxaqAXpgVNagz","cancellation_requested":false,"status":"completed","target":"https://cli000002.vault.azure.net/certificates/azclitestcert","request_id":"b7ec94271b96444bbd618792b6ade03f"}' + headers: + cache-control: + - no-cache + content-length: + - '1203' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:01:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=41.80.97.57;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - eastus2euap + x-ms-keyvault-service-version: + - 1.9.538.1 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.10.7 (Windows-10-10.0.22000-SP0) msrest/0.7.1 msrest_azure/0.6.4 + azure-keyvault/7.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://cli000002.vault.azure.net/certificates/azclitestcert/?api-version=7.0 + response: + body: + string: '{"id":"https://cli000002.vault.azure.net/certificates/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf","kid":"https://cli000002.vault.azure.net/keys/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf","sid":"https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf","x5t":"oPrt2n74Edsc7FL0fYYLIBq_pwo","cer":"MIIDQjCCAiqgAwIBAgIQJIKpEQnKQHCVZ47DueqPnTANBgkqhkiG9w0BAQsFADAeMRwwGgYDVQQDExNDTElHZXREZWZhdWx0UG9saWN5MB4XDTIyMDkyMDExNTEwMloXDTIzMDkyMDEyMDEwMlowHjEcMBoGA1UEAxMTQ0xJR2V0RGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMXDeemfCx2N38yRPPM9MxYc0CF4tyQ3xd6CJloiS4v5/td/4OWR57OZzg/BKdWSGtdIKUJhbFWxXH5ZX2EFwEqLkvn8AO8D25kWOJqizL2DFFyut3Hl8S+ANcv3czHtZRRe4z87J49z2v+oe3Nesa7YTAOlP7TGW5M5yE8hxGc7p+oszHwlto4vOKVx1mudtq01uf9WaJjq2Le0mYcFT/t9ySj+iVweuSUQLBxp8LErY8MNGKhjdph4YLOZqD7hKBhicLT+M3Qzt3U00RlgWxFm03m5nFAFzM1msvM36vLn1JyeiUggaOKb0Q6xEGaI+6XdzCLG2QuEGsLVp0tDw1kCAwEAAaN8MHowDgYDVR0PAQH/BAQDAgG+MAkGA1UdEwQCMAAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMB8GA1UdIwQYMBaAFB4TFe0VK7+udT1uYv4+GuquTFovMB0GA1UdDgQWBBQeExXtFSu/rnU9bmL+PhrqrkxaLzANBgkqhkiG9w0BAQsFAAOCAQEAOzC2EaJByMzOGiLnwMEdFB3KjPn/7i1+wx+mem0WtcaGUP/5ck29yYb9x/D523dUQdy0Yu1t1ZZGP2+c+YZzZdxD35xcnR4Ck6hgrcr87M1J8xkSsd1U6hVMNB04N6rcdKGEYqCt4Apng8UJ4EMEsc9ga/mY2baVHa2bQqQDFC53RFW+qfysQNfBhWn16lKF/z9jx2rZJ2dIsySG2Ekj2/XMk+/XtgH0b4qigaxVS7MCa4SUplpq4aiJWNp+SLZAm+K6RAi+3B2uMLGdW4P+LFlwgX66BRYxZDlwWVTZdYtzWTxDV+ttQkTSAD0lPyzMyMoDsun5tAQZv0W5hibZ4g==","attributes":{"enabled":true,"nbf":1663674662,"exp":1695211262,"created":1663675262,"updated":1663675262,"recoveryLevel":"Recoverable+Purgeable"},"policy":{"id":"https://cli000002.vault.azure.net/certificates/azclitestcert/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":true},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=CLIGetDefaultPolicy","ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["cRLSign","dataEncipherment","digitalSignature","keyAgreement","keyCertSign","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"days_before_expiry":90},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1663675259,"updated":1663675259}},"pending":{"id":"https://cli000002.vault.azure.net/certificates/azclitestcert/pending"}}' + headers: + cache-control: + - no-cache + content-length: + - '2364' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:01:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=41.80.97.57;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - eastus2euap + x-ms-keyvault-service-version: + - 1.9.538.1 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate create + Connection: + - keep-alive + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + --key-vault-secret-id + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AZCLIDeploymentTestRG_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001","name":"AZCLIDeploymentTestRG_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T11:54:33Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '339' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:01:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "properties": {"certificateVirtualPath": "/etc/nginx/test.cert", + "keyVaultSecretId": "https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf", + "keyVirtualPath": "/etc/nginx/test.key"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate create + Connection: + - keep-alive + Content-Length: + - '246' + Content-Type: + - application/json + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + --key-vault-secret-id + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","name":"azclitestcert","type":"nginx.nginxplus/nginxdeployments/certificates","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:01:17.7195687Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:01:17.7195687Z"},"properties":{"provisioningState":"Accepted","keyVirtualPath":"/etc/nginx/test.key","certificateVirtualPath":"/etc/nginx/test.cert","keyVaultSecretId":"https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6c89329d-abbd-4730-9e4d-8d6a132ae3de*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + cache-control: + - no-cache + content-length: + - '783' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:01:21 GMT + etag: + - '"00004519-0000-3400-0000-6329ab910000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6c89329d-abbd-4730-9e4d-8d6a132ae3de*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + 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: + - nginx deployment certificate create + Connection: + - keep-alive + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + --key-vault-secret-id + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6c89329d-abbd-4730-9e4d-8d6a132ae3de*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6c89329d-abbd-4730-9e4d-8d6a132ae3de*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B","name":"6c89329d-abbd-4730-9e4d-8d6a132ae3de*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","status":"Succeeded","startTime":"2022-09-20T12:01:21.6233454Z","endTime":"2022-09-20T12:01:52.6340822Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '624' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:01:52 GMT + etag: + - '"03000901-0000-3400-0000-6329abb00000"' + 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: + - nginx deployment certificate create + Connection: + - keep-alive + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + --key-vault-secret-id + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","name":"azclitestcert","type":"nginx.nginxplus/nginxdeployments/certificates","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:01:17.7195687Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:01:17.7195687Z"},"properties":{"provisioningState":"Succeeded","keyVirtualPath":"/etc/nginx/test.key","certificateVirtualPath":"/etc/nginx/test.cert","keyVaultSecretId":"https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf"}}' + headers: + cache-control: + - no-cache + content-length: + - '784' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:01:54 GMT + etag: + - '"00004619-0000-3400-0000-6329abb00000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate list + Connection: + - keep-alive + ParameterSetName: + - --deployment-name --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates?api-version=2022-08-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","name":"azclitestcert","type":"nginx.nginxplus/nginxdeployments/certificates","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:01:17.7195687Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:01:17.7195687Z"},"properties":{"provisioningState":"Succeeded","keyVirtualPath":"/etc/nginx/test.key","certificateVirtualPath":"/etc/nginx/test.cert","keyVaultSecretId":"https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '796' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:02:01 GMT + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate update + Connection: + - keep-alive + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AZCLIDeploymentTestRG_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001","name":"AZCLIDeploymentTestRG_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T11:54:33Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '339' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:02:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate update + Connection: + - keep-alive + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","name":"azclitestcert","type":"nginx.nginxplus/nginxdeployments/certificates","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:01:17.7195687Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:01:17.7195687Z"},"properties":{"provisioningState":"Succeeded","keyVirtualPath":"/etc/nginx/test.key","certificateVirtualPath":"/etc/nginx/test.cert","keyVaultSecretId":"https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf"}}' + headers: + cache-control: + - no-cache + content-length: + - '784' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:02:04 GMT + etag: + - '"00004619-0000-3400-0000-6329abb00000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "properties": {"certificateVirtualPath": "/etc/nginx/testupdated.cert", + "keyVaultSecretId": "https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf", + "keyVirtualPath": "/etc/nginx/testupdated.key", "provisioningState": "Succeeded"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate update + Connection: + - keep-alive + Content-Length: + - '294' + Content-Type: + - application/json + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","name":"azclitestcert","type":"nginx.nginxplus/nginxdeployments/certificates","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:01:17.7195687Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:02:06.1027763Z"},"properties":{"provisioningState":"Accepted","keyVirtualPath":"/etc/nginx/testupdated.key","certificateVirtualPath":"/etc/nginx/testupdated.cert","keyVaultSecretId":"https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/a4d627cf-e729-4b4f-bdfc-725b01458cb2*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + cache-control: + - no-cache + content-length: + - '797' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:02:07 GMT + etag: + - '"00004719-0000-3400-0000-6329abbf0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/a4d627cf-e729-4b4f-bdfc-725b01458cb2*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1196' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate update + Connection: + - keep-alive + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/a4d627cf-e729-4b4f-bdfc-725b01458cb2*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/a4d627cf-e729-4b4f-bdfc-725b01458cb2*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B","name":"a4d627cf-e729-4b4f-bdfc-725b01458cb2*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","status":"Accepted","startTime":"2022-09-20T12:02:07.1518212Z"}' + headers: + cache-control: + - no-cache + content-length: + - '553' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:02:37 GMT + etag: + - '"03000a01-0000-3400-0000-6329abbf0000"' + 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: + - nginx deployment certificate update + Connection: + - keep-alive + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/a4d627cf-e729-4b4f-bdfc-725b01458cb2*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/a4d627cf-e729-4b4f-bdfc-725b01458cb2*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B","name":"a4d627cf-e729-4b4f-bdfc-725b01458cb2*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","status":"Succeeded","startTime":"2022-09-20T12:02:07.1518212Z","endTime":"2022-09-20T12:02:38.0427516Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '624' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:03:07 GMT + etag: + - '"03000b01-0000-3400-0000-6329abde0000"' + 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: + - nginx deployment certificate update + Connection: + - keep-alive + ParameterSetName: + - --certificate-name --deployment-name --resource-group --certificate-path --key-path + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","name":"azclitestcert","type":"nginx.nginxplus/nginxdeployments/certificates","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:01:17.7195687Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:02:06.1027763Z"},"properties":{"provisioningState":"Succeeded","keyVirtualPath":"/etc/nginx/testupdated.key","certificateVirtualPath":"/etc/nginx/testupdated.cert","keyVaultSecretId":"https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf"}}' + headers: + cache-control: + - no-cache + content-length: + - '798' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:03:08 GMT + etag: + - '"00004819-0000-3400-0000-6329abde0000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate wait + Connection: + - keep-alive + ParameterSetName: + - --updated --name --deployment-name --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","name":"azclitestcert","type":"nginx.nginxplus/nginxdeployments/certificates","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:01:17.7195687Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:02:06.1027763Z"},"properties":{"provisioningState":"Succeeded","keyVirtualPath":"/etc/nginx/testupdated.key","certificateVirtualPath":"/etc/nginx/testupdated.cert","keyVaultSecretId":"https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf"}}' + headers: + cache-control: + - no-cache + content-length: + - '798' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:03:11 GMT + etag: + - '"00004819-0000-3400-0000-6329abde0000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate show + Connection: + - keep-alive + ParameterSetName: + - --certificate-name --deployment-name --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","name":"azclitestcert","type":"nginx.nginxplus/nginxdeployments/certificates","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:01:17.7195687Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:02:06.1027763Z"},"properties":{"provisioningState":"Succeeded","keyVirtualPath":"/etc/nginx/testupdated.key","certificateVirtualPath":"/etc/nginx/testupdated.cert","keyVaultSecretId":"https://cli000002.vault.azure.net/secrets/azclitestcert/a165560bf3b94d4ab44c6aa2e04b32bf"}}' + headers: + cache-control: + - no-cache + content-length: + - '798' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:03:14 GMT + etag: + - '"00004819-0000-3400-0000-6329abde0000"' + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --deployment-name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert?api-version=2022-08-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/58397e49-1e06-4646-a77c-47920c093758*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:03:20 GMT + etag: + - '"00004919-0000-3400-0000-6329ac080000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/58397e49-1e06-4646-a77c-47920c093758*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + 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: + - nginx deployment certificate delete + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/58397e49-1e06-4646-a77c-47920c093758*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/58397e49-1e06-4646-a77c-47920c093758*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B","name":"58397e49-1e06-4646-a77c-47920c093758*6FBC0F4BE96DC50259163649998A3947513717641C775827E2176DF1894A4F1B","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates/azclitestcert","status":"Succeeded","startTime":"2022-09-20T12:03:20.002478Z","endTime":"2022-09-20T12:03:52.1668594Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '623' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:03:52 GMT + etag: + - '"03000e01-0000-3400-0000-6329ac280000"' + 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: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment certificate list + Connection: + - keep-alive + ParameterSetName: + - --deployment-name --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/certificates?api-version=2022-08-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:03:58 GMT + 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-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration create + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --root-file --files + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AZCLIDeploymentTestRG_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001","name":"AZCLIDeploymentTestRG_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T11:54:33Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '339' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:03:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "properties": {"files": [{"content": "aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9", + "virtualPath": "/etc/nginx/nginx.conf"}], "rootFile": "/etc/nginx/nginx.conf"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration create + Connection: + - keep-alive + Content-Length: + - '848' + Content-Type: + - application/json + ParameterSetName: + - --name --deployment-name --resource-group --root-file --files + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default","name":"default","type":"nginx.nginxplus/nginxdeployments/configurations","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:04:03.237431Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:04:03.237431Z"},"properties":{"provisioningState":"Accepted","files":[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtualPath":"/etc/nginx/nginx.conf"}],"package":null,"rootFile":"/etc/nginx/nginx.conf"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/e8f418d0-1784-4b46-ba5a-bd9cfcbc20f8*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + cache-control: + - no-cache + content-length: + - '1389' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:04:04 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/e8f418d0-1784-4b46-ba5a-bd9cfcbc20f8*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1195' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration create + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --root-file --files + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/e8f418d0-1784-4b46-ba5a-bd9cfcbc20f8*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/e8f418d0-1784-4b46-ba5a-bd9cfcbc20f8*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354","name":"e8f418d0-1784-4b46-ba5a-bd9cfcbc20f8*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default","status":"Succeeded","startTime":"2022-09-20T12:04:04.9771649Z","endTime":"2022-09-20T12:04:15.7456227Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '620' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:04:35 GMT + etag: + - '"03001001-0000-3400-0000-6329ac3f0000"' + 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: + - nginx deployment configuration create + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --root-file --files + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/NGINX.NGINXPLUS/nginxDeployments/azclitest-deployment/configurations/default","name":"default","type":"NGINX.NGINXPLUS/nginxDeployments/configurations","properties":{"provisioningState":"Succeeded","files":[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtualPath":"/etc/nginx/nginx.conf"}],"package":{"data":null},"rootFile":"/etc/nginx/nginx.conf"}}' + headers: + cache-control: + - no-cache + content-length: + - '1134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:04:36 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration list + Connection: + - keep-alive + ParameterSetName: + - --deployment-name --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations?api-version=2022-08-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/NGINX.NGINXPLUS/nginxDeployments/azclitest-deployment/configurations/default","name":"default","type":"NGINX.NGINXPLUS/nginxDeployments/configurations","properties":{"provisioningState":"Succeeded","files":[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtualPath":"/etc/nginx/nginx.conf"}],"package":{"data":null},"rootFile":"/etc/nginx/nginx.conf"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1146' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:04:43 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration update + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --root-file --files + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.7 + (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AZCLIDeploymentTestRG_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001","name":"AZCLIDeploymentTestRG_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2022-09-20T11:54:33Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '339' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:04:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration update + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --root-file --files + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/NGINX.NGINXPLUS/nginxDeployments/azclitest-deployment/configurations/default","name":"default","type":"NGINX.NGINXPLUS/nginxDeployments/configurations","properties":{"provisioningState":"Succeeded","files":[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtualPath":"/etc/nginx/nginx.conf"}],"package":{"data":null},"rootFile":"/etc/nginx/nginx.conf"}}' + headers: + cache-control: + - no-cache + content-length: + - '1134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:04:50 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "properties": {"files": [{"content": "aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9", + "virtualPath": "/etc/nginx/nginxupdate.conf"}], "package": {}, "provisioningState": + "Succeeded", "rootFile": "/etc/nginx/nginxupdate.conf"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration update + Connection: + - keep-alive + Content-Length: + - '909' + Content-Type: + - application/json + ParameterSetName: + - --name --deployment-name --resource-group --root-file --files + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default","name":"default","type":"nginx.nginxplus/nginxdeployments/configurations","location":"eastus2euap","systemData":{"createdBy":"georgengugi@microsoft.com","createdByType":"User","createdAt":"2022-09-20T12:04:54.5932767Z","lastModifiedBy":"georgengugi@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-09-20T12:04:54.5932767Z"},"properties":{"provisioningState":"Accepted","files":[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtualPath":"/etc/nginx/nginxupdate.conf"}],"package":{"data":null},"rootFile":"/etc/nginx/nginxupdate.conf"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/515af680-704a-40cd-a5e9-f2f3769fec9e*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + cache-control: + - no-cache + content-length: + - '1412' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:04:54 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/515af680-704a-40cd-a5e9-f2f3769fec9e*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + 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: + - nginx deployment configuration update + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --root-file --files + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/515af680-704a-40cd-a5e9-f2f3769fec9e*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/515af680-704a-40cd-a5e9-f2f3769fec9e*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354","name":"515af680-704a-40cd-a5e9-f2f3769fec9e*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default","status":"Succeeded","startTime":"2022-09-20T12:04:55.044734Z","endTime":"2022-09-20T12:05:05.8385283Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '619' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:05:24 GMT + etag: + - '"03001201-0000-3400-0000-6329ac710000"' + 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: + - nginx deployment configuration update + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --root-file --files + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/NGINX.NGINXPLUS/nginxDeployments/azclitest-deployment/configurations/default","name":"default","type":"NGINX.NGINXPLUS/nginxDeployments/configurations","properties":{"provisioningState":"Succeeded","files":[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtualPath":"/etc/nginx/nginxupdate.conf"}],"package":{"data":null},"rootFile":"/etc/nginx/nginxupdate.conf"}}' + headers: + cache-control: + - no-cache + content-length: + - '1146' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:05:25 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration wait + Connection: + - keep-alive + ParameterSetName: + - --updated --name --deployment-name --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/NGINX.NGINXPLUS/nginxDeployments/azclitest-deployment/configurations/default","name":"default","type":"NGINX.NGINXPLUS/nginxDeployments/configurations","properties":{"provisioningState":"Succeeded","files":[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtualPath":"/etc/nginx/nginxupdate.conf"}],"package":{"data":null},"rootFile":"/etc/nginx/nginxupdate.conf"}}' + headers: + cache-control: + - no-cache + content-length: + - '1146' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:05:30 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration show + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default?api-version=2022-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/NGINX.NGINXPLUS/nginxDeployments/azclitest-deployment/configurations/default","name":"default","type":"NGINX.NGINXPLUS/nginxDeployments/configurations","properties":{"provisioningState":"Succeeded","files":[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtualPath":"/etc/nginx/nginxupdate.conf"}],"package":{"data":null},"rootFile":"/etc/nginx/nginxupdate.conf"}}' + headers: + cache-control: + - no-cache + content-length: + - '1146' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:05:32 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment configuration delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --deployment-name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default?api-version=2022-08-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6670423d-15ba-4453-8c04-b684756c8653*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:05:35 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6670423d-15ba-4453-8c04-b684756c8653*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:0d872b79-fbba-4031-abaa-ef9aa3e0050d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + 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: + - nginx deployment configuration delete + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6670423d-15ba-4453-8c04-b684756c8653*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6670423d-15ba-4453-8c04-b684756c8653*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354","name":"6670423d-15ba-4453-8c04-b684756c8653*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default","status":"Deleting","startTime":"2022-09-20T12:05:35.37626Z","error":{}}' + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:06:05 GMT + etag: + - '"03001401-0000-3400-0000-6329ac900000"' + 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: + - nginx deployment configuration delete + Connection: + - keep-alive + ParameterSetName: + - --name --deployment-name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6670423d-15ba-4453-8c04-b684756c8653*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/6670423d-15ba-4453-8c04-b684756c8653*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354","name":"6670423d-15ba-4453-8c04-b684756c8653*C7123AD722AA79897AF9FB6A904A3F3397462A9CD64F1869D7CBF731F5B6E354","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment/configurations/default","status":"Succeeded","startTime":"2022-09-20T12:05:35.37626Z","endTime":"2022-09-20T12:06:06.4463236Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '618' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:10:47 GMT + etag: + - '"03001501-0000-3400-0000-6329acae0000"' + 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: + - nginx deployment delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment?api-version=2022-08-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:10:52 GMT + etag: + - '"d2009192-0000-3400-0000-6329adcd0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Deleting","startTime":"2022-09-20T12:10:52.6699277Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:11:23 GMT + etag: + - '"03001601-0000-3400-0000-6329adcc0000"' + 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: + - nginx deployment delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Deleting","startTime":"2022-09-20T12:10:52.6699277Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:11:53 GMT + etag: + - '"03001601-0000-3400-0000-6329adcc0000"' + 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: + - nginx deployment delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Deleting","startTime":"2022-09-20T12:10:52.6699277Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:12:23 GMT + etag: + - '"03001601-0000-3400-0000-6329adcc0000"' + 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: + - nginx deployment delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Deleting","startTime":"2022-09-20T12:10:52.6699277Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:12:55 GMT + etag: + - '"03001601-0000-3400-0000-6329adcc0000"' + 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: + - nginx deployment delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Deleting","startTime":"2022-09-20T12:10:52.6699277Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:13:25 GMT + etag: + - '"03001601-0000-3400-0000-6329adcc0000"' + 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: + - nginx deployment delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Deleting","startTime":"2022-09-20T12:10:52.6699277Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:13:55 GMT + etag: + - '"03001601-0000-3400-0000-6329adcc0000"' + 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: + - nginx deployment delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Deleting","startTime":"2022-09-20T12:10:52.6699277Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:14:26 GMT + etag: + - '"03001601-0000-3400-0000-6329adcc0000"' + 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: + - nginx deployment delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Deleting","startTime":"2022-09-20T12:10:52.6699277Z"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:14:56 GMT + etag: + - '"03001601-0000-3400-0000-6329adcc0000"' + 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: + - nginx deployment delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3?api-version=2022-08-01 + response: + body: + string: '{"id":"/providers/Nginx.NginxPlus/locations/EASTUS2EUAP/operationStatuses/c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","name":"c153635b-4b01-4bc7-946b-32f72ff0dca4*23B61C80BD45EC670D58F6356F4F15E09A23A3DEEC48503E47ACA45B6209CAE3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments/azclitest-deployment","status":"Succeeded","startTime":"2022-09-20T12:10:52.6699277Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '545' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:15:27 GMT + etag: + - '"03001a01-0000-3400-0000-6329aed00000"' + 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: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - nginx deployment list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.40.0 (PIP) (AAZ) azsdk-python-core/1.24.0 Python/3.10.7 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AZCLIDeploymentTestRG_000001/providers/Nginx.NginxPlus/nginxDeployments?api-version=2022-08-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 20 Sep 2022 12:15:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - b27f6345-a9c8-47b8-9508-eebe7afd2737 + - c731e407-bcf7-471b-b1fa-f54a1e59df76 + - c9d453a4-8d55-44c4-98aa-c5f3e329e633 + - e005ba19-f7a0-4f41-bc00-65d6a44dc18b + - 091320ee-1b13-43b5-ab32-5789880b1f3a + - 02d1b570-e57b-4aeb-8c72-5e23b9fb4a6b + - 3de6b131-506d-4b18-814a-486056568425 + - bfcada51-e0bb-4a71-9741-0b2174a7ade8 + status: + code: 200 + message: OK +version: 1 diff --git a/src/nginx/azext_nginx/tests/latest/test_nginx_scenario.py b/src/nginx/azext_nginx/tests/latest/test_nginx_scenario.py new file mode 100644 index 00000000000..f8f735c6f45 --- /dev/null +++ b/src/nginx/azext_nginx/tests/latest/test_nginx_scenario.py @@ -0,0 +1,121 @@ +# -------------------------------------------------------------------------------------------- +# 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.testsdk import (ScenarioTest, ResourceGroupPreparer) +from azure.cli.testsdk.scenario_tests import AllowLargeResponse +import json + +class NginxScenarioTest(ScenarioTest): + + @AllowLargeResponse(size_kb=10240) + @ResourceGroupPreparer(name_prefix='AZCLIDeploymentTestRG_', random_name_length=34, location='eastus2euap') + def test_deployment_cert_config(self, resource_group): + self.kwargs.update({ + 'deployment_name': 'azclitest-deployment', + 'location': 'eastus2euap', + 'rg': resource_group, + 'sku': 'preview_Monthly_gmz7xq9ge3py', + 'public_ip_name': 'azclitest-public-ip', + 'vnet_name': 'azclitest-vnet', + 'subnet_name': 'azclitest-subnet', + 'tags': 'tag1="value1" tag2="value2"', + 'kv_name': self.create_random_name(prefix='cli', length=20), + 'cert_name': 'azclitestcert', + 'config_files': '[{"content":"aHR0cCB7DQogICAgdXBzdHJlYW0gYXBwIHsNCiAgICAgICAgc2VydmVyIDE3Mi4yNy4wLjQ6ODA7DQogICAgfQ0KICAgIHNlcnZlciB7DQogICAgICAgIGxpc3RlbiA4MDsNCiAgICAgICAgbG9jYXRpb24gLyB7DQogICAgICAgICAgICBkZWZhdWx0X3R5cGUgdGV4dC9odG1sOw0KICAgICAgICAgICAgcmV0dXJuIDIwMCAnPCFET0NUWVBFIGh0bWw+PGgxIHN0eWxlPSJmb250LXNpemU6MzBweDsiPkhlbGxvIGZyb20gTmdpbnggV2ViIFNlcnZlciE8L2gxPlxuJzsNCiAgICAgICAgfQ0KICAgICAgICBsb2NhdGlvbiAvYXBwLyB7DQogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9hcHAuYmxvYi5jb3JlLndpbmRvd3MubmV0LzsNCiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7DQogICAgICAgICAgICBwcm94eV9yZWFkX3RpbWVvdXQgNjAwOw0KCSAgICAgICAgcHJveHlfY29ubmVjdF90aW1lb3V0IDYwMDsNCgkgICAgICAgIHByb3h5X3NlbmRfdGltZW91dCA2MDA7DQogICAgICAgIH0NCiAgICB9DQp9","virtual-path":"/etc/nginx/nginx.conf"}]' + }) + # Nginx for Azure Deployment + public_ip = self.cmd('network public-ip create --resource-group {rg} --name {public_ip_name} --version IPv4 --sku Standard --zone 2').get_output_in_json() + vnet = self.cmd('network vnet create --resource-group {rg} --name {vnet_name} --address-prefixes 10.0.0.0/16 --subnet-name {subnet_name}').get_output_in_json() + self.cmd('network vnet subnet update --resource-group {rg} --name {subnet_name} --vnet-name {vnet_name} --delegations NGINX.NGINXPLUS/nginxDeployments') + + self.kwargs['public_ip_addresses'] = "{public-ip-addresses:[{id:" + public_ip['publicIp']['id'] + "}]}" + self.kwargs['subnet_id'] = "{subnet-id:" + vnet['newVNet']['subnets'][0]['id'] + "}" + + self.cmd('nginx deployment create --name {deployment_name} --resource-group {rg} --location {location} --sku name={sku} --enable-diagnostics true --network-profile front-end-ip-configuration="{public_ip_addresses}" network-interface-configuration="{subnet_id}"', checks=[ + self.check('properties.provisioningState', 'Succeeded'), + self.check('name', self.kwargs['deployment_name']) + ]) + + deployment_list = self.cmd('nginx deployment list --resource-group {rg}',).get_output_in_json() + assert len(deployment_list) > 0 + + self.cmd('nginx deployment update --name {deployment_name} --resource-group {rg} --location {location} --tags {tags} --enable-diagnostics false', checks=[ + self.check('properties.provisioningState', 'Succeeded'), + self.check('name', self.kwargs['deployment_name']) + ]) + self.cmd('nginx deployment wait --updated --name {deployment_name} --resource-group {rg}') + updated_deployment = self.cmd('nginx deployment show --name {deployment_name} --resource-group {rg}').get_output_in_json() + assert updated_deployment['tags'] is not None + assert updated_deployment['properties']['enableDiagnosticsSupport'] is False + + # Nginx for Azure certificates + self.cmd('keyvault create --name {kv_name} --resource-group {rg} --location {location}') + policy = self.cmd('keyvault certificate get-default-policy').get_output_in_json() + self.kwargs['policy'] = policy + with open('policy.json', 'w') as json_file: + json.dump(policy, json_file) + + self.cmd('keyvault certificate create --vault-name {kv_name} -n {cert_name} -p @policy.json') + certificate = self.cmd('keyvault certificate show --name {cert_name} --vault-name {kv_name}').get_output_in_json() + self.kwargs['kv_secret_id'] = certificate['sid'] + self.cmd('nginx deployment certificate create --certificate-name {cert_name} --deployment-name {deployment_name} --resource-group {rg} --certificate-path /etc/nginx/test.cert --key-path /etc/nginx/test.key --key-vault-secret-id {kv_secret_id}', checks=[ + self.check('properties.provisioningState', 'Succeeded'), + self.check('name', self.kwargs['cert_name']), + self.check('location', self.kwargs['location']), + self.check('properties.keyVaultSecretId', self.kwargs['kv_secret_id']) + ]) + + cert_list = self.cmd('nginx deployment certificate list --deployment-name {deployment_name} --resource-group {rg}').get_output_in_json() + assert len(cert_list) > 0 + + self.cmd('nginx deployment certificate update --certificate-name {cert_name} --deployment-name {deployment_name} --resource-group {rg} --certificate-path /etc/nginx/testupdated.cert --key-path /etc/nginx/testupdated.key', checks=[ + self.check('properties.provisioningState', 'Succeeded'), + self.check('name', self.kwargs['cert_name']), + self.check('location', self.kwargs['location']), + self.check('properties.keyVaultSecretId', self.kwargs['kv_secret_id']) + ]) + self.cmd('nginx deployment certificate wait --updated --name {cert_name} --deployment-name {deployment_name} --resource-group {rg}') + self.cmd('nginx deployment certificate show --certificate-name {cert_name} --deployment-name {deployment_name} --resource-group {rg}', checks=[ + self.check('name', self.kwargs['cert_name']), + self.check('properties.certificateVirtualPath', '/etc/nginx/testupdated.cert'), + self.check('properties.keyVirtualPath', '/etc/nginx/testupdated.key') + ]) + + self.cmd('nginx deployment certificate delete --name {cert_name} --deployment-name {deployment_name} --resource-group {rg} --yes') + cert_list = self.cmd('nginx deployment certificate list --deployment-name {deployment_name} --resource-group {rg}').get_output_in_json() + assert len(cert_list) == 0 + + # Nginx for Azure configuration + self.cmd('nginx deployment configuration create --name default --deployment-name {deployment_name} --resource-group {rg} --root-file /etc/nginx/nginx.conf --files {config_files}', checks=[ + self.check('properties.provisioningState', 'Succeeded'), + self.check('name', 'default'), + self.check('properties.files[0].virtualPath', '/etc/nginx/nginx.conf'), + self.check('properties.rootFile', '/etc/nginx/nginx.conf') + ]) + config_list = self.cmd('nginx deployment configuration list --deployment-name {deployment_name} --resource-group {rg}').get_output_in_json() + assert len(config_list) > 0 + + new_root_config_file_path = '/etc/nginx/nginxupdate.conf' + updated_config_files = self.kwargs['config_files'].replace('/etc/nginx/nginx.conf', new_root_config_file_path) + self.kwargs['config_files'] = updated_config_files + self.cmd('nginx deployment configuration update --name default --deployment-name {deployment_name} --resource-group {rg} --root-file /etc/nginx/nginxupdate.conf --files {config_files}', checks=[ + self.check('properties.provisioningState', 'Succeeded'), + self.check('name', 'default') + ]) + self.cmd('nginx deployment configuration wait --updated --name default --deployment-name {deployment_name} --resource-group {rg}') + self.cmd('nginx deployment configuration show --name default --deployment-name {deployment_name} --resource-group {rg}', checks=[ + self.check('name', 'default'), + self.check('properties.files[0].virtualPath', new_root_config_file_path), + self.check('properties.rootFile', new_root_config_file_path), + self.check('type', 'NGINX.NGINXPLUS/nginxDeployments/configurations') + ]) + + self.cmd('nginx deployment configuration delete --name default --deployment-name {deployment_name} --resource-group {rg} --yes') + #config_list = self.cmd('nginx deployment configuration list --deployment-name {deployment_name} --resource-group {rg}').get_output_in_json() + #assert len(config_list) == 0 + + self.cmd('nginx deployment delete --name {deployment_name} --resource-group {rg} --yes') + deployment_list = self.cmd('nginx deployment list --resource-group {rg}').get_output_in_json() + assert len(deployment_list) == 0 diff --git a/src/nginx/setup.cfg b/src/nginx/setup.cfg new file mode 100644 index 00000000000..3c6e79cf31d --- /dev/null +++ b/src/nginx/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/src/nginx/setup.py b/src/nginx/setup.py new file mode 100644 index 00000000000..bd3e0ab055d --- /dev/null +++ b/src/nginx/setup.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +from codecs import open +from setuptools import setup, find_packages +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + +# TODO: Confirm this is the right version number you want and it matches your +# 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.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'License :: OSI Approved :: MIT License', +] + +# TODO: Add any additional SDK dependencies here +DEPENDENCIES = [ +] + +with open('README.rst', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='nginx', + version=VERSION, + description='Microsoft Azure Command-Line Tools Nginx Extension', + # TODO: Update author and email, if applicable + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + # TODO: consider pointing directly to your source code instead of the generic repo + url='https://github.com/Azure/azure-cli-extensions', + long_description=README + '\n\n' + HISTORY, + license='MIT', + classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES, + package_data={'azext_nginx': ['azext_metadata.json']}, +) diff --git a/src/service_name.json b/src/service_name.json index 7299b4008eb..29929b3092e 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -618,5 +618,10 @@ "Command": "az orbital", "AzureServiceName": "Azure Orbital", "URL": "https://docs.microsoft.com/en-us/azure/orbital/" - } + }, + { + "Command": "az nginx", + "AzureServiceName": "Nginx for Azure", + "URL": "https://docs.microsoft.com/en-us/azure/partner-solutions/nginx/nginx-overview" + } ]