From 62e330f4cfdb03bbf82eea4306d354a88f29a99d Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 30 Sep 2021 12:58:20 +0800 Subject: [PATCH 01/26] Basic certificate command done --- .../azext_spring_cloud/_params.py | 5 + .../azext_spring_cloud/commands.py | 1 + src/spring-cloud/azext_spring_cloud/custom.py | 115 ++++++++++++++---- 3 files changed, 96 insertions(+), 25 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/_params.py b/src/spring-cloud/azext_spring_cloud/_params.py index 927ce16e425..962cd6895ac 100644 --- a/src/spring-cloud/azext_spring_cloud/_params.py +++ b/src/spring-cloud/azext_spring_cloud/_params.py @@ -119,6 +119,7 @@ def load_arguments(self, _): help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') c.argument('instance_count', type=int, default=1, help='Number of instance.', validator=validate_instance_count) + c.argument('loaded-certificates-file', help='A json file path for the certificates which would be loaded to app') with self.argument_context('spring-cloud app update') as c: c.argument('assign_endpoint', arg_type=get_three_state_flag(), @@ -126,6 +127,7 @@ def load_arguments(self, _): options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access app via https', default=False) c.argument('enable_end_to_end_tls', arg_type=get_three_state_flag(), help='If true, enable end to end tls') + c.argument('loaded-certificates-file', help='A json file path for the certificates which would be loaded to app') for scope in ['spring-cloud app update', 'spring-cloud app start', 'spring-cloud app stop', 'spring-cloud app restart', 'spring-cloud app deploy', 'spring-cloud app scale', 'spring-cloud app set-deployment', 'spring-cloud app show-deploy-log']: with self.argument_context(scope) as c: @@ -286,6 +288,9 @@ def prepare_logs_argument(c): with self.argument_context('spring-cloud certificate add') as c: c.argument('vault_uri', help='The key vault uri where store the certificate') c.argument('vault_certificate_name', help='The certificate name in key vault') + c.argument('exclude_private_key', arg_type=get_three_state_flag(), + help='Import private key from key vault or not. Default to be false.', default=False) + c.argument('certificate_file', help='A file path for the public certificate to be uploaded') with self.argument_context('spring-cloud app custom-domain') as c: c.argument('service', service_name_type) diff --git a/src/spring-cloud/azext_spring_cloud/commands.py b/src/spring-cloud/azext_spring_cloud/commands.py index aeb44a19027..7249f2cc48e 100644 --- a/src/spring-cloud/azext_spring_cloud/commands.py +++ b/src/spring-cloud/azext_spring_cloud/commands.py @@ -108,6 +108,7 @@ def load_command_table(self, _): g.custom_show_command('show', 'certificate_show', table_transformer=transform_spring_cloud_certificate_output) g.custom_command('list', 'certificate_list', table_transformer=transform_spring_cloud_certificate_output) g.custom_command('remove', 'certificate_remove') + g.custom_command('list-reference-app', 'certiticate_list_reference_app', table_transformer=transform_app_table_output) with self.command_group('spring-cloud app custom-domain', client_factory=cf_spring_cloud, exception_handler=handle_asc_exception) as g: diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 0726912bd31..209df3dd7e9 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -6,6 +6,7 @@ # pylint: disable=unused-argument, logging-format-interpolation, protected-access, wrong-import-order, too-many-lines import requests import re +import os from azure.core.exceptions import HttpResponseError from azure.mgmt.cosmosdb import CosmosDBManagementClient @@ -20,10 +21,14 @@ from .vendored_sdks.appplatform.v2020_07_01 import models from .vendored_sdks.appplatform.v2020_11_01_preview import models as models_20201101preview from .vendored_sdks.appplatform.v2021_06_01_preview import models as models_20210601preview +from .vendored_sdks.appplatform.v2021_09_01_preview import models as models_20210901preview from .vendored_sdks.appplatform.v2020_07_01.models import _app_platform_management_client_enums as AppPlatformEnums from .vendored_sdks.appplatform.v2020_11_01_preview import ( AppPlatformManagementClient as AppPlatformManagementClient_20201101preview ) +from .vendored_sdks.appplatform.v2021_09_01_preview import ( + AppPlatformManagementClient as AppPlatformManagementClient_20210901preview +) from knack.log import get_logger from .azure_storage_file import FileService from azure.cli.core.azclierror import InvalidArgumentValueError, RequiredArgumentMissingError @@ -41,6 +46,7 @@ from threading import Timer import sys import json +import base64 from collections import defaultdict logger = get_logger(__name__) @@ -254,25 +260,38 @@ def app_create(cmd, client, resource_group, service, name, jvm_options=None, env=None, enable_persistent_storage=None, - assign_identity=None): + assign_identity=None, + loaded_certificates_file=None): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) cpu = validate_cpu(cpu) memory = validate_memory(memory) apps = _get_all_apps(client, resource_group, service) if name in apps: raise CLIError("App '{}' already exists.".format(name)) logger.warning("[1/4] Creating app with name '{}'".format(name)) - properties = models_20210601preview.AppResourceProperties() - properties.temporary_disk = models_20210601preview.TemporaryDisk( + properties = models_20210901preview.AppResourceProperties() + properties.temporary_disk = models_20210901preview.TemporaryDisk( size_in_gb=5, mount_path="/tmp") resource = client.services.get(resource_group, service) _validate_instance_count(resource.sku.tier, instance_count) - app_resource = models_20210601preview.AppResource() + if loaded_certificates_file is not None: + input_file = open(loaded_certificates_file) + data = json.load(input_file) + loaded_certificates = [] + + for item in data['loadedCertificates']: + loaded_certificates.append(models_20210901preview. + LoadedCertificate(resource_id=item['resourceId'], + load_trust_store=item['loadTrustStore'])) + properties.loaded_certificates=loaded_certificates + + app_resource = models_20210901preview.AppResource() app_resource.properties = properties app_resource.location = resource.location if assign_identity is True: - app_resource.identity = models_20210601preview.ManagedIdentityProperties(type="systemassigned") + app_resource.identity = models_20210901preview.ManagedIdentityProperties(type="systemassigned") poller = client.apps.begin_create_or_update( resource_group, service, name, app_resource) @@ -290,14 +309,14 @@ def app_create(cmd, client, resource_group, service, name, default_deployment_resource) logger.warning("[3/4] Setting default deployment to production") - properties = models_20210601preview.AppResourceProperties( + properties = models_20210901preview.AppResourceProperties( active_deployment_name=DEFAULT_DEPLOYMENT_NAME, public=assign_endpoint) if enable_persistent_storage: - properties.persistent_disk = models_20210601preview.PersistentDisk( + properties.persistent_disk = models_20210901preview.PersistentDisk( size_in_gb=_get_persistent_disk_size(resource.sku.tier), mount_path="/persistent") else: - properties.persistent_disk = models_20210601preview.PersistentDisk( + properties.persistent_disk = models_20210901preview.PersistentDisk( size_in_gb=0, mount_path="/persistent") app_resource.properties = properties @@ -357,20 +376,33 @@ def app_update(cmd, client, resource_group, service, name, env=None, enable_persistent_storage=None, https_only=None, - enable_end_to_end_tls=None): + enable_end_to_end_tls=None, + loaded_certificates_file=None): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) _check_active_deployment_exist(client, resource_group, service, name) resource = client.services.get(resource_group, service) location = resource.location - properties = models_20210601preview.AppResourceProperties(public=assign_endpoint, https_only=https_only, + properties = models_20210901preview.AppResourceProperties(public=assign_endpoint, https_only=https_only, enable_end_to_end_tls=enable_end_to_end_tls) if enable_persistent_storage is True: - properties.persistent_disk = models_20210601preview.PersistentDisk( + properties.persistent_disk = models_20210901preview.PersistentDisk( size_in_gb=_get_persistent_disk_size(resource.sku.tier), mount_path="/persistent") if enable_persistent_storage is False: - properties.persistent_disk = models_20210601preview.PersistentDisk(size_in_gb=0) + properties.persistent_disk = models_20210901preview.PersistentDisk(size_in_gb=0) - app_resource = models_20210601preview.AppResource() + if loaded_certificates_file is not None: + input_file = open(loaded_certificates_file) + data = json.load(input_file) + loaded_certificates = [] + + for item in data['loadedCertificates']: + loaded_certificates.append(models_20210901preview. + LoadedCertificate(resource_id=item['resourceId'], + load_trust_store=item['loadTrustStore'])) + properties.loaded_certificates=loaded_certificates + + app_resource = models_20210901preview.AppResource() app_resource.properties = properties app_resource.location = location @@ -392,14 +424,14 @@ def app_update(cmd, client, resource_group, service, name, return app_updated logger.warning("[2/2] Updating deployment '{}'".format(deployment)) - deployment_settings = models_20210601preview.DeploymentSettings( + deployment_settings = models_20210901preview.DeploymentSettings( environment_variables=env, jvm_options=jvm_options, net_core_main_entry_path=main_entry, runtime_version=runtime_version,) deployment_settings.cpu = None deployment_settings.memory_in_gb = None - properties = models_20210601preview.DeploymentResourceProperties( + properties = models_20210901preview.DeploymentResourceProperties( deployment_settings=deployment_settings) deployment_resource = models.DeploymentResource(properties=properties) poller = client.deployments.begin_update( @@ -472,6 +504,7 @@ def app_restart(cmd, client, def app_list(cmd, client, resource_group, service): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) apps = list(client.apps.list(resource_group, service)) deployments = list( client.deployments.list_for_cluster(resource_group, service)) @@ -488,6 +521,7 @@ def app_get(cmd, client, resource_group, service, name): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) app = client.apps.get(resource_group, service, name) deployment_name = app.properties.active_deployment_name if deployment_name: @@ -1532,31 +1566,62 @@ def iter_lines(response, limit=2**20): exceptions.append(e) -def certificate_add(cmd, client, resource_group, service, name, vault_uri, vault_certificate_name): - properties = models.CertificateProperties( - vault_uri=vault_uri, - key_vault_cert_name=vault_certificate_name - ) +def certificate_add(cmd, resource_group, service, name, exclude_private_key=None, + vault_uri=None, vault_certificate_name=None, certificate_file=None): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) + if vault_uri is None and certificate_file is None: + raise CLIError("Neither vault-uri nor certificate-file is provided") + if vault_uri is not None and certificate_file is not None: + raise CLIError("Both vault-uri and certificate-file are provided") + if vault_uri is not None: + if vault_certificate_name is None: + raise CLIError("Parameter vault-certificate-name should be provided for Key Vault Certificate") + properties = models_20210901preview.KeyVaultCertificateProperties( + type="KeyVaultCertificate", + vault_uri=vault_uri, + key_vault_cert_name=vault_certificate_name, + exclude_private_key=exclude_private_key + ) + else: + if os.path.exists(certificate_file): + try: + with open(certificate_file, 'rb') as input_file: + logger.debug("attempting to read file %s as binary", certificate_file) + content = base64.b64encode(input_file.read()).decode("utf-8") + except Exception: + raise CLIError('Failed to decode file {} - unknown decoding'.format(certificate_file)) + else: + raise CLIError("certificate_file %s could not be found", certificate_file) + properties = models_20210901preview.ContentCertificateProperties( + type="ContentCertificate", + content=content + ) certificate_resource = models.CertificateResource(properties=properties) return client.certificates.begin_create_or_update( resource_group_name=resource_group, service_name=service, certificate_name=name, - certificate_resource=certificate_resource) - + certificate_resource=certificate_resource + ) -def certificate_show(cmd, client, resource_group, service, name): +def certificate_show(cmd, resource_group, service, name): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) return client.certificates.get(resource_group, service, name) -def certificate_list(cmd, client, resource_group, service): +def certificate_list(cmd, resource_group, service): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) return client.certificates.list(resource_group, service) -def certificate_remove(cmd, client, resource_group, service, name): +def certificate_remove(cmd, resource_group, service, name): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) client.certificates.get(resource_group, service, name) return client.certificates.begin_delete(resource_group, service, name) +def certificate_list_reference_app(): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) + def domain_bind(cmd, client, resource_group, service, app, domain_name, From d60c93a7852c3e411490411c8f7ea682af953a05 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Mon, 11 Oct 2021 14:25:16 +0800 Subject: [PATCH 02/26] without test --- .../azext_spring_cloud/_params.py | 10 +++- .../azext_spring_cloud/commands.py | 3 +- src/spring-cloud/azext_spring_cloud/custom.py | 56 +++++++++++++++++-- 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/_params.py b/src/spring-cloud/azext_spring_cloud/_params.py index 962cd6895ac..d6ae74e1905 100644 --- a/src/spring-cloud/azext_spring_cloud/_params.py +++ b/src/spring-cloud/azext_spring_cloud/_params.py @@ -119,7 +119,8 @@ def load_arguments(self, _): help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') c.argument('instance_count', type=int, default=1, help='Number of instance.', validator=validate_instance_count) - c.argument('loaded-certificates-file', help='A json file path for the certificates which would be loaded to app') + c.argument('loaded_certificates_file', + help='A json file path for the certificates which would be loaded to app') with self.argument_context('spring-cloud app update') as c: c.argument('assign_endpoint', arg_type=get_three_state_flag(), @@ -127,7 +128,8 @@ def load_arguments(self, _): options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access app via https', default=False) c.argument('enable_end_to_end_tls', arg_type=get_three_state_flag(), help='If true, enable end to end tls') - c.argument('loaded-certificates-file', help='A json file path for the certificates which would be loaded to app') + c.argument('loaded_certificates_file', + help='A json file path for the certificates which would be loaded to app') for scope in ['spring-cloud app update', 'spring-cloud app start', 'spring-cloud app stop', 'spring-cloud app restart', 'spring-cloud app deploy', 'spring-cloud app scale', 'spring-cloud app set-deployment', 'spring-cloud app show-deploy-log']: with self.argument_context(scope) as c: @@ -247,6 +249,10 @@ def prepare_logs_argument(c): c.argument('key', help='Api key of the service.') c.argument('disable_ssl', arg_type=get_three_state_flag(), help='If true, disable SSL. If false, enable SSL.', default=False) + with self.argument_context('spring-cloud app append-loaded-certificate') as c: + c.argument('certificate_name', help='Name of the certificate to be appended') + c.argument('load_trust_store', arg_type=get_three_state_flag(), help='If true, the certificate would be loaded into trust store for Java applications', default=False) + with self.argument_context('spring-cloud config-server set') as c: c.argument('config_file', help='A yaml file path for the configuration of Spring Cloud config server') diff --git a/src/spring-cloud/azext_spring_cloud/commands.py b/src/spring-cloud/azext_spring_cloud/commands.py index 7249f2cc48e..c5c0558ea06 100644 --- a/src/spring-cloud/azext_spring_cloud/commands.py +++ b/src/spring-cloud/azext_spring_cloud/commands.py @@ -69,6 +69,7 @@ def load_command_table(self, _): g.custom_command('stop', 'app_stop', supports_no_wait=True) g.custom_command('restart', 'app_restart', supports_no_wait=True) g.custom_command('logs', 'app_tail_log') + g.custom_command('append-loaded-certificate', 'app_append_loaded_certificate', table_transformer=transform_app_table_output) with self.command_group('spring-cloud app identity', client_factory=cf_spring_cloud, exception_handler=handle_asc_exception) as g: @@ -108,7 +109,7 @@ def load_command_table(self, _): g.custom_show_command('show', 'certificate_show', table_transformer=transform_spring_cloud_certificate_output) g.custom_command('list', 'certificate_list', table_transformer=transform_spring_cloud_certificate_output) g.custom_command('remove', 'certificate_remove') - g.custom_command('list-reference-app', 'certiticate_list_reference_app', table_transformer=transform_app_table_output) + g.custom_command('list-reference-app', 'certificate_list_reference_app', table_transformer=transform_app_table_output) with self.command_group('spring-cloud app custom-domain', client_factory=cf_spring_cloud, exception_handler=handle_asc_exception) as g: diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 209df3dd7e9..5f95731eeaa 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -282,8 +282,9 @@ def app_create(cmd, client, resource_group, service, name, loaded_certificates = [] for item in data['loadedCertificates']: + certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) loaded_certificates.append(models_20210901preview. - LoadedCertificate(resource_id=item['resourceId'], + LoadedCertificate(resource_id=certificate_resource.resourceId, load_trust_store=item['loadTrustStore'])) properties.loaded_certificates=loaded_certificates @@ -397,8 +398,9 @@ def app_update(cmd, client, resource_group, service, name, loaded_certificates = [] for item in data['loadedCertificates']: + certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) loaded_certificates.append(models_20210901preview. - LoadedCertificate(resource_id=item['resourceId'], + LoadedCertificate(resource_id=certificate_resource.resourceId, load_trust_store=item['loadTrustStore'])) properties.loaded_certificates=loaded_certificates @@ -783,6 +785,43 @@ def app_unset_deployment(cmd, client, resource_group, service, name): return client.apps.begin_update(resource_group, service, name, app_resource) +def app_append_loaded_certificate(cmd, client, resource_group, service, name, certificate_name, load_trust_store): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) + _check_active_deployment_exist(client, resource_group, service, name) + + appResource = client.apps.get(resource_group, service, name) + certificateResource = client.certificates.get(resource_group, service, certificate_name) + certificateResourceId = certificateResource.id + + loadedCertificates = appResource.properties.loaded_certificates + + for loadedCertificate in loadedCertificates: + if loadedCertificate.resource_id == certificateResource.id: + raise CLIError("The certificate has been loaded.") + + loadedCertificate.append(models_20210901preview. + LoadedCertificate(resource_id=certificateResourceId, + load_trust_store=load_trust_store)) + properties = models_20210901preview.AppResourceProperties(public=assign_endpoint, https_only=https_only, + enable_end_to_end_tls=enable_end_to_end_tls) + app_resource.properties.loaded_certificates = loadedCertificates + + poller = client.apps.begin_update( + resource_group, service, name, app_resource) + while poller.done() is False: + sleep(APP_CREATE_OR_UPDATE_SLEEP_INTERVAL) + + app_updated = client.apps.get(resource_group, service, name) + + deployment_name = app_updated.properties.active_deployment_name + if deployment_name: + deployment = client.deployments.get( + resource_group, service, name, deployment_name) + app_updated.properties.active_deployment = deployment + else: + logger.warning(NO_PRODUCTION_DEPLOYMENT_SET_ERROR) + + return app_updated def deployment_create(cmd, client, resource_group, service, app, name, skip_clone_settings=False, @@ -1619,9 +1658,18 @@ def certificate_remove(cmd, resource_group, service, name): client.certificates.get(resource_group, service, name) return client.certificates.begin_delete(resource_group, service, name) -def certificate_list_reference_app(): +def certificate_list_reference_app(cmd, resource_group, service, name): client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) - + apps = app_list(cmd, client, resource_group, service) + reference_apps = [] + certificateResource = client.certificates.get(resource_group, service, name) + certificateResourceId = certificateResource.id + for app in apps: + for load_certificate in app.properties.loaded_certificates: + if load_certificate.resource_id == certificateResourceId: + reference_apps.append(app) + break + return reference_apps def domain_bind(cmd, client, resource_group, service, app, domain_name, From bf6e1f8f2d4f35611b72337742ee4317d0a54946 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Mon, 11 Oct 2021 15:45:02 +0800 Subject: [PATCH 03/26] pass simple test --- .../azext_spring_cloud/_params.py | 4 +- src/spring-cloud/azext_spring_cloud/custom.py | 67 ++++++++++--------- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/_params.py b/src/spring-cloud/azext_spring_cloud/_params.py index d6ae74e1905..279522402d2 100644 --- a/src/spring-cloud/azext_spring_cloud/_params.py +++ b/src/spring-cloud/azext_spring_cloud/_params.py @@ -119,7 +119,7 @@ def load_arguments(self, _): help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') c.argument('instance_count', type=int, default=1, help='Number of instance.', validator=validate_instance_count) - c.argument('loaded_certificates_file', + c.argument('loaded_certificates_file', type=str, help='A json file path for the certificates which would be loaded to app') with self.argument_context('spring-cloud app update') as c: @@ -128,7 +128,7 @@ def load_arguments(self, _): options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access app via https', default=False) c.argument('enable_end_to_end_tls', arg_type=get_three_state_flag(), help='If true, enable end to end tls') - c.argument('loaded_certificates_file', + c.argument('loaded_certificates_file', type=str, help='A json file path for the certificates which would be loaded to app') for scope in ['spring-cloud app update', 'spring-cloud app start', 'spring-cloud app stop', 'spring-cloud app restart', 'spring-cloud app deploy', 'spring-cloud app scale', 'spring-cloud app set-deployment', 'spring-cloud app show-deploy-log']: diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 5f95731eeaa..b92f37f0ff9 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -272,9 +272,13 @@ def app_create(cmd, client, resource_group, service, name, properties = models_20210901preview.AppResourceProperties() properties.temporary_disk = models_20210901preview.TemporaryDisk( size_in_gb=5, mount_path="/tmp") - resource = client.services.get(resource_group, service) - _validate_instance_count(resource.sku.tier, instance_count) + if enable_persistent_storage: + properties.persistent_disk = models_20210901preview.PersistentDisk( + size_in_gb=_get_persistent_disk_size(resource.sku.tier), mount_path="/persistent") + else: + properties.persistent_disk = models_20210901preview.PersistentDisk( + size_in_gb=0, mount_path="/persistent") if loaded_certificates_file is not None: input_file = open(loaded_certificates_file) @@ -284,10 +288,14 @@ def app_create(cmd, client, resource_group, service, name, for item in data['loadedCertificates']: certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) loaded_certificates.append(models_20210901preview. - LoadedCertificate(resource_id=certificate_resource.resourceId, + LoadedCertificate(resource_id=certificate_resource.id, load_trust_store=item['loadTrustStore'])) properties.loaded_certificates=loaded_certificates + resource = client.services.get(resource_group, service) + + _validate_instance_count(resource.sku.tier, instance_count) + app_resource = models_20210901preview.AppResource() app_resource.properties = properties app_resource.location = resource.location @@ -310,17 +318,9 @@ def app_create(cmd, client, resource_group, service, name, default_deployment_resource) logger.warning("[3/4] Setting default deployment to production") - properties = models_20210901preview.AppResourceProperties( - active_deployment_name=DEFAULT_DEPLOYMENT_NAME, public=assign_endpoint) - if enable_persistent_storage: - properties.persistent_disk = models_20210901preview.PersistentDisk( - size_in_gb=_get_persistent_disk_size(resource.sku.tier), mount_path="/persistent") - else: - properties.persistent_disk = models_20210901preview.PersistentDisk( - size_in_gb=0, mount_path="/persistent") - - app_resource.properties = properties + app_resource.properties.active_deployment_name=DEFAULT_DEPLOYMENT_NAME + app_resource.properties.public=assign_endpoint app_resource.location = resource.location app_poller = client.apps.begin_update(resource_group, service, name, app_resource) @@ -400,7 +400,7 @@ def app_update(cmd, client, resource_group, service, name, for item in data['loadedCertificates']: certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) loaded_certificates.append(models_20210901preview. - LoadedCertificate(resource_id=certificate_resource.resourceId, + LoadedCertificate(resource_id=certificate_resource.id, load_trust_store=item['loadTrustStore'])) properties.loaded_certificates=loaded_certificates @@ -789,22 +789,21 @@ def app_append_loaded_certificate(cmd, client, resource_group, service, name, ce client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) _check_active_deployment_exist(client, resource_group, service, name) - appResource = client.apps.get(resource_group, service, name) - certificateResource = client.certificates.get(resource_group, service, certificate_name) - certificateResourceId = certificateResource.id + app_resource = client.apps.get(resource_group, service, name) + certificate_resource = client.certificates.get(resource_group, service, certificate_name) + certificate_resource_id = certificate_resource.id - loadedCertificates = appResource.properties.loaded_certificates + loaded_certificates = app_resource.properties.loaded_certificates - for loadedCertificate in loadedCertificates: - if loadedCertificate.resource_id == certificateResource.id: + for loaded_certificate in loaded_certificates: + if loaded_certificate.resource_id == certificate_resource.id: raise CLIError("The certificate has been loaded.") - loadedCertificate.append(models_20210901preview. - LoadedCertificate(resource_id=certificateResourceId, + loaded_certificates.append(models_20210901preview. + LoadedCertificate(resource_id=certificate_resource_id, load_trust_store=load_trust_store)) - properties = models_20210901preview.AppResourceProperties(public=assign_endpoint, https_only=https_only, - enable_end_to_end_tls=enable_end_to_end_tls) - app_resource.properties.loaded_certificates = loadedCertificates + + app_resource.properties.loaded_certificates = loaded_certificates poller = client.apps.begin_update( resource_group, service, name, app_resource) @@ -1660,15 +1659,23 @@ def certificate_remove(cmd, resource_group, service, name): def certificate_list_reference_app(cmd, resource_group, service, name): client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) - apps = app_list(cmd, client, resource_group, service) + + apps = list(client.apps.list(resource_group, service)) + deployments = list( + client.deployments.list_for_cluster(resource_group, service)) reference_apps = [] - certificateResource = client.certificates.get(resource_group, service, name) - certificateResourceId = certificateResource.id + certificate_resource = client.certificates.get(resource_group, service, name) + certificate_resource_id = certificate_resource.id for app in apps: - for load_certificate in app.properties.loaded_certificates: - if load_certificate.resource_id == certificateResourceId: + for load_certificate in app.properties.loaded_certificates or []: + if load_certificate.resource_id == certificate_resource_id: reference_apps.append(app) break + for app in reference_apps: + if app.properties.active_deployment_name: + deployment = next( + (x for x in deployments if x.properties.app_name == app.name)) + app.properties.active_deployment = deployment return reference_apps def domain_bind(cmd, client, resource_group, service, app, From af9bf685cf4580b8203a4b3a73c15c5061e2a367 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 12 Oct 2021 11:20:10 +0800 Subject: [PATCH 04/26] further update --- .../azext_spring_cloud/_client_factory.py | 7 + .../azext_spring_cloud/commands.py | 5 +- src/spring-cloud/azext_spring_cloud/custom.py | 123 +++++++++++------- 3 files changed, 87 insertions(+), 48 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/_client_factory.py b/src/spring-cloud/azext_spring_cloud/_client_factory.py index 90b0fbb4ec4..d097070d603 100644 --- a/src/spring-cloud/azext_spring_cloud/_client_factory.py +++ b/src/spring-cloud/azext_spring_cloud/_client_factory.py @@ -11,6 +11,9 @@ from .vendored_sdks.appplatform.v2021_06_01_preview import ( AppPlatformManagementClient as AppPlatformManagementClient_20210601preview ) +from .vendored_sdks.appplatform.v2021_09_01_preview import ( + AppPlatformManagementClient as AppPlatformManagementClient_20210901preview +) def cf_spring_cloud(cli_ctx, *_): @@ -25,6 +28,10 @@ def cf_spring_cloud_20210601preview(cli_ctx, *_): return get_mgmt_service_client(cli_ctx, AppPlatformManagementClient_20210601preview) +def cf_spring_cloud_20210901preview(cli_ctx, *_): + return get_mgmt_service_client(cli_ctx, AppPlatformManagementClient_20210901preview) + + def cf_resource_groups(cli_ctx, subscription_id=None): return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, subscription_id=subscription_id).resource_groups diff --git a/src/spring-cloud/azext_spring_cloud/commands.py b/src/spring-cloud/azext_spring_cloud/commands.py index c5c0558ea06..89efc719381 100644 --- a/src/spring-cloud/azext_spring_cloud/commands.py +++ b/src/spring-cloud/azext_spring_cloud/commands.py @@ -10,6 +10,7 @@ cf_spring_cloud, cf_spring_cloud_20201101preview, cf_spring_cloud_20210601preview, + cf_spring_cloud_20210901preview, cf_config_servers) from ._transformers import (transform_spring_cloud_table_output, transform_app_table_output, @@ -69,7 +70,7 @@ def load_command_table(self, _): g.custom_command('stop', 'app_stop', supports_no_wait=True) g.custom_command('restart', 'app_restart', supports_no_wait=True) g.custom_command('logs', 'app_tail_log') - g.custom_command('append-loaded-certificate', 'app_append_loaded_certificate', table_transformer=transform_app_table_output) + g.custom_command('append-loaded-certificate', 'app_append_loaded_certificate') with self.command_group('spring-cloud app identity', client_factory=cf_spring_cloud, exception_handler=handle_asc_exception) as g: @@ -103,7 +104,7 @@ def load_command_table(self, _): g.custom_command('redis update', 'binding_redis_update') g.custom_show_command('remove', 'binding_remove') - with self.command_group('spring-cloud certificate', client_factory=cf_spring_cloud, + with self.command_group('spring-cloud certificate', client_factory=cf_spring_cloud_20210901preview, exception_handler=handle_asc_exception) as g: g.custom_command('add', 'certificate_add') g.custom_show_command('show', 'certificate_show', table_transformer=transform_spring_cloud_certificate_output) diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index b92f37f0ff9..e98e199c69c 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -12,7 +12,7 @@ from azure.mgmt.cosmosdb import CosmosDBManagementClient from azure.mgmt.redis import RedisManagementClient from requests.auth import HTTPBasicAuth -import yaml # pylint: disable=import-error +import yaml # pylint: disable=import-error from time import sleep from ._stream_utils import stream_logs from msrestazure.tools import parse_resource_id, is_valid_resource_id @@ -33,13 +33,14 @@ from .azure_storage_file import FileService from azure.cli.core.azclierror import InvalidArgumentValueError, RequiredArgumentMissingError from azure.cli.core.commands.client_factory import get_mgmt_service_client -from azure.cli.core.util import sdk_no_wait +from azure.cli.core.util import get_file_json, sdk_no_wait from azure.cli.core.profiles import ResourceType, get_sdk from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient from azure.cli.core.commands import cached_put from azure.core.exceptions import ResourceNotFoundError from ._utils import _get_rg_location from ._utils import _get_sku_name +# from ._utils import _try_load_file_object from ._resource_quantity import validate_cpu, validate_memory from six.moves.urllib import parse from threading import Thread @@ -248,7 +249,8 @@ def list_keys(cmd, client, resource_group, name, app=None, deployment=None): # pylint: disable=redefined-builtin def regenerate_keys(cmd, client, resource_group, name, type): - return client.services.regenerate_test_key(resource_group, name, models.RegenerateTestKeyRequestPayload(key_type=type)) + return client.services.regenerate_test_key(resource_group, name, + models.RegenerateTestKeyRequestPayload(key_type=type)) def app_create(cmd, client, resource_group, service, name, @@ -262,6 +264,7 @@ def app_create(cmd, client, resource_group, service, name, enable_persistent_storage=None, assign_identity=None, loaded_certificates_file=None): + client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) cpu = validate_cpu(cpu) memory = validate_memory(memory) @@ -280,17 +283,21 @@ def app_create(cmd, client, resource_group, service, name, properties.persistent_disk = models_20210901preview.PersistentDisk( size_in_gb=0, mount_path="/persistent") - if loaded_certificates_file is not None: - input_file = open(loaded_certificates_file) - data = json.load(input_file) + if loaded_certificates_file is not None and os.path.isfile(loaded_certificates_file): + data = get_file_json(loaded_certificates_file, throw_on_empty=False) loaded_certificates = [] - - for item in data['loadedCertificates']: - certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) - loaded_certificates.append(models_20210901preview. - LoadedCertificate(resource_id=certificate_resource.id, - load_trust_store=item['loadTrustStore'])) - properties.loaded_certificates=loaded_certificates + if data: + for item in data['loadedCertificates']: + certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) + loaded_certificates.append(models_20210901preview. + LoadedCertificate(resource_id=certificate_resource.id, + load_trust_store=item['loadTrustStore'])) + # for item in data['loadedCertificates']: + # certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) + # loaded_certificates.append(models_20210901preview. + # LoadedCertificate(resource_id=certificate_resource.id, + # load_trust_store=item['loadTrustStore'])) + properties.loaded_certificates = loaded_certificates resource = client.services.get(resource_group, service) @@ -310,7 +317,8 @@ def app_create(cmd, client, resource_group, service, name, # create default deployment logger.warning( "[2/4] Creating default deployment with name '{}'".format(DEFAULT_DEPLOYMENT_NAME)) - default_deployment_resource = _default_deployment_resource_builder(cpu, memory, env, jvm_options, runtime_version, instance_count) + default_deployment_resource = _default_deployment_resource_builder(cpu, memory, env, jvm_options, runtime_version, + instance_count) poller = client.deployments.begin_create_or_update(resource_group, service, name, @@ -319,8 +327,8 @@ def app_create(cmd, client, resource_group, service, name, logger.warning("[3/4] Setting default deployment to production") - app_resource.properties.active_deployment_name=DEFAULT_DEPLOYMENT_NAME - app_resource.properties.public=assign_endpoint + app_resource.properties.active_deployment_name = DEFAULT_DEPLOYMENT_NAME + app_resource.properties.public = assign_endpoint app_resource.location = resource.location app_poller = client.apps.begin_update(resource_group, service, name, app_resource) @@ -392,17 +400,27 @@ def app_update(cmd, client, resource_group, service, name, if enable_persistent_storage is False: properties.persistent_disk = models_20210901preview.PersistentDisk(size_in_gb=0) - if loaded_certificates_file is not None: - input_file = open(loaded_certificates_file) - data = json.load(input_file) + # if loaded_certificates_file is not None: + # input_file = open(loaded_certificates_file) + # data = json.load(input_file) + # loaded_certificates = [] + # + # for item in data['loadedCertificates']: + # certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) + # loaded_certificates.append(models_20210901preview. + # LoadedCertificate(resource_id=certificate_resource.id, + # load_trust_store=item['loadTrustStore'])) + if loaded_certificates_file is not None and os.path.isfile(loaded_certificates_file): + data = get_file_json(loaded_certificates_file, throw_on_empty=False) loaded_certificates = [] + if data: + for item in data['loadedCertificates']: + certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) + loaded_certificates.append(models_20210901preview. + LoadedCertificate(resource_id=certificate_resource.id, + load_trust_store=item['loadTrustStore'])) - for item in data['loadedCertificates']: - certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) - loaded_certificates.append(models_20210901preview. - LoadedCertificate(resource_id=certificate_resource.id, - load_trust_store=item['loadTrustStore'])) - properties.loaded_certificates=loaded_certificates + properties.loaded_certificates = loaded_certificates app_resource = models_20210901preview.AppResource() app_resource.properties = properties @@ -430,7 +448,7 @@ def app_update(cmd, client, resource_group, service, name, environment_variables=env, jvm_options=jvm_options, net_core_main_entry_path=main_entry, - runtime_version=runtime_version,) + runtime_version=runtime_version, ) deployment_settings.cpu = None deployment_settings.memory_in_gb = None properties = models_20210901preview.DeploymentResourceProperties( @@ -649,7 +667,9 @@ def app_tail_log(cmd, client, resource_group, service, name, test_keys = client.services.list_test_keys(resource_group, service) primary_key = test_keys.primary_key if not primary_key: - raise CLIError("To use the log streaming feature, please enable the test endpoint by running 'az spring-cloud test-endpoint enable -n {0} -g {1}'".format(service, resource_group)) + raise CLIError( + "To use the log streaming feature, please enable the test endpoint by running 'az spring-cloud test-endpoint enable -n {0} -g {1}'".format( + service, resource_group)) # https://primary:xxxx[key]@servicename.test.azuremicrosoervice.io -> servicename.azuremicroservice.io test_url = test_keys.primary_test_endpoint @@ -785,6 +805,7 @@ def app_unset_deployment(cmd, client, resource_group, service, name): return client.apps.begin_update(resource_group, service, name, app_resource) + def app_append_loaded_certificate(cmd, client, resource_group, service, name, certificate_name, load_trust_store): client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) _check_active_deployment_exist(client, resource_group, service, name) @@ -793,11 +814,11 @@ def app_append_loaded_certificate(cmd, client, resource_group, service, name, ce certificate_resource = client.certificates.get(resource_group, service, certificate_name) certificate_resource_id = certificate_resource.id - loaded_certificates = app_resource.properties.loaded_certificates + loaded_certificates = app_resource.properties.loaded_certificates or [] for loaded_certificate in loaded_certificates: if loaded_certificate.resource_id == certificate_resource.id: - raise CLIError("The certificate has been loaded.") + raise CLIError("This certificate has already been loaded.") loaded_certificates.append(models_20210901preview. LoadedCertificate(resource_id=certificate_resource_id, @@ -822,6 +843,7 @@ def app_append_loaded_certificate(cmd, client, resource_group, service, name, ce return app_updated + def deployment_create(cmd, client, resource_group, service, app, name, skip_clone_settings=False, version=None, @@ -928,7 +950,9 @@ def validate_config_server_settings(client, resource_group, name, config_server_ try: result = sdk_no_wait(False, client.begin_validate, resource_group, name, config_server_settings).result() except Exception as err: # pylint: disable=broad-except - raise CLIError("{0}. You may raise a support ticket if needed by the following link: https://docs.microsoft.com/azure/spring-cloud/spring-cloud-faq?pivots=programming-language-java#how-can-i-provide-feedback-and-report-issues".format(err)) + raise CLIError( + "{0}. You may raise a support ticket if needed by the following link: https://docs.microsoft.com/azure/spring-cloud/spring-cloud-faq?pivots=programming-language-java#how-can-i-provide-feedback-and-report-issues".format( + err)) if not result.is_valid: for item in result.details or []: @@ -1392,11 +1416,14 @@ def _app_deploy(client, resource_group, service, app, name, version, path, runti if file_type is None: # update means command is az spring-cloud app deploy xxx if update: - raise RequiredArgumentMissingError("One of the following arguments are required: '--artifact-path' or '--source-path'") + raise RequiredArgumentMissingError( + "One of the following arguments are required: '--artifact-path' or '--source-path'") # if command is az spring-cloud app deployment create xxx, create default deployment else: - logger.warning("Creating default deployment without artifact/source folder. Please specify the --artifact-path/--source-path argument explicitly if needed.") - default_deployment_resource = _default_deployment_resource_builder(cpu, memory, env, jvm_options, runtime_version, instance_count) + logger.warning( + "Creating default deployment without artifact/source folder. Please specify the --artifact-path/--source-path argument explicitly if needed.") + default_deployment_resource = _default_deployment_resource_builder(cpu, memory, env, jvm_options, + runtime_version, instance_count) return sdk_no_wait(no_wait, client.deployments.begin_create_or_update, resource_group, service, app, name, default_deployment_resource) upload_url = None @@ -1552,7 +1579,7 @@ def format_line(line): return format_line - def iter_lines(response, limit=2**20): + def iter_lines(response, limit=2 ** 20): ''' Returns a line iterator from the response content. If no line ending was found and the buffered content size is larger than the limit, the buffer will be yielded directly. @@ -1604,9 +1631,8 @@ def iter_lines(response, limit=2**20): exceptions.append(e) -def certificate_add(cmd, resource_group, service, name, exclude_private_key=None, +def certificate_add(cmd, client, resource_group, service, name, exclude_private_key=None, vault_uri=None, vault_certificate_name=None, certificate_file=None): - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) if vault_uri is None and certificate_file is None: raise CLIError("Neither vault-uri nor certificate-file is provided") if vault_uri is not None and certificate_file is not None: @@ -1634,32 +1660,36 @@ def certificate_add(cmd, resource_group, service, name, exclude_private_key=None type="ContentCertificate", content=content ) - certificate_resource = models.CertificateResource(properties=properties) - return client.certificates.begin_create_or_update( + certificate_resource = models_20210901preview.CertificateResource(properties=properties) + # return client.certificates.begin_create_or_update( + # resource_group_name=resource_group, + # service_name=service, + # certificate_name=name, + # certificate_resource=certificate_resource + # ) + client.certificates.begin_create_or_update( resource_group_name=resource_group, service_name=service, certificate_name=name, certificate_resource=certificate_resource ) + return client.certificates.get(resource_group, service, name) -def certificate_show(cmd, resource_group, service, name): - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) + +def certificate_show(cmd, client, resource_group, service, name): return client.certificates.get(resource_group, service, name) -def certificate_list(cmd, resource_group, service): - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) +def certificate_list(cmd, client, resource_group, service): return client.certificates.list(resource_group, service) -def certificate_remove(cmd, resource_group, service, name): - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) +def certificate_remove(cmd, client, resource_group, service, name): client.certificates.get(resource_group, service, name) return client.certificates.begin_delete(resource_group, service, name) -def certificate_list_reference_app(cmd, resource_group, service, name): - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) +def certificate_list_reference_app(cmd, client, resource_group, service, name): apps = list(client.apps.list(resource_group, service)) deployments = list( client.deployments.list_for_cluster(resource_group, service)) @@ -1678,6 +1708,7 @@ def certificate_list_reference_app(cmd, resource_group, service, name): app.properties.active_deployment = deployment return reference_apps + def domain_bind(cmd, client, resource_group, service, app, domain_name, certificate=None, From 55efe1e2cf73efb1f52b6405c9ed81b31845f8a0 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 12 Oct 2021 15:55:13 +0800 Subject: [PATCH 05/26] further update --- .../azext_spring_cloud/_params.py | 20 ++++--- .../azext_spring_cloud/commands.py | 2 +- src/spring-cloud/azext_spring_cloud/custom.py | 54 +++++++++++-------- 3 files changed, 46 insertions(+), 30 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/_params.py b/src/spring-cloud/azext_spring_cloud/_params.py index 279522402d2..2395bafc93b 100644 --- a/src/spring-cloud/azext_spring_cloud/_params.py +++ b/src/spring-cloud/azext_spring_cloud/_params.py @@ -119,8 +119,8 @@ def load_arguments(self, _): help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') c.argument('instance_count', type=int, default=1, help='Number of instance.', validator=validate_instance_count) - c.argument('loaded_certificates_file', type=str, - help='A json file path for the certificates which would be loaded to app') + c.argument('loaded_public_cert_file', type=str, + help='A json file path indicates the certificates which would be loaded to app') with self.argument_context('spring-cloud app update') as c: c.argument('assign_endpoint', arg_type=get_three_state_flag(), @@ -128,8 +128,8 @@ def load_arguments(self, _): options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access app via https', default=False) c.argument('enable_end_to_end_tls', arg_type=get_three_state_flag(), help='If true, enable end to end tls') - c.argument('loaded_certificates_file', type=str, - help='A json file path for the certificates which would be loaded to app') + c.argument('loaded_public_cert_file', type=str, + help='A json file path indicates the certificates which would be loaded to app') for scope in ['spring-cloud app update', 'spring-cloud app start', 'spring-cloud app stop', 'spring-cloud app restart', 'spring-cloud app deploy', 'spring-cloud app scale', 'spring-cloud app set-deployment', 'spring-cloud app show-deploy-log']: with self.argument_context(scope) as c: @@ -249,7 +249,7 @@ def prepare_logs_argument(c): c.argument('key', help='Api key of the service.') c.argument('disable_ssl', arg_type=get_three_state_flag(), help='If true, disable SSL. If false, enable SSL.', default=False) - with self.argument_context('spring-cloud app append-loaded-certificate') as c: + with self.argument_context('spring-cloud app append-loaded-public-cert') as c: c.argument('certificate_name', help='Name of the certificate to be appended') c.argument('load_trust_store', arg_type=get_three_state_flag(), help='If true, the certificate would be loaded into trust store for Java applications', default=False) @@ -294,9 +294,13 @@ def prepare_logs_argument(c): with self.argument_context('spring-cloud certificate add') as c: c.argument('vault_uri', help='The key vault uri where store the certificate') c.argument('vault_certificate_name', help='The certificate name in key vault') - c.argument('exclude_private_key', arg_type=get_three_state_flag(), - help='Import private key from key vault or not. Default to be false.', default=False) - c.argument('certificate_file', help='A file path for the public certificate to be uploaded') + c.argument('only_public_cert', arg_type=get_three_state_flag(), + help='If true, only import public certificate part from key vault.', default=False) + c.argument('public_cert_file', help='A file path for the public certificate to be uploaded') + + with self.argument_context('spring-cloud certificate list') as c: + c.argument('cert_type', help='Type of uploaded certificate', + arg_type=get_enum_type(['KeyVaultCertificate', 'ContentCertificate'])) with self.argument_context('spring-cloud app custom-domain') as c: c.argument('service', service_name_type) diff --git a/src/spring-cloud/azext_spring_cloud/commands.py b/src/spring-cloud/azext_spring_cloud/commands.py index 89efc719381..ee2f82a03c5 100644 --- a/src/spring-cloud/azext_spring_cloud/commands.py +++ b/src/spring-cloud/azext_spring_cloud/commands.py @@ -70,7 +70,7 @@ def load_command_table(self, _): g.custom_command('stop', 'app_stop', supports_no_wait=True) g.custom_command('restart', 'app_restart', supports_no_wait=True) g.custom_command('logs', 'app_tail_log') - g.custom_command('append-loaded-certificate', 'app_append_loaded_certificate') + g.custom_command('append-loaded-public-cert', 'app_append_loaded_public_cert') with self.command_group('spring-cloud app identity', client_factory=cf_spring_cloud, exception_handler=handle_asc_exception) as g: diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index e98e199c69c..48452852fa8 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -263,7 +263,7 @@ def app_create(cmd, client, resource_group, service, name, env=None, enable_persistent_storage=None, assign_identity=None, - loaded_certificates_file=None): + loaded_public_cert_file=None): client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) cpu = validate_cpu(cpu) @@ -283,8 +283,8 @@ def app_create(cmd, client, resource_group, service, name, properties.persistent_disk = models_20210901preview.PersistentDisk( size_in_gb=0, mount_path="/persistent") - if loaded_certificates_file is not None and os.path.isfile(loaded_certificates_file): - data = get_file_json(loaded_certificates_file, throw_on_empty=False) + if loaded_public_cert_file is not None and os.path.isfile(loaded_public_cert_file): + data = get_file_json(loaded_public_cert_file, throw_on_empty=False) loaded_certificates = [] if data: for item in data['loadedCertificates']: @@ -386,7 +386,7 @@ def app_update(cmd, client, resource_group, service, name, enable_persistent_storage=None, https_only=None, enable_end_to_end_tls=None, - loaded_certificates_file=None): + loaded_public_cert_file=None): client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) _check_active_deployment_exist(client, resource_group, service, name) resource = client.services.get(resource_group, service) @@ -400,8 +400,8 @@ def app_update(cmd, client, resource_group, service, name, if enable_persistent_storage is False: properties.persistent_disk = models_20210901preview.PersistentDisk(size_in_gb=0) - # if loaded_certificates_file is not None: - # input_file = open(loaded_certificates_file) + # if loaded_public_cert_file is not None: + # input_file = open(loaded_public_cert_file) # data = json.load(input_file) # loaded_certificates = [] # @@ -410,8 +410,8 @@ def app_update(cmd, client, resource_group, service, name, # loaded_certificates.append(models_20210901preview. # LoadedCertificate(resource_id=certificate_resource.id, # load_trust_store=item['loadTrustStore'])) - if loaded_certificates_file is not None and os.path.isfile(loaded_certificates_file): - data = get_file_json(loaded_certificates_file, throw_on_empty=False) + if loaded_public_cert_file is not None and os.path.isfile(loaded_public_cert_file): + data = get_file_json(loaded_public_cert_file, throw_on_empty=False) loaded_certificates = [] if data: for item in data['loadedCertificates']: @@ -806,7 +806,7 @@ def app_unset_deployment(cmd, client, resource_group, service, name): return client.apps.begin_update(resource_group, service, name, app_resource) -def app_append_loaded_certificate(cmd, client, resource_group, service, name, certificate_name, load_trust_store): +def app_append_loaded_public_cert(cmd, client, resource_group, service, name, certificate_name, load_trust_store): client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) _check_active_deployment_exist(client, resource_group, service, name) @@ -1631,11 +1631,11 @@ def iter_lines(response, limit=2 ** 20): exceptions.append(e) -def certificate_add(cmd, client, resource_group, service, name, exclude_private_key=None, - vault_uri=None, vault_certificate_name=None, certificate_file=None): - if vault_uri is None and certificate_file is None: +def certificate_add(cmd, client, resource_group, service, name, only_public_cert=None, + vault_uri=None, vault_certificate_name=None, public_cert_file=None): + if vault_uri is None and public_cert_file is None: raise CLIError("Neither vault-uri nor certificate-file is provided") - if vault_uri is not None and certificate_file is not None: + if vault_uri is not None and public_cert_file is not None: raise CLIError("Both vault-uri and certificate-file are provided") if vault_uri is not None: if vault_certificate_name is None: @@ -1644,18 +1644,18 @@ def certificate_add(cmd, client, resource_group, service, name, exclude_private_ type="KeyVaultCertificate", vault_uri=vault_uri, key_vault_cert_name=vault_certificate_name, - exclude_private_key=exclude_private_key + exclude_private_key=only_public_cert ) else: - if os.path.exists(certificate_file): + if os.path.exists(public_cert_file): try: - with open(certificate_file, 'rb') as input_file: - logger.debug("attempting to read file %s as binary", certificate_file) + with open(public_cert_file, 'rb') as input_file: + logger.debug("attempting to read file %s as binary", public_cert_file) content = base64.b64encode(input_file.read()).decode("utf-8") except Exception: - raise CLIError('Failed to decode file {} - unknown decoding'.format(certificate_file)) + raise CLIError('Failed to decode file {} - unknown decoding'.format(public_cert_file)) else: - raise CLIError("certificate_file %s could not be found", certificate_file) + raise CLIError("public_cert_file %s could not be found", public_cert_file) properties = models_20210901preview.ContentCertificateProperties( type="ContentCertificate", content=content @@ -1680,8 +1680,20 @@ def certificate_show(cmd, client, resource_group, service, name): return client.certificates.get(resource_group, service, name) -def certificate_list(cmd, client, resource_group, service): - return client.certificates.list(resource_group, service) +def certificate_list(cmd, client, resource_group, service, cert_type=None): + certificates = list(client.certificates.list(resource_group, service)) + certificates_to_list = [] + if cert_type is None: + certificates_to_list = certificates + elif cert_type == 'KeyVaultCertificate': + for certificate in certificates: + if certificate.properties.type == 'KeyVaultCertificate': + certificates_to_list.append(certificate) + elif cert_type == 'ContentCertificate': + for certificate in certificates: + if certificate.properties.type == 'ContentCertificate': + certificates_to_list.append(certificate) + return certificates_to_list def certificate_remove(cmd, client, resource_group, service, name): From c2f397ea3666773d778871a43137951463734eea Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Mon, 18 Oct 2021 13:12:32 +0800 Subject: [PATCH 06/26] workaround to create api response payload type missing --- src/spring-cloud/azext_spring_cloud/custom.py | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 48452852fa8..b314ad40d1a 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -1661,19 +1661,35 @@ def certificate_add(cmd, client, resource_group, service, name, only_public_cert content=content ) certificate_resource = models_20210901preview.CertificateResource(properties=properties) - # return client.certificates.begin_create_or_update( + + def callback(pipeline_response, deserialized, headers): + return models_20210901preview.CertificateResource.deserialize(json.loads(pipeline_response.http_response.text())) + + return client.certificates.begin_create_or_update( + resource_group_name=resource_group, + service_name=service, + certificate_name=name, + certificate_resource=certificate_resource, + cls=callback + ) + + # poller = client.certificates.begin_create_or_update( # resource_group_name=resource_group, # service_name=service, # certificate_name=name, # certificate_resource=certificate_resource # ) - client.certificates.begin_create_or_update( - resource_group_name=resource_group, - service_name=service, - certificate_name=name, - certificate_resource=certificate_resource - ) - return client.certificates.get(resource_group, service, name) + # + # return client.certificates.begin_create_or_update( + # resource_group_name=resource_group, + # service_name=service, + # certificate_name=name, + # certificate_resource=certificate_resource, + # continuation_token=poller.continuation_token() + # ) + + + # return client.certificates.get(resource_group, service, name) def certificate_show(cmd, client, resource_group, service, name): From 9a593e7d2eeecde096918b2614325c1c359a0077 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Mon, 18 Oct 2021 13:15:08 +0800 Subject: [PATCH 07/26] comment removed --- src/spring-cloud/azext_spring_cloud/custom.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index b314ad40d1a..cd98357a5f1 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -1673,24 +1673,6 @@ def callback(pipeline_response, deserialized, headers): cls=callback ) - # poller = client.certificates.begin_create_or_update( - # resource_group_name=resource_group, - # service_name=service, - # certificate_name=name, - # certificate_resource=certificate_resource - # ) - # - # return client.certificates.begin_create_or_update( - # resource_group_name=resource_group, - # service_name=service, - # certificate_name=name, - # certificate_resource=certificate_resource, - # continuation_token=poller.continuation_token() - # ) - - - # return client.certificates.get(resource_group, service, name) - def certificate_show(cmd, client, resource_group, service, name): return client.certificates.get(resource_group, service, name) From 2eaad3474fd0b4f0c39d52fade9d2cf1ce4d7aed Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Mon, 18 Oct 2021 13:18:50 +0800 Subject: [PATCH 08/26] comment removed --- src/spring-cloud/azext_spring_cloud/custom.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index cd98357a5f1..8949047d843 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -292,11 +292,6 @@ def app_create(cmd, client, resource_group, service, name, loaded_certificates.append(models_20210901preview. LoadedCertificate(resource_id=certificate_resource.id, load_trust_store=item['loadTrustStore'])) - # for item in data['loadedCertificates']: - # certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) - # loaded_certificates.append(models_20210901preview. - # LoadedCertificate(resource_id=certificate_resource.id, - # load_trust_store=item['loadTrustStore'])) properties.loaded_certificates = loaded_certificates resource = client.services.get(resource_group, service) @@ -400,16 +395,6 @@ def app_update(cmd, client, resource_group, service, name, if enable_persistent_storage is False: properties.persistent_disk = models_20210901preview.PersistentDisk(size_in_gb=0) - # if loaded_public_cert_file is not None: - # input_file = open(loaded_public_cert_file) - # data = json.load(input_file) - # loaded_certificates = [] - # - # for item in data['loadedCertificates']: - # certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) - # loaded_certificates.append(models_20210901preview. - # LoadedCertificate(resource_id=certificate_resource.id, - # load_trust_store=item['loadTrustStore'])) if loaded_public_cert_file is not None and os.path.isfile(loaded_public_cert_file): data = get_file_json(loaded_public_cert_file, throw_on_empty=False) loaded_certificates = [] From beda95e4e62b7d743b17d5368aa31a72eccf4e2f Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 19 Oct 2021 18:43:54 +0800 Subject: [PATCH 09/26] Update according to comments --- src/spring-cloud/azext_spring_cloud/custom.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 8949047d843..029d02251c1 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -283,16 +283,16 @@ def app_create(cmd, client, resource_group, service, name, properties.persistent_disk = models_20210901preview.PersistentDisk( size_in_gb=0, mount_path="/persistent") - if loaded_public_cert_file is not None and os.path.isfile(loaded_public_cert_file): + if loaded_public_cert_file is not None: data = get_file_json(loaded_public_cert_file, throw_on_empty=False) - loaded_certificates = [] if data: + loaded_certificates = [] for item in data['loadedCertificates']: certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) loaded_certificates.append(models_20210901preview. LoadedCertificate(resource_id=certificate_resource.id, load_trust_store=item['loadTrustStore'])) - properties.loaded_certificates = loaded_certificates + properties.loaded_certificates = loaded_certificates resource = client.services.get(resource_group, service) @@ -395,17 +395,16 @@ def app_update(cmd, client, resource_group, service, name, if enable_persistent_storage is False: properties.persistent_disk = models_20210901preview.PersistentDisk(size_in_gb=0) - if loaded_public_cert_file is not None and os.path.isfile(loaded_public_cert_file): + if loaded_public_cert_file is not None: data = get_file_json(loaded_public_cert_file, throw_on_empty=False) - loaded_certificates = [] if data: + loaded_certificates = [] for item in data['loadedCertificates']: certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) loaded_certificates.append(models_20210901preview. LoadedCertificate(resource_id=certificate_resource.id, load_trust_store=item['loadTrustStore'])) - - properties.loaded_certificates = loaded_certificates + properties.loaded_certificates = loaded_certificates app_resource = models_20210901preview.AppResource() app_resource.properties = properties @@ -433,7 +432,7 @@ def app_update(cmd, client, resource_group, service, name, environment_variables=env, jvm_options=jvm_options, net_core_main_entry_path=main_entry, - runtime_version=runtime_version, ) + runtime_version=runtime_version) deployment_settings.cpu = None deployment_settings.memory_in_gb = None properties = models_20210901preview.DeploymentResourceProperties( From 9802d1ed9f0db55b661e2fe3501c7820b67019ec Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 19 Oct 2021 19:11:59 +0800 Subject: [PATCH 10/26] refine --- src/spring-cloud/azext_spring_cloud/custom.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 029d02251c1..62f5322533b 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -40,7 +40,6 @@ from azure.core.exceptions import ResourceNotFoundError from ._utils import _get_rg_location from ._utils import _get_sku_name -# from ._utils import _try_load_file_object from ._resource_quantity import validate_cpu, validate_memory from six.moves.urllib import parse from threading import Thread @@ -798,7 +797,10 @@ def app_append_loaded_public_cert(cmd, client, resource_group, service, name, ce certificate_resource = client.certificates.get(resource_group, service, certificate_name) certificate_resource_id = certificate_resource.id - loaded_certificates = app_resource.properties.loaded_certificates or [] + loaded_certificates = [] + if app_resource.properties.loaded_certificates: + for loaded_certificate in app_resource.properties.loaded_certificates: + loaded_certificates.append(loaded_certificate) for loaded_certificate in loaded_certificates: if loaded_certificate.resource_id == certificate_resource.id: @@ -809,6 +811,7 @@ def app_append_loaded_public_cert(cmd, client, resource_group, service, name, ce load_trust_store=load_trust_store)) app_resource.properties.loaded_certificates = loaded_certificates + logger.warning("[1/1] updating app '{}'".format(name)) poller = client.apps.begin_update( resource_group, service, name, app_resource) From 1befe7e54a2c415ffc6d8154f2f7ef06db9b0096 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Wed, 20 Oct 2021 14:44:37 +0800 Subject: [PATCH 11/26] Update according to review --- src/spring-cloud/azext_spring_cloud/_help.py | 16 +++++ .../azext_spring_cloud/_params.py | 12 ++-- .../azext_spring_cloud/commands.py | 2 +- src/spring-cloud/azext_spring_cloud/custom.py | 65 ++++++++++--------- 4 files changed, 59 insertions(+), 36 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/_help.py b/src/spring-cloud/azext_spring_cloud/_help.py index c44e29c85e2..8716e139a77 100644 --- a/src/spring-cloud/azext_spring_cloud/_help.py +++ b/src/spring-cloud/azext_spring_cloud/_help.py @@ -377,6 +377,14 @@ short-summary: Update an Azure Cache for Redis service binding of the app. """ +helps['spring-cloud app append_loaded_public_certificate'] = """ + type: command + short-summary: Append a new loaded public certificate to an app in the Azure Spring Cloud. + examples: + - name: Append a new loaded public certificate to an app. + text: az spring-cloud app append_loaded_public_certificate --name MyApp -service MyCluster --resource-group MyResourceGroup -–certificate-name MyCertName --load-trust-store true +""" + helps['spring-cloud certificate'] = """ type: group short-summary: Commands to manage certificates. @@ -408,6 +416,14 @@ short-summary: Remove a certificate in Azure Spring Cloud. """ +helps['spring-cloud certificate list-reference-app'] = """ + type: command + short-summary: List all the apps reference an existing certificate in the Azure Spring Cloud. + examples: + - name: List all the apps reference an existing certificate in spring cloud service. + text: az spring-cloud certificate list-reference-app --service MyCluster --resource-group MyResourceGroup --name MyCertName +""" + helps['spring-cloud app custom-domain'] = """ type: group short-summary: Commands to manage custom domains. diff --git a/src/spring-cloud/azext_spring_cloud/_params.py b/src/spring-cloud/azext_spring_cloud/_params.py index 2395bafc93b..79648615990 100644 --- a/src/spring-cloud/azext_spring_cloud/_params.py +++ b/src/spring-cloud/azext_spring_cloud/_params.py @@ -119,7 +119,7 @@ def load_arguments(self, _): help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') c.argument('instance_count', type=int, default=1, help='Number of instance.', validator=validate_instance_count) - c.argument('loaded_public_cert_file', type=str, + c.argument('loaded_public_certificate_file', type=str, help='A json file path indicates the certificates which would be loaded to app') with self.argument_context('spring-cloud app update') as c: @@ -128,7 +128,7 @@ def load_arguments(self, _): options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access app via https', default=False) c.argument('enable_end_to_end_tls', arg_type=get_three_state_flag(), help='If true, enable end to end tls') - c.argument('loaded_public_cert_file', type=str, + c.argument('loaded_public_certificate_file', type=str, help='A json file path indicates the certificates which would be loaded to app') for scope in ['spring-cloud app update', 'spring-cloud app start', 'spring-cloud app stop', 'spring-cloud app restart', 'spring-cloud app deploy', 'spring-cloud app scale', 'spring-cloud app set-deployment', 'spring-cloud app show-deploy-log']: @@ -249,7 +249,7 @@ def prepare_logs_argument(c): c.argument('key', help='Api key of the service.') c.argument('disable_ssl', arg_type=get_three_state_flag(), help='If true, disable SSL. If false, enable SSL.', default=False) - with self.argument_context('spring-cloud app append-loaded-public-cert') as c: + with self.argument_context('spring-cloud app append-loaded-public-certificate') as c: c.argument('certificate_name', help='Name of the certificate to be appended') c.argument('load_trust_store', arg_type=get_three_state_flag(), help='If true, the certificate would be loaded into trust store for Java applications', default=False) @@ -294,12 +294,12 @@ def prepare_logs_argument(c): with self.argument_context('spring-cloud certificate add') as c: c.argument('vault_uri', help='The key vault uri where store the certificate') c.argument('vault_certificate_name', help='The certificate name in key vault') - c.argument('only_public_cert', arg_type=get_three_state_flag(), + c.argument('only_public_certificate', arg_type=get_three_state_flag(), help='If true, only import public certificate part from key vault.', default=False) - c.argument('public_cert_file', help='A file path for the public certificate to be uploaded') + c.argument('public_certificate_file', help='A file path for the public certificate to be uploaded') with self.argument_context('spring-cloud certificate list') as c: - c.argument('cert_type', help='Type of uploaded certificate', + c.argument('certificate_type', help='Type of uploaded certificate', arg_type=get_enum_type(['KeyVaultCertificate', 'ContentCertificate'])) with self.argument_context('spring-cloud app custom-domain') as c: diff --git a/src/spring-cloud/azext_spring_cloud/commands.py b/src/spring-cloud/azext_spring_cloud/commands.py index ee2f82a03c5..cd859f79374 100644 --- a/src/spring-cloud/azext_spring_cloud/commands.py +++ b/src/spring-cloud/azext_spring_cloud/commands.py @@ -70,7 +70,7 @@ def load_command_table(self, _): g.custom_command('stop', 'app_stop', supports_no_wait=True) g.custom_command('restart', 'app_restart', supports_no_wait=True) g.custom_command('logs', 'app_tail_log') - g.custom_command('append-loaded-public-cert', 'app_append_loaded_public_cert') + g.custom_command('append-loaded-public-certificate', 'app_append_loaded_public_certificate') with self.command_group('spring-cloud app identity', client_factory=cf_spring_cloud, exception_handler=handle_asc_exception) as g: diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 62f5322533b..c0777562169 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -262,7 +262,7 @@ def app_create(cmd, client, resource_group, service, name, env=None, enable_persistent_storage=None, assign_identity=None, - loaded_public_cert_file=None): + loaded_public_certificate_file=None): client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) cpu = validate_cpu(cpu) @@ -282,11 +282,16 @@ def app_create(cmd, client, resource_group, service, name, properties.persistent_disk = models_20210901preview.PersistentDisk( size_in_gb=0, mount_path="/persistent") - if loaded_public_cert_file is not None: - data = get_file_json(loaded_public_cert_file, throw_on_empty=False) + if loaded_public_certificate_file is not None: + data = get_file_json(loaded_public_certificate_file) if data: + if not data.get('loadedCertificates'): + raise CLIError("loadedCertificates must be provided in the json file") loaded_certificates = [] for item in data['loadedCertificates']: + invalidProperties = not item.get('certificateName') or not item.get('loadTrustStore') + if invalidProperties: + raise CLIError("certificateName, loadTrustStore must be provided in the json file") certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) loaded_certificates.append(models_20210901preview. LoadedCertificate(resource_id=certificate_resource.id, @@ -380,7 +385,7 @@ def app_update(cmd, client, resource_group, service, name, enable_persistent_storage=None, https_only=None, enable_end_to_end_tls=None, - loaded_public_cert_file=None): + loaded_public_certificate_file=None): client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) _check_active_deployment_exist(client, resource_group, service, name) resource = client.services.get(resource_group, service) @@ -394,11 +399,16 @@ def app_update(cmd, client, resource_group, service, name, if enable_persistent_storage is False: properties.persistent_disk = models_20210901preview.PersistentDisk(size_in_gb=0) - if loaded_public_cert_file is not None: - data = get_file_json(loaded_public_cert_file, throw_on_empty=False) + if loaded_public_certificate_file is not None: + data = get_file_json(loaded_public_certificate_file) if data: + if not data.get('loadedCertificates'): + raise CLIError("loadedCertificates must be provided in the json file") loaded_certificates = [] for item in data['loadedCertificates']: + invalidProperties = not item.get('certificateName') or not item.get('loadTrustStore') + if invalidProperties: + raise CLIError("certificateName, loadTrustStore must be provided in the json file") certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) loaded_certificates.append(models_20210901preview. LoadedCertificate(resource_id=certificate_resource.id, @@ -789,7 +799,7 @@ def app_unset_deployment(cmd, client, resource_group, service, name): return client.apps.begin_update(resource_group, service, name, app_resource) -def app_append_loaded_public_cert(cmd, client, resource_group, service, name, certificate_name, load_trust_store): +def app_append_loaded_public_certificate(cmd, client, resource_group, service, name, certificate_name, load_trust_store): client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) _check_active_deployment_exist(client, resource_group, service, name) @@ -1618,31 +1628,33 @@ def iter_lines(response, limit=2 ** 20): exceptions.append(e) -def certificate_add(cmd, client, resource_group, service, name, only_public_cert=None, - vault_uri=None, vault_certificate_name=None, public_cert_file=None): - if vault_uri is None and public_cert_file is None: - raise CLIError("Neither vault-uri nor certificate-file is provided") - if vault_uri is not None and public_cert_file is not None: - raise CLIError("Both vault-uri and certificate-file are provided") +def certificate_add(cmd, client, resource_group, service, name, only_public_certificate=None, + vault_uri=None, vault_certificate_name=None, public_certificate_file=None): + if vault_uri is None and public_certificate_file is None: + raise InvalidArgumentValueError("One of --vault-uri and --public-certificate-file should be provided") + if vault_uri is not None and public_certificate_file is not None: + raise InvalidArgumentValueError("--vault-uri and --public-certificate-file could not be provided at the same time") if vault_uri is not None: if vault_certificate_name is None: - raise CLIError("Parameter vault-certificate-name should be provided for Key Vault Certificate") + raise InvalidArgumentValueError("--vault-certificate-name should be provided for Key Vault Certificate") + + if vault_uri is not None: properties = models_20210901preview.KeyVaultCertificateProperties( type="KeyVaultCertificate", vault_uri=vault_uri, key_vault_cert_name=vault_certificate_name, - exclude_private_key=only_public_cert + exclude_private_key=only_public_certificate ) else: - if os.path.exists(public_cert_file): + if os.path.exists(public_certificate_file): try: - with open(public_cert_file, 'rb') as input_file: - logger.debug("attempting to read file %s as binary", public_cert_file) + with open(public_certificate_file, 'rb') as input_file: + logger.debug("attempting to read file %s as binary", public_certificate_file) content = base64.b64encode(input_file.read()).decode("utf-8") except Exception: - raise CLIError('Failed to decode file {} - unknown decoding'.format(public_cert_file)) + raise CLIError('Failed to decode file {} - unknown decoding'.format(public_certificate_file)) else: - raise CLIError("public_cert_file %s could not be found", public_cert_file) + raise CLIError("public_certificate_file %s could not be found", public_certificate_file) properties = models_20210901preview.ContentCertificateProperties( type="ContentCertificate", content=content @@ -1665,16 +1677,16 @@ def certificate_show(cmd, client, resource_group, service, name): return client.certificates.get(resource_group, service, name) -def certificate_list(cmd, client, resource_group, service, cert_type=None): +def certificate_list(cmd, client, resource_group, service, certificate_type=None): certificates = list(client.certificates.list(resource_group, service)) certificates_to_list = [] - if cert_type is None: + if certificate_type is None: certificates_to_list = certificates - elif cert_type == 'KeyVaultCertificate': + elif certificate_type == 'KeyVaultCertificate': for certificate in certificates: if certificate.properties.type == 'KeyVaultCertificate': certificates_to_list.append(certificate) - elif cert_type == 'ContentCertificate': + elif certificate_type == 'ContentCertificate': for certificate in certificates: if certificate.properties.type == 'ContentCertificate': certificates_to_list.append(certificate) @@ -1698,11 +1710,6 @@ def certificate_list_reference_app(cmd, client, resource_group, service, name): if load_certificate.resource_id == certificate_resource_id: reference_apps.append(app) break - for app in reference_apps: - if app.properties.active_deployment_name: - deployment = next( - (x for x in deployments if x.properties.app_name == app.name)) - app.properties.active_deployment = deployment return reference_apps From 11d553b6f57146d13ea2181e364840171d51a1cb Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Wed, 20 Oct 2021 15:33:56 +0800 Subject: [PATCH 12/26] Update --- src/spring-cloud/azext_spring_cloud/custom.py | 35 +++++-------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index c0777562169..6006499b24b 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -263,8 +263,6 @@ def app_create(cmd, client, resource_group, service, name, enable_persistent_storage=None, assign_identity=None, loaded_public_certificate_file=None): - - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) cpu = validate_cpu(cpu) memory = validate_memory(memory) apps = _get_all_apps(client, resource_group, service) @@ -275,6 +273,10 @@ def app_create(cmd, client, resource_group, service, name, properties.temporary_disk = models_20210901preview.TemporaryDisk( size_in_gb=5, mount_path="/tmp") + resource = client.services.get(resource_group, service) + + _validate_instance_count(resource.sku.tier, instance_count) + if enable_persistent_storage: properties.persistent_disk = models_20210901preview.PersistentDisk( size_in_gb=_get_persistent_disk_size(resource.sku.tier), mount_path="/persistent") @@ -298,10 +300,6 @@ def app_create(cmd, client, resource_group, service, name, load_trust_store=item['loadTrustStore'])) properties.loaded_certificates = loaded_certificates - resource = client.services.get(resource_group, service) - - _validate_instance_count(resource.sku.tier, instance_count) - app_resource = models_20210901preview.AppResource() app_resource.properties = properties app_resource.location = resource.location @@ -386,7 +384,6 @@ def app_update(cmd, client, resource_group, service, name, https_only=None, enable_end_to_end_tls=None, loaded_public_certificate_file=None): - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) _check_active_deployment_exist(client, resource_group, service, name) resource = client.services.get(resource_group, service) location = resource.location @@ -517,7 +514,6 @@ def app_restart(cmd, client, def app_list(cmd, client, resource_group, service): - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) apps = list(client.apps.list(resource_group, service)) deployments = list( client.deployments.list_for_cluster(resource_group, service)) @@ -534,7 +530,6 @@ def app_get(cmd, client, resource_group, service, name): - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) app = client.apps.get(resource_group, service, name) deployment_name = app.properties.active_deployment_name if deployment_name: @@ -800,11 +795,10 @@ def app_unset_deployment(cmd, client, resource_group, service, name): def app_append_loaded_public_certificate(cmd, client, resource_group, service, name, certificate_name, load_trust_store): - client = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) - _check_active_deployment_exist(client, resource_group, service, name) + client_0901_preview = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) - app_resource = client.apps.get(resource_group, service, name) - certificate_resource = client.certificates.get(resource_group, service, certificate_name) + app_resource = client_0901_preview.apps.get(resource_group, service, name) + certificate_resource = client_0901_preview.certificates.get(resource_group, service, certificate_name) certificate_resource_id = certificate_resource.id loaded_certificates = [] @@ -823,21 +817,12 @@ def app_append_loaded_public_certificate(cmd, client, resource_group, service, n app_resource.properties.loaded_certificates = loaded_certificates logger.warning("[1/1] updating app '{}'".format(name)) - poller = client.apps.begin_update( + poller = client_0901_preview.apps.begin_update( resource_group, service, name, app_resource) while poller.done() is False: sleep(APP_CREATE_OR_UPDATE_SLEEP_INTERVAL) - app_updated = client.apps.get(resource_group, service, name) - - deployment_name = app_updated.properties.active_deployment_name - if deployment_name: - deployment = client.deployments.get( - resource_group, service, name, deployment_name) - app_updated.properties.active_deployment = deployment - else: - logger.warning(NO_PRODUCTION_DEPLOYMENT_SET_ERROR) - + app_updated = client_0901_preview.apps.get(resource_group, service, name) return app_updated @@ -1700,8 +1685,6 @@ def certificate_remove(cmd, client, resource_group, service, name): def certificate_list_reference_app(cmd, client, resource_group, service, name): apps = list(client.apps.list(resource_group, service)) - deployments = list( - client.deployments.list_for_cluster(resource_group, service)) reference_apps = [] certificate_resource = client.certificates.get(resource_group, service, name) certificate_resource_id = certificate_resource.id From cb160923dbd8dc878f4c394ac5a3e2a4118ce089 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Wed, 20 Oct 2021 15:52:14 +0800 Subject: [PATCH 13/26] Add sdk for new api version --- .../vendored_sdks/__init__.py | 0 .../vendored_sdks/appplatform/__init__.py | 0 .../_app_platform_management_client.py | 50 + .../appplatform/_configuration.py | 0 .../vendored_sdks/appplatform/_version.py | 0 .../vendored_sdks/appplatform/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 50 + .../appplatform/aio/_configuration.py | 0 .../vendored_sdks/appplatform/models.py | 0 .../vendored_sdks/appplatform/py.typed | 1 - .../v2019_05_01_preview/__init__.py | 0 .../_app_platform_management_client.py | 0 .../v2019_05_01_preview/_configuration.py | 0 .../v2019_05_01_preview/_metadata.json | 111 - .../v2019_05_01_preview/_version.py | 2 +- .../v2019_05_01_preview/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 0 .../v2019_05_01_preview/aio/_configuration.py | 0 .../aio/operations/__init__.py | 0 .../aio/operations/_apps_operations.py | 0 .../aio/operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../aio/operations/_deployments_operations.py | 0 .../aio/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../aio/operations/_services_operations.py | 0 .../aio/operations/_sku_operations.py | 0 .../v2019_05_01_preview/models/__init__.py | 0 .../_app_platform_management_client_enums.py | 0 .../v2019_05_01_preview/models/_models.py | 4 + .../v2019_05_01_preview/models/_models_py3.py | 5 + .../operations/__init__.py | 0 .../operations/_apps_operations.py | 0 .../operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../operations/_deployments_operations.py | 0 .../operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../operations/_services_operations.py | 0 .../operations/_sku_operations.py | 0 .../appplatform/v2019_05_01_preview/py.typed | 1 - .../appplatform/v2020_07_01/__init__.py | 0 .../_app_platform_management_client.py | 0 .../appplatform/v2020_07_01/_configuration.py | 0 .../appplatform/v2020_07_01/_metadata.json | 113 - .../appplatform/v2020_07_01/_version.py | 2 +- .../appplatform/v2020_07_01/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 0 .../v2020_07_01/aio/_configuration.py | 0 .../v2020_07_01/aio/operations/__init__.py | 0 .../aio/operations/_apps_operations.py | 0 .../aio/operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../aio/operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../v2020_07_01/aio/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../aio/operations/_services_operations.py | 0 .../aio/operations/_skus_operations.py | 0 .../v2020_07_01/models/__init__.py | 0 .../_app_platform_management_client_enums.py | 0 .../appplatform/v2020_07_01/models/_models.py | 4 + .../v2020_07_01/models/_models_py3.py | 5 + .../v2020_07_01/operations/__init__.py | 0 .../operations/_apps_operations.py | 0 .../operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../v2020_07_01/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../operations/_services_operations.py | 0 .../operations/_skus_operations.py | 0 .../appplatform/v2020_07_01/py.typed | 1 - .../v2020_11_01_preview/__init__.py | 0 .../_app_platform_management_client.py | 0 .../v2020_11_01_preview/_configuration.py | 0 .../v2020_11_01_preview/_metadata.json | 113 - .../v2020_11_01_preview/_version.py | 2 +- .../v2020_11_01_preview/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 0 .../v2020_11_01_preview/aio/_configuration.py | 0 .../aio/operations/__init__.py | 0 .../aio/operations/_apps_operations.py | 0 .../aio/operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../aio/operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../aio/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../aio/operations/_services_operations.py | 0 .../aio/operations/_skus_operations.py | 0 .../v2020_11_01_preview/models/__init__.py | 0 .../_app_platform_management_client_enums.py | 0 .../v2020_11_01_preview/models/_models.py | 4 + .../v2020_11_01_preview/models/_models_py3.py | 5 + .../operations/__init__.py | 0 .../operations/_apps_operations.py | 0 .../operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../operations/_services_operations.py | 0 .../operations/_skus_operations.py | 0 .../appplatform/v2020_11_01_preview/py.typed | 1 - .../v2021_06_01_preview/__init__.py | 0 .../_app_platform_management_client.py | 0 .../v2021_06_01_preview/_configuration.py | 0 .../v2021_06_01_preview/_metadata.json | 113 - .../v2021_06_01_preview/_version.py | 2 +- .../v2021_06_01_preview/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 0 .../v2021_06_01_preview/aio/_configuration.py | 0 .../aio/operations/__init__.py | 0 .../aio/operations/_apps_operations.py | 0 .../aio/operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../aio/operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../aio/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../aio/operations/_services_operations.py | 0 .../aio/operations/_skus_operations.py | 0 .../v2021_06_01_preview/models/__init__.py | 0 .../_app_platform_management_client_enums.py | 0 .../v2021_06_01_preview/models/_models.py | 14 +- .../v2021_06_01_preview/models/_models_py3.py | 15 +- .../operations/__init__.py | 0 .../operations/_apps_operations.py | 0 .../operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../operations/_services_operations.py | 0 .../operations/_skus_operations.py | 0 .../appplatform/v2021_06_01_preview/py.typed | 1 - .../v2021_09_01_preview/__init__.py | 19 + .../_app_platform_management_client.py | 144 + .../v2021_09_01_preview/_configuration.py | 71 + .../v2021_09_01_preview/_version.py | 9 + .../v2021_09_01_preview/aio/__init__.py | 10 + .../aio/_app_platform_management_client.py | 137 + .../v2021_09_01_preview/aio/_configuration.py | 67 + .../aio/operations/__init__.py | 35 + .../aio/operations/_apps_operations.py | 712 ++++ .../aio/operations/_bindings_operations.py | 602 +++ .../operations/_certificates_operations.py | 437 +++ .../operations/_config_servers_operations.py | 489 +++ .../operations/_custom_domains_operations.py | 602 +++ .../aio/operations/_deployments_operations.py | 1125 ++++++ .../_monitoring_settings_operations.py | 360 ++ .../aio/operations/_operations.py | 104 + .../_runtime_versions_operations.py | 87 + .../aio/operations/_services_operations.py | 913 +++++ .../aio/operations/_skus_operations.py | 108 + .../aio/operations/_storages_operations.py | 437 +++ .../v2021_09_01_preview/models/__init__.py | 299 ++ .../_app_platform_management_client_enums.py | 177 + .../v2021_09_01_preview/models/_models.py | 2968 +++++++++++++++ .../v2021_09_01_preview/models/_models_py3.py | 3272 +++++++++++++++++ .../operations/__init__.py | 35 + .../operations/_apps_operations.py | 726 ++++ .../operations/_bindings_operations.py | 614 ++++ .../operations/_certificates_operations.py | 447 +++ .../operations/_config_servers_operations.py | 500 +++ .../operations/_custom_domains_operations.py | 614 ++++ .../operations/_deployments_operations.py | 1145 ++++++ .../_monitoring_settings_operations.py | 369 ++ .../operations/_operations.py | 109 + .../_runtime_versions_operations.py | 92 + .../operations/_services_operations.py | 931 +++++ .../operations/_skus_operations.py | 113 + .../operations/_storages_operations.py | 447 +++ 191 files changed, 19476 insertions(+), 469 deletions(-) mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_configuration.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_version.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_configuration.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models.py delete mode 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/py.typed mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_configuration.py delete mode 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_metadata.json mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_configuration.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_apps_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_bindings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_certificates_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_custom_domains_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_deployments_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_runtime_versions_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_services_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_sku_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_apps_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_bindings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_certificates_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_custom_domains_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_deployments_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_services_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_sku_operations.py delete mode 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/py.typed mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_configuration.py delete mode 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_metadata.json mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_configuration.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_apps_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_bindings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_certificates_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_config_servers_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_custom_domains_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_deployments_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_monitoring_settings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_runtime_versions_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_services_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_skus_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_apps_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_bindings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_certificates_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_config_servers_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_custom_domains_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_deployments_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_monitoring_settings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_runtime_versions_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_services_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_skus_operations.py delete mode 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/py.typed mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_configuration.py delete mode 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_metadata.json mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_configuration.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_apps_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_bindings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_certificates_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_config_servers_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_custom_domains_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_deployments_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_monitoring_settings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_runtime_versions_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_services_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_skus_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_app_platform_management_client_enums.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_apps_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_bindings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_certificates_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_config_servers_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_custom_domains_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_deployments_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_monitoring_settings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_runtime_versions_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_services_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_skus_operations.py delete mode 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/py.typed mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_configuration.py delete mode 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_metadata.json mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_app_platform_management_client.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_configuration.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_apps_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_bindings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_certificates_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_config_servers_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_custom_domains_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_deployments_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_monitoring_settings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_runtime_versions_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_services_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_skus_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_app_platform_management_client_enums.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/__init__.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_apps_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_bindings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_certificates_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_config_servers_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_custom_domains_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_deployments_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_monitoring_settings_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_runtime_versions_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_services_operations.py mode change 100644 => 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_skus_operations.py delete mode 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/py.typed create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/__init__.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_app_platform_management_client.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_configuration.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_version.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/__init__.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/_app_platform_management_client.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/_configuration.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/__init__.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_apps_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_bindings_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_certificates_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_config_servers_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_custom_domains_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_deployments_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_monitoring_settings_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_runtime_versions_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_services_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_skus_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_storages_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/__init__.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_app_platform_management_client_enums.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_models.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_models_py3.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/__init__.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_apps_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_bindings_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_certificates_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_config_servers_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_custom_domains_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_deployments_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_monitoring_settings_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_runtime_versions_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_services_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_skus_operations.py create mode 100755 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_storages_operations.py diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py old mode 100644 new mode 100755 index b417f26cc70..16c097ec411 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py @@ -96,6 +96,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2020-07-01: :mod:`v2020_07_01.models` * 2020-11-01-preview: :mod:`v2020_11_01_preview.models` * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` + * 2021-09-01-preview: :mod:`v2021_09_01_preview.models` """ if api_version == '2019-05-01-preview': from .v2019_05_01_preview import models @@ -109,6 +110,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-06-01-preview': from .v2021_06_01_preview import models return models + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -119,6 +123,7 @@ def apps(self): * 2020-07-01: :class:`AppsOperations` * 2020-11-01-preview: :class:`AppsOperations` * 2021-06-01-preview: :class:`AppsOperations` + * 2021-09-01-preview: :class:`AppsOperations` """ api_version = self._get_api_version('apps') if api_version == '2019-05-01-preview': @@ -129,6 +134,8 @@ def apps(self): from .v2020_11_01_preview.operations import AppsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import AppsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import AppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'apps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -141,6 +148,7 @@ def bindings(self): * 2020-07-01: :class:`BindingsOperations` * 2020-11-01-preview: :class:`BindingsOperations` * 2021-06-01-preview: :class:`BindingsOperations` + * 2021-09-01-preview: :class:`BindingsOperations` """ api_version = self._get_api_version('bindings') if api_version == '2019-05-01-preview': @@ -151,6 +159,8 @@ def bindings(self): from .v2020_11_01_preview.operations import BindingsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import BindingsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import BindingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'bindings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -163,6 +173,7 @@ def certificates(self): * 2020-07-01: :class:`CertificatesOperations` * 2020-11-01-preview: :class:`CertificatesOperations` * 2021-06-01-preview: :class:`CertificatesOperations` + * 2021-09-01-preview: :class:`CertificatesOperations` """ api_version = self._get_api_version('certificates') if api_version == '2019-05-01-preview': @@ -173,6 +184,8 @@ def certificates(self): from .v2020_11_01_preview.operations import CertificatesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import CertificatesOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import CertificatesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'certificates'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -184,6 +197,7 @@ def config_servers(self): * 2020-07-01: :class:`ConfigServersOperations` * 2020-11-01-preview: :class:`ConfigServersOperations` * 2021-06-01-preview: :class:`ConfigServersOperations` + * 2021-09-01-preview: :class:`ConfigServersOperations` """ api_version = self._get_api_version('config_servers') if api_version == '2020-07-01': @@ -192,6 +206,8 @@ def config_servers(self): from .v2020_11_01_preview.operations import ConfigServersOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ConfigServersOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import ConfigServersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'config_servers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -204,6 +220,7 @@ def custom_domains(self): * 2020-07-01: :class:`CustomDomainsOperations` * 2020-11-01-preview: :class:`CustomDomainsOperations` * 2021-06-01-preview: :class:`CustomDomainsOperations` + * 2021-09-01-preview: :class:`CustomDomainsOperations` """ api_version = self._get_api_version('custom_domains') if api_version == '2019-05-01-preview': @@ -214,6 +231,8 @@ def custom_domains(self): from .v2020_11_01_preview.operations import CustomDomainsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import CustomDomainsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import CustomDomainsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'custom_domains'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -226,6 +245,7 @@ def deployments(self): * 2020-07-01: :class:`DeploymentsOperations` * 2020-11-01-preview: :class:`DeploymentsOperations` * 2021-06-01-preview: :class:`DeploymentsOperations` + * 2021-09-01-preview: :class:`DeploymentsOperations` """ api_version = self._get_api_version('deployments') if api_version == '2019-05-01-preview': @@ -236,6 +256,8 @@ def deployments(self): from .v2020_11_01_preview.operations import DeploymentsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import DeploymentsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import DeploymentsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'deployments'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -247,6 +269,7 @@ def monitoring_settings(self): * 2020-07-01: :class:`MonitoringSettingsOperations` * 2020-11-01-preview: :class:`MonitoringSettingsOperations` * 2021-06-01-preview: :class:`MonitoringSettingsOperations` + * 2021-09-01-preview: :class:`MonitoringSettingsOperations` """ api_version = self._get_api_version('monitoring_settings') if api_version == '2020-07-01': @@ -255,6 +278,8 @@ def monitoring_settings(self): from .v2020_11_01_preview.operations import MonitoringSettingsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import MonitoringSettingsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import MonitoringSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'monitoring_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -267,6 +292,7 @@ def operations(self): * 2020-07-01: :class:`Operations` * 2020-11-01-preview: :class:`Operations` * 2021-06-01-preview: :class:`Operations` + * 2021-09-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2019-05-01-preview': @@ -277,6 +303,8 @@ def operations(self): from .v2020_11_01_preview.operations import Operations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import Operations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -289,6 +317,7 @@ def runtime_versions(self): * 2020-07-01: :class:`RuntimeVersionsOperations` * 2020-11-01-preview: :class:`RuntimeVersionsOperations` * 2021-06-01-preview: :class:`RuntimeVersionsOperations` + * 2021-09-01-preview: :class:`RuntimeVersionsOperations` """ api_version = self._get_api_version('runtime_versions') if api_version == '2019-05-01-preview': @@ -299,6 +328,8 @@ def runtime_versions(self): from .v2020_11_01_preview.operations import RuntimeVersionsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import RuntimeVersionsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import RuntimeVersionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'runtime_versions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -311,6 +342,7 @@ def services(self): * 2020-07-01: :class:`ServicesOperations` * 2020-11-01-preview: :class:`ServicesOperations` * 2021-06-01-preview: :class:`ServicesOperations` + * 2021-09-01-preview: :class:`ServicesOperations` """ api_version = self._get_api_version('services') if api_version == '2019-05-01-preview': @@ -321,6 +353,8 @@ def services(self): from .v2020_11_01_preview.operations import ServicesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ServicesOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import ServicesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'services'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -345,6 +379,7 @@ def skus(self): * 2020-07-01: :class:`SkusOperations` * 2020-11-01-preview: :class:`SkusOperations` * 2021-06-01-preview: :class:`SkusOperations` + * 2021-09-01-preview: :class:`SkusOperations` """ api_version = self._get_api_version('skus') if api_version == '2020-07-01': @@ -353,10 +388,25 @@ def skus(self): from .v2020_11_01_preview.operations import SkusOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import SkusOperations as OperationClass + elif api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import SkusOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'skus'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def storages(self): + """Instance depends on the API version: + + * 2021-09-01-preview: :class:`StoragesOperations` + """ + api_version = self._get_api_version('storages') + if api_version == '2021-09-01-preview': + from .v2021_09_01_preview.operations import StoragesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'storages'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + def close(self): self._client.close() def __enter__(self): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_version.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py old mode 100644 new mode 100755 index 401fdc29467..8449050d7a6 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py @@ -94,6 +94,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2020-07-01: :mod:`v2020_07_01.models` * 2020-11-01-preview: :mod:`v2020_11_01_preview.models` * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` + * 2021-09-01-preview: :mod:`v2021_09_01_preview.models` """ if api_version == '2019-05-01-preview': from ..v2019_05_01_preview import models @@ -107,6 +108,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview import models return models + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -117,6 +121,7 @@ def apps(self): * 2020-07-01: :class:`AppsOperations` * 2020-11-01-preview: :class:`AppsOperations` * 2021-06-01-preview: :class:`AppsOperations` + * 2021-09-01-preview: :class:`AppsOperations` """ api_version = self._get_api_version('apps') if api_version == '2019-05-01-preview': @@ -127,6 +132,8 @@ def apps(self): from ..v2020_11_01_preview.aio.operations import AppsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import AppsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import AppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'apps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -139,6 +146,7 @@ def bindings(self): * 2020-07-01: :class:`BindingsOperations` * 2020-11-01-preview: :class:`BindingsOperations` * 2021-06-01-preview: :class:`BindingsOperations` + * 2021-09-01-preview: :class:`BindingsOperations` """ api_version = self._get_api_version('bindings') if api_version == '2019-05-01-preview': @@ -149,6 +157,8 @@ def bindings(self): from ..v2020_11_01_preview.aio.operations import BindingsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import BindingsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import BindingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'bindings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -161,6 +171,7 @@ def certificates(self): * 2020-07-01: :class:`CertificatesOperations` * 2020-11-01-preview: :class:`CertificatesOperations` * 2021-06-01-preview: :class:`CertificatesOperations` + * 2021-09-01-preview: :class:`CertificatesOperations` """ api_version = self._get_api_version('certificates') if api_version == '2019-05-01-preview': @@ -171,6 +182,8 @@ def certificates(self): from ..v2020_11_01_preview.aio.operations import CertificatesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import CertificatesOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import CertificatesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'certificates'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -182,6 +195,7 @@ def config_servers(self): * 2020-07-01: :class:`ConfigServersOperations` * 2020-11-01-preview: :class:`ConfigServersOperations` * 2021-06-01-preview: :class:`ConfigServersOperations` + * 2021-09-01-preview: :class:`ConfigServersOperations` """ api_version = self._get_api_version('config_servers') if api_version == '2020-07-01': @@ -190,6 +204,8 @@ def config_servers(self): from ..v2020_11_01_preview.aio.operations import ConfigServersOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ConfigServersOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import ConfigServersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'config_servers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -202,6 +218,7 @@ def custom_domains(self): * 2020-07-01: :class:`CustomDomainsOperations` * 2020-11-01-preview: :class:`CustomDomainsOperations` * 2021-06-01-preview: :class:`CustomDomainsOperations` + * 2021-09-01-preview: :class:`CustomDomainsOperations` """ api_version = self._get_api_version('custom_domains') if api_version == '2019-05-01-preview': @@ -212,6 +229,8 @@ def custom_domains(self): from ..v2020_11_01_preview.aio.operations import CustomDomainsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import CustomDomainsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import CustomDomainsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'custom_domains'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -224,6 +243,7 @@ def deployments(self): * 2020-07-01: :class:`DeploymentsOperations` * 2020-11-01-preview: :class:`DeploymentsOperations` * 2021-06-01-preview: :class:`DeploymentsOperations` + * 2021-09-01-preview: :class:`DeploymentsOperations` """ api_version = self._get_api_version('deployments') if api_version == '2019-05-01-preview': @@ -234,6 +254,8 @@ def deployments(self): from ..v2020_11_01_preview.aio.operations import DeploymentsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import DeploymentsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import DeploymentsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'deployments'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -245,6 +267,7 @@ def monitoring_settings(self): * 2020-07-01: :class:`MonitoringSettingsOperations` * 2020-11-01-preview: :class:`MonitoringSettingsOperations` * 2021-06-01-preview: :class:`MonitoringSettingsOperations` + * 2021-09-01-preview: :class:`MonitoringSettingsOperations` """ api_version = self._get_api_version('monitoring_settings') if api_version == '2020-07-01': @@ -253,6 +276,8 @@ def monitoring_settings(self): from ..v2020_11_01_preview.aio.operations import MonitoringSettingsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import MonitoringSettingsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import MonitoringSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'monitoring_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -265,6 +290,7 @@ def operations(self): * 2020-07-01: :class:`Operations` * 2020-11-01-preview: :class:`Operations` * 2021-06-01-preview: :class:`Operations` + * 2021-09-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2019-05-01-preview': @@ -275,6 +301,8 @@ def operations(self): from ..v2020_11_01_preview.aio.operations import Operations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import Operations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -287,6 +315,7 @@ def runtime_versions(self): * 2020-07-01: :class:`RuntimeVersionsOperations` * 2020-11-01-preview: :class:`RuntimeVersionsOperations` * 2021-06-01-preview: :class:`RuntimeVersionsOperations` + * 2021-09-01-preview: :class:`RuntimeVersionsOperations` """ api_version = self._get_api_version('runtime_versions') if api_version == '2019-05-01-preview': @@ -297,6 +326,8 @@ def runtime_versions(self): from ..v2020_11_01_preview.aio.operations import RuntimeVersionsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import RuntimeVersionsOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import RuntimeVersionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'runtime_versions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -309,6 +340,7 @@ def services(self): * 2020-07-01: :class:`ServicesOperations` * 2020-11-01-preview: :class:`ServicesOperations` * 2021-06-01-preview: :class:`ServicesOperations` + * 2021-09-01-preview: :class:`ServicesOperations` """ api_version = self._get_api_version('services') if api_version == '2019-05-01-preview': @@ -319,6 +351,8 @@ def services(self): from ..v2020_11_01_preview.aio.operations import ServicesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ServicesOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import ServicesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'services'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -343,6 +377,7 @@ def skus(self): * 2020-07-01: :class:`SkusOperations` * 2020-11-01-preview: :class:`SkusOperations` * 2021-06-01-preview: :class:`SkusOperations` + * 2021-09-01-preview: :class:`SkusOperations` """ api_version = self._get_api_version('skus') if api_version == '2020-07-01': @@ -351,10 +386,25 @@ def skus(self): from ..v2020_11_01_preview.aio.operations import SkusOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import SkusOperations as OperationClass + elif api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import SkusOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'skus'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def storages(self): + """Instance depends on the API version: + + * 2021-09-01-preview: :class:`StoragesOperations` + """ + api_version = self._get_api_version('storages') + if api_version == '2021-09-01-preview': + from ..v2021_09_01_preview.aio.operations import StoragesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'storages'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + async def close(self): await self._client.close() async def __aenter__(self): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/py.typed b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_app_platform_management_client.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_metadata.json b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_metadata.json deleted file mode 100644 index ed50cf259b5..00000000000 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_metadata.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "chosen_version": "2019-05-01-preview", - "total_api_version_list": ["2019-05-01-preview"], - "client": { - "name": "AppPlatformManagementClient", - "filename": "_app_platform_management_client", - "description": "REST API for Azure Spring Cloud.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=None, # type: Optional[str]", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: Optional[str] = None,", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "services": "ServicesOperations", - "apps": "AppsOperations", - "bindings": "BindingsOperations", - "certificates": "CertificatesOperations", - "custom_domains": "CustomDomainsOperations", - "deployments": "DeploymentsOperations", - "operations": "Operations", - "runtime_versions": "RuntimeVersionsOperations", - "sku": "SkuOperations" - } -} \ No newline at end of file diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py old mode 100644 new mode 100755 index 92453d8691d..e5754a47ce6 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "1.0.0b1" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_app_platform_management_client.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_apps_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_bindings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_certificates_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_custom_domains_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_deployments_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_runtime_versions_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_services_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_sku_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_sku_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py old mode 100644 new mode 100755 index 8e0cc5fe573..81e6462e7e0 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py @@ -1285,6 +1285,8 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2019_05_01_preview.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str """ _attribute_map = { @@ -1298,6 +1300,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1315,6 +1318,7 @@ def __init__( self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.dimensions = kwargs.get('dimensions', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) class NameAvailability(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py old mode 100644 new mode 100755 index 2538ba5505b..7afe41afaa2 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py @@ -1408,6 +1408,8 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2019_05_01_preview.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str """ _attribute_map = { @@ -1421,6 +1423,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1436,6 +1439,7 @@ def __init__( supported_time_grain_types: Optional[List[str]] = None, fill_gap_with_zero: Optional[bool] = None, dimensions: Optional[List["MetricDimension"]] = None, + source_mdm_namespace: Optional[str] = None, **kwargs ): super(MetricSpecification, self).__init__(**kwargs) @@ -1449,6 +1453,7 @@ def __init__( self.supported_time_grain_types = supported_time_grain_types self.fill_gap_with_zero = fill_gap_with_zero self.dimensions = dimensions + self.source_mdm_namespace = source_mdm_namespace class NameAvailability(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_apps_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_bindings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_certificates_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_custom_domains_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_deployments_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_services_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_sku_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_sku_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/py.typed b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_app_platform_management_client.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_metadata.json b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_metadata.json deleted file mode 100644 index 1f417c7fc3f..00000000000 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_metadata.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "chosen_version": "2020-07-01", - "total_api_version_list": ["2020-07-01"], - "client": { - "name": "AppPlatformManagementClient", - "filename": "_app_platform_management_client", - "description": "REST API for Azure Spring Cloud.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=None, # type: Optional[str]", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: Optional[str] = None,", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "services": "ServicesOperations", - "config_servers": "ConfigServersOperations", - "monitoring_settings": "MonitoringSettingsOperations", - "apps": "AppsOperations", - "bindings": "BindingsOperations", - "certificates": "CertificatesOperations", - "custom_domains": "CustomDomainsOperations", - "deployments": "DeploymentsOperations", - "operations": "Operations", - "runtime_versions": "RuntimeVersionsOperations", - "skus": "SkusOperations" - } -} \ No newline at end of file diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py old mode 100644 new mode 100755 index 92453d8691d..e5754a47ce6 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "1.0.0b1" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_app_platform_management_client.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_apps_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_bindings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_certificates_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_config_servers_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_custom_domains_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_deployments_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_monitoring_settings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_runtime_versions_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_services_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_skus_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py old mode 100644 new mode 100755 index 10db354c88f..9428d8d29e6 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py @@ -1353,6 +1353,8 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2020_07_01.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str """ _attribute_map = { @@ -1366,6 +1368,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1383,6 +1386,7 @@ def __init__( self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.dimensions = kwargs.get('dimensions', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) class MonitoringSettingProperties(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py old mode 100644 new mode 100755 index 1d9493a9481..b1dad0b57a2 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py @@ -1482,6 +1482,8 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2020_07_01.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str """ _attribute_map = { @@ -1495,6 +1497,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1510,6 +1513,7 @@ def __init__( supported_time_grain_types: Optional[List[str]] = None, fill_gap_with_zero: Optional[bool] = None, dimensions: Optional[List["MetricDimension"]] = None, + source_mdm_namespace: Optional[str] = None, **kwargs ): super(MetricSpecification, self).__init__(**kwargs) @@ -1523,6 +1527,7 @@ def __init__( self.supported_time_grain_types = supported_time_grain_types self.fill_gap_with_zero = fill_gap_with_zero self.dimensions = dimensions + self.source_mdm_namespace = source_mdm_namespace class MonitoringSettingProperties(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_apps_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_bindings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_certificates_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_config_servers_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_custom_domains_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_deployments_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_monitoring_settings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_runtime_versions_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_services_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_skus_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/py.typed b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_app_platform_management_client.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_metadata.json b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_metadata.json deleted file mode 100644 index 22c085a41a3..00000000000 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_metadata.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "chosen_version": "2020-11-01-preview", - "total_api_version_list": ["2020-11-01-preview"], - "client": { - "name": "AppPlatformManagementClient", - "filename": "_app_platform_management_client", - "description": "REST API for Azure Spring Cloud.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=None, # type: Optional[str]", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: Optional[str] = None,", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "services": "ServicesOperations", - "config_servers": "ConfigServersOperations", - "monitoring_settings": "MonitoringSettingsOperations", - "apps": "AppsOperations", - "bindings": "BindingsOperations", - "certificates": "CertificatesOperations", - "custom_domains": "CustomDomainsOperations", - "deployments": "DeploymentsOperations", - "operations": "Operations", - "runtime_versions": "RuntimeVersionsOperations", - "skus": "SkusOperations" - } -} \ No newline at end of file diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py old mode 100644 new mode 100755 index 92453d8691d..e5754a47ce6 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "1.0.0b1" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_app_platform_management_client.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_apps_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_bindings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_certificates_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_config_servers_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_custom_domains_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_deployments_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_monitoring_settings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_runtime_versions_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_services_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_skus_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_app_platform_management_client_enums.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py old mode 100644 new mode 100755 index 6a3b321f02f..1b64478e417 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py @@ -1388,6 +1388,8 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2020_11_01_preview.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str """ _attribute_map = { @@ -1401,6 +1403,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1418,6 +1421,7 @@ def __init__( self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.dimensions = kwargs.get('dimensions', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) class MonitoringSettingProperties(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py old mode 100644 new mode 100755 index ad133e58850..e8b893255fd --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py @@ -1518,6 +1518,8 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2020_11_01_preview.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str """ _attribute_map = { @@ -1531,6 +1533,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1546,6 +1549,7 @@ def __init__( supported_time_grain_types: Optional[List[str]] = None, fill_gap_with_zero: Optional[bool] = None, dimensions: Optional[List["MetricDimension"]] = None, + source_mdm_namespace: Optional[str] = None, **kwargs ): super(MetricSpecification, self).__init__(**kwargs) @@ -1559,6 +1563,7 @@ def __init__( self.supported_time_grain_types = supported_time_grain_types self.fill_gap_with_zero = fill_gap_with_zero self.dimensions = dimensions + self.source_mdm_namespace = source_mdm_namespace class MonitoringSettingProperties(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_apps_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_bindings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_certificates_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_config_servers_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_custom_domains_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_deployments_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_monitoring_settings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_runtime_versions_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_services_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_skus_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/py.typed b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_app_platform_management_client.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_metadata.json b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_metadata.json deleted file mode 100644 index c8bb068cd9a..00000000000 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_metadata.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "chosen_version": "2021-06-01-preview", - "total_api_version_list": ["2021-06-01-preview"], - "client": { - "name": "AppPlatformManagementClient", - "filename": "_app_platform_management_client", - "description": "REST API for Azure Spring Cloud.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=None, # type: Optional[str]", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: Optional[str] = None,", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "services": "ServicesOperations", - "config_servers": "ConfigServersOperations", - "monitoring_settings": "MonitoringSettingsOperations", - "apps": "AppsOperations", - "bindings": "BindingsOperations", - "certificates": "CertificatesOperations", - "custom_domains": "CustomDomainsOperations", - "deployments": "DeploymentsOperations", - "operations": "Operations", - "runtime_versions": "RuntimeVersionsOperations", - "skus": "SkusOperations" - } -} \ No newline at end of file diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py old mode 100644 new mode 100755 index 92453d8691d..e5754a47ce6 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "1.0.0b1" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_app_platform_management_client.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_configuration.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_apps_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_bindings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_certificates_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_config_servers_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_custom_domains_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_deployments_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_monitoring_settings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_runtime_versions_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_services_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_skus_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_app_platform_management_client_enums.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py old mode 100644 new mode 100755 index 0fff45f07e4..7b45b3b5041 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py @@ -227,11 +227,11 @@ def __init__( self.provisioning_state = None self.active_deployment_name = kwargs.get('active_deployment_name', None) self.fqdn = kwargs.get('fqdn', None) - self.https_only = kwargs.get('https_only', None) + self.https_only = kwargs.get('https_only', False) self.created_time = None self.temporary_disk = kwargs.get('temporary_disk', None) self.persistent_disk = kwargs.get('persistent_disk', None) - self.enable_end_to_end_tls = kwargs.get('enable_end_to_end_tls', None) + self.enable_end_to_end_tls = kwargs.get('enable_end_to_end_tls', False) class AvailableOperations(msrest.serialization.Model): @@ -1185,7 +1185,7 @@ class DeploymentSettings(msrest.serialization.Model): :param environment_variables: Collection of environment variables. :type environment_variables: dict[str, str] :param runtime_version: Runtime version. Possible values include: "Java_8", "Java_11", - "NetCore_31". + "NetCore_31". Default value: "Java_8". :type runtime_version: str or ~azure.mgmt.appplatform.v2021_06_01_preview.models.RuntimeVersion """ @@ -1210,7 +1210,7 @@ def __init__( self.jvm_options = kwargs.get('jvm_options', None) self.net_core_main_entry_path = kwargs.get('net_core_main_entry_path', None) self.environment_variables = kwargs.get('environment_variables', None) - self.runtime_version = kwargs.get('runtime_version', None) + self.runtime_version = kwargs.get('runtime_version', "Java_8") class Error(msrest.serialization.Model): @@ -1459,6 +1459,8 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2021_06_01_preview.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str """ _attribute_map = { @@ -1472,6 +1474,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1489,6 +1492,7 @@ def __init__( self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.dimensions = kwargs.get('dimensions', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) class MonitoringSettingProperties(msrest.serialization.Model): @@ -2425,7 +2429,7 @@ def __init__( ): super(TemporaryDisk, self).__init__(**kwargs) self.size_in_gb = kwargs.get('size_in_gb', None) - self.mount_path = kwargs.get('mount_path', None) + self.mount_path = kwargs.get('mount_path', "/tmp") class TestKeys(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py old mode 100644 new mode 100755 index f2bb0bee5df..abec200ca32 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py @@ -234,10 +234,10 @@ def __init__( public: Optional[bool] = None, active_deployment_name: Optional[str] = None, fqdn: Optional[str] = None, - https_only: Optional[bool] = None, + https_only: Optional[bool] = False, temporary_disk: Optional["TemporaryDisk"] = None, persistent_disk: Optional["PersistentDisk"] = None, - enable_end_to_end_tls: Optional[bool] = None, + enable_end_to_end_tls: Optional[bool] = False, **kwargs ): super(AppResourceProperties, self).__init__(**kwargs) @@ -1285,7 +1285,7 @@ class DeploymentSettings(msrest.serialization.Model): :param environment_variables: Collection of environment variables. :type environment_variables: dict[str, str] :param runtime_version: Runtime version. Possible values include: "Java_8", "Java_11", - "NetCore_31". + "NetCore_31". Default value: "Java_8". :type runtime_version: str or ~azure.mgmt.appplatform.v2021_06_01_preview.models.RuntimeVersion """ @@ -1308,7 +1308,7 @@ def __init__( jvm_options: Optional[str] = None, net_core_main_entry_path: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, - runtime_version: Optional[Union[str, "RuntimeVersion"]] = None, + runtime_version: Optional[Union[str, "RuntimeVersion"]] = "Java_8", **kwargs ): super(DeploymentSettings, self).__init__(**kwargs) @@ -1599,6 +1599,8 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2021_06_01_preview.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str """ _attribute_map = { @@ -1612,6 +1614,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1627,6 +1630,7 @@ def __init__( supported_time_grain_types: Optional[List[str]] = None, fill_gap_with_zero: Optional[bool] = None, dimensions: Optional[List["MetricDimension"]] = None, + source_mdm_namespace: Optional[str] = None, **kwargs ): super(MetricSpecification, self).__init__(**kwargs) @@ -1640,6 +1644,7 @@ def __init__( self.supported_time_grain_types = supported_time_grain_types self.fill_gap_with_zero = fill_gap_with_zero self.dimensions = dimensions + self.source_mdm_namespace = source_mdm_namespace class MonitoringSettingProperties(msrest.serialization.Model): @@ -2675,7 +2680,7 @@ def __init__( self, *, size_in_gb: Optional[int] = None, - mount_path: Optional[str] = None, + mount_path: Optional[str] = "/tmp", **kwargs ): super(TemporaryDisk, self).__init__(**kwargs) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/__init__.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_apps_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_bindings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_certificates_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_config_servers_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_custom_domains_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_deployments_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_monitoring_settings_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_runtime_versions_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_services_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_skus_operations.py old mode 100644 new mode 100755 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/py.typed b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/__init__.py new file mode 100755 index 00000000000..d2ddf950056 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._app_platform_management_client import AppPlatformManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['AppPlatformManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_app_platform_management_client.py new file mode 100755 index 00000000000..2f120a460b9 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_app_platform_management_client.py @@ -0,0 +1,144 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import AppPlatformManagementClientConfiguration +from .operations import ServicesOperations +from .operations import ConfigServersOperations +from .operations import MonitoringSettingsOperations +from .operations import AppsOperations +from .operations import BindingsOperations +from .operations import StoragesOperations +from .operations import CertificatesOperations +from .operations import CustomDomainsOperations +from .operations import DeploymentsOperations +from .operations import Operations +from .operations import RuntimeVersionsOperations +from .operations import SkusOperations +from . import models + + +class AppPlatformManagementClient(object): + """REST API for Azure Spring Cloud. + + :ivar services: ServicesOperations operations + :vartype services: azure.mgmt.appplatform.v2021_09_01_preview.operations.ServicesOperations + :ivar config_servers: ConfigServersOperations operations + :vartype config_servers: azure.mgmt.appplatform.v2021_09_01_preview.operations.ConfigServersOperations + :ivar monitoring_settings: MonitoringSettingsOperations operations + :vartype monitoring_settings: azure.mgmt.appplatform.v2021_09_01_preview.operations.MonitoringSettingsOperations + :ivar apps: AppsOperations operations + :vartype apps: azure.mgmt.appplatform.v2021_09_01_preview.operations.AppsOperations + :ivar bindings: BindingsOperations operations + :vartype bindings: azure.mgmt.appplatform.v2021_09_01_preview.operations.BindingsOperations + :ivar storages: StoragesOperations operations + :vartype storages: azure.mgmt.appplatform.v2021_09_01_preview.operations.StoragesOperations + :ivar certificates: CertificatesOperations operations + :vartype certificates: azure.mgmt.appplatform.v2021_09_01_preview.operations.CertificatesOperations + :ivar custom_domains: CustomDomainsOperations operations + :vartype custom_domains: azure.mgmt.appplatform.v2021_09_01_preview.operations.CustomDomainsOperations + :ivar deployments: DeploymentsOperations operations + :vartype deployments: azure.mgmt.appplatform.v2021_09_01_preview.operations.DeploymentsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.appplatform.v2021_09_01_preview.operations.Operations + :ivar runtime_versions: RuntimeVersionsOperations operations + :vartype runtime_versions: azure.mgmt.appplatform.v2021_09_01_preview.operations.RuntimeVersionsOperations + :ivar skus: SkusOperations operations + :vartype skus: azure.mgmt.appplatform.v2021_09_01_preview.operations.SkusOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = AppPlatformManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.services = ServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.config_servers = ConfigServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.monitoring_settings = MonitoringSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.apps = AppsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.bindings = BindingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.storages = StoragesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.certificates = CertificatesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.custom_domains = CustomDomainsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.deployments = DeploymentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.runtime_versions = RuntimeVersionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.skus = SkusOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> AppPlatformManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_configuration.py new file mode 100755 index 00000000000..e3b3c943b4e --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class AppPlatformManagementClientConfiguration(Configuration): + """Configuration for AppPlatformManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(AppPlatformManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-appplatform/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_version.py new file mode 100755 index 00000000000..e5754a47ce6 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/__init__.py new file mode 100755 index 00000000000..39f10548873 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._app_platform_management_client import AppPlatformManagementClient +__all__ = ['AppPlatformManagementClient'] diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/_app_platform_management_client.py new file mode 100755 index 00000000000..c8694042146 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/_app_platform_management_client.py @@ -0,0 +1,137 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import AppPlatformManagementClientConfiguration +from .operations import ServicesOperations +from .operations import ConfigServersOperations +from .operations import MonitoringSettingsOperations +from .operations import AppsOperations +from .operations import BindingsOperations +from .operations import StoragesOperations +from .operations import CertificatesOperations +from .operations import CustomDomainsOperations +from .operations import DeploymentsOperations +from .operations import Operations +from .operations import RuntimeVersionsOperations +from .operations import SkusOperations +from .. import models + + +class AppPlatformManagementClient(object): + """REST API for Azure Spring Cloud. + + :ivar services: ServicesOperations operations + :vartype services: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.ServicesOperations + :ivar config_servers: ConfigServersOperations operations + :vartype config_servers: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.ConfigServersOperations + :ivar monitoring_settings: MonitoringSettingsOperations operations + :vartype monitoring_settings: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.MonitoringSettingsOperations + :ivar apps: AppsOperations operations + :vartype apps: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.AppsOperations + :ivar bindings: BindingsOperations operations + :vartype bindings: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.BindingsOperations + :ivar storages: StoragesOperations operations + :vartype storages: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.StoragesOperations + :ivar certificates: CertificatesOperations operations + :vartype certificates: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.CertificatesOperations + :ivar custom_domains: CustomDomainsOperations operations + :vartype custom_domains: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.CustomDomainsOperations + :ivar deployments: DeploymentsOperations operations + :vartype deployments: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.DeploymentsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.Operations + :ivar runtime_versions: RuntimeVersionsOperations operations + :vartype runtime_versions: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.RuntimeVersionsOperations + :ivar skus: SkusOperations operations + :vartype skus: azure.mgmt.appplatform.v2021_09_01_preview.aio.operations.SkusOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = AppPlatformManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.services = ServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.config_servers = ConfigServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.monitoring_settings = MonitoringSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.apps = AppsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.bindings = BindingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.storages = StoragesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.certificates = CertificatesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.custom_domains = CustomDomainsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.deployments = DeploymentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.runtime_versions = RuntimeVersionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.skus = SkusOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "AppPlatformManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/_configuration.py new file mode 100755 index 00000000000..987657fd65f --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class AppPlatformManagementClientConfiguration(Configuration): + """Configuration for AppPlatformManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(AppPlatformManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-appplatform/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/__init__.py new file mode 100755 index 00000000000..97c71859bbd --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/__init__.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._services_operations import ServicesOperations +from ._config_servers_operations import ConfigServersOperations +from ._monitoring_settings_operations import MonitoringSettingsOperations +from ._apps_operations import AppsOperations +from ._bindings_operations import BindingsOperations +from ._storages_operations import StoragesOperations +from ._certificates_operations import CertificatesOperations +from ._custom_domains_operations import CustomDomainsOperations +from ._deployments_operations import DeploymentsOperations +from ._operations import Operations +from ._runtime_versions_operations import RuntimeVersionsOperations +from ._skus_operations import SkusOperations + +__all__ = [ + 'ServicesOperations', + 'ConfigServersOperations', + 'MonitoringSettingsOperations', + 'AppsOperations', + 'BindingsOperations', + 'StoragesOperations', + 'CertificatesOperations', + 'CustomDomainsOperations', + 'DeploymentsOperations', + 'Operations', + 'RuntimeVersionsOperations', + 'SkusOperations', +] diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_apps_operations.py new file mode 100755 index 00000000000..6aa56a5cb40 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_apps_operations.py @@ -0,0 +1,712 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AppsOperations: + """AppsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + service_name: str, + app_name: str, + sync_status: Optional[str] = None, + **kwargs: Any + ) -> "_models.AppResource": + """Get an App and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param sync_status: Indicates whether sync status. + :type sync_status: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if sync_status is not None: + query_parameters['syncStatus'] = self._serialize.query("sync_status", sync_status, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + app_resource: "_models.AppResource", + **kwargs: Any + ) -> "_models.AppResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_resource, 'AppResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + app_name: str, + app_resource: "_models.AppResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.AppResource"]: + """Create a new App or update an exiting App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param app_resource: Parameters for the create or update operation. + :type app_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AppResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + app_resource=app_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + app_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Operation to delete an App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + app_resource: "_models.AppResource", + **kwargs: Any + ) -> "_models.AppResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_resource, 'AppResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + service_name: str, + app_name: str, + app_resource: "_models.AppResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.AppResource"]: + """Operation to update an exiting App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param app_resource: Parameters for the update operation. + :type app_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AppResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + app_resource=app_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + def list( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AppResourceCollection"]: + """Handles requests to list all resources in a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AppResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps'} # type: ignore + + async def get_resource_upload_url( + self, + resource_group_name: str, + service_name: str, + app_name: str, + **kwargs: Any + ) -> "_models.ResourceUploadDefinition": + """Get an resource upload URL for an App, which may be artifacts or source archive. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceUploadDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceUploadDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceUploadDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_resource_upload_url.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceUploadDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_resource_upload_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl'} # type: ignore + + async def validate_domain( + self, + resource_group_name: str, + service_name: str, + app_name: str, + validate_payload: "_models.CustomDomainValidatePayload", + **kwargs: Any + ) -> "_models.CustomDomainValidateResult": + """Check the resource name is valid as well as not in use. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param validate_payload: Custom domain payload to be validated. + :type validate_payload: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainValidatePayload + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomDomainValidateResult, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainValidateResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainValidateResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_domain.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_payload, 'CustomDomainValidatePayload') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomDomainValidateResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/validateDomain'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_bindings_operations.py new file mode 100755 index 00000000000..e04b1377962 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_bindings_operations.py @@ -0,0 +1,602 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BindingsOperations: + """BindingsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + service_name: str, + app_name: str, + binding_name: str, + **kwargs: Any + ) -> "_models.BindingResource": + """Get a Binding and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BindingResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + binding_name: str, + binding_resource: "_models.BindingResource", + **kwargs: Any + ) -> "_models.BindingResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(binding_resource, 'BindingResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + app_name: str, + binding_name: str, + binding_resource: "_models.BindingResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.BindingResource"]: + """Create a new Binding or update an exiting Binding. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :param binding_resource: Parameters for the create or update operation. + :type binding_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BindingResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + binding_resource=binding_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + binding_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + app_name: str, + binding_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Operation to delete a Binding. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + binding_name: str, + binding_resource: "_models.BindingResource", + **kwargs: Any + ) -> "_models.BindingResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(binding_resource, 'BindingResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + service_name: str, + app_name: str, + binding_name: str, + binding_resource: "_models.BindingResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.BindingResource"]: + """Operation to update an exiting Binding. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :param binding_resource: Parameters for the update operation. + :type binding_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BindingResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + binding_resource=binding_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + def list( + self, + resource_group_name: str, + service_name: str, + app_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.BindingResourceCollection"]: + """Handles requests to list all resources in an App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BindingResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BindingResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_certificates_operations.py new file mode 100755 index 00000000000..da8a9ebd586 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_certificates_operations.py @@ -0,0 +1,437 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CertificatesOperations: + """CertificatesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + service_name: str, + certificate_name: str, + **kwargs: Any + ) -> "_models.CertificateResource": + """Get the certificate resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param certificate_name: The name of the certificate resource. + :type certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CertificateResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + certificate_name: str, + certificate_resource: "_models.CertificateResource", + **kwargs: Any + ) -> "_models.CertificateResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_resource, 'CertificateResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + certificate_name: str, + certificate_resource: "_models.CertificateResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.CertificateResource"]: + """Create or update certificate resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param certificate_name: The name of the certificate resource. + :type certificate_name: str + :param certificate_resource: Parameters for the create or update operation. + :type certificate_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CertificateResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_name=certificate_name, + certificate_resource=certificate_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + certificate_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + certificate_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete the certificate resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param certificate_name: The name of the certificate resource. + :type certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_name=certificate_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + def list( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.CertificateResourceCollection"]: + """List all the certificates of one user. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CertificateResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CertificateResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_config_servers_operations.py new file mode 100755 index 00000000000..0a9e48f21c0 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_config_servers_operations.py @@ -0,0 +1,489 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ConfigServersOperations: + """ConfigServersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> "_models.ConfigServerResource": + """Get the config server and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigServerResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + async def _update_put_initial( + self, + resource_group_name: str, + service_name: str, + config_server_resource: "_models.ConfigServerResource", + **kwargs: Any + ) -> "_models.ConfigServerResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_put_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(config_server_resource, 'ConfigServerResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + async def begin_update_put( + self, + resource_group_name: str, + service_name: str, + config_server_resource: "_models.ConfigServerResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.ConfigServerResource"]: + """Update the config server. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param config_server_resource: Parameters for the update operation. + :type config_server_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConfigServerResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_put_initial( + resource_group_name=resource_group_name, + service_name=service_name, + config_server_resource=config_server_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + async def _update_patch_initial( + self, + resource_group_name: str, + service_name: str, + config_server_resource: "_models.ConfigServerResource", + **kwargs: Any + ) -> "_models.ConfigServerResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_patch_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(config_server_resource, 'ConfigServerResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_patch_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + async def begin_update_patch( + self, + resource_group_name: str, + service_name: str, + config_server_resource: "_models.ConfigServerResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.ConfigServerResource"]: + """Update the config server. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param config_server_resource: Parameters for the update operation. + :type config_server_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConfigServerResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_patch_initial( + resource_group_name=resource_group_name, + service_name=service_name, + config_server_resource=config_server_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + async def _validate_initial( + self, + resource_group_name: str, + service_name: str, + config_server_settings: "_models.ConfigServerSettings", + **kwargs: Any + ) -> "_models.ConfigServerSettingsValidateResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerSettingsValidateResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._validate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(config_server_settings, 'ConfigServerSettings') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerSettingsValidateResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerSettingsValidateResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _validate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate'} # type: ignore + + async def begin_validate( + self, + resource_group_name: str, + service_name: str, + config_server_settings: "_models.ConfigServerSettings", + **kwargs: Any + ) -> AsyncLROPoller["_models.ConfigServerSettingsValidateResult"]: + """Check if the config server settings are valid. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param config_server_settings: Config server settings to be validated. + :type config_server_settings: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConfigServerSettingsValidateResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerSettingsValidateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerSettingsValidateResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._validate_initial( + resource_group_name=resource_group_name, + service_name=service_name, + config_server_settings=config_server_settings, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigServerSettingsValidateResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_custom_domains_operations.py new file mode 100755 index 00000000000..d177c42ecfb --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_custom_domains_operations.py @@ -0,0 +1,602 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CustomDomainsOperations: + """CustomDomainsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + service_name: str, + app_name: str, + domain_name: str, + **kwargs: Any + ) -> "_models.CustomDomainResource": + """Get the custom domain of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomDomainResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + domain_name: str, + domain_resource: "_models.CustomDomainResource", + **kwargs: Any + ) -> "_models.CustomDomainResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_resource, 'CustomDomainResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + app_name: str, + domain_name: str, + domain_resource: "_models.CustomDomainResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.CustomDomainResource"]: + """Create or update custom domain of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :param domain_resource: Parameters for the create or update operation. + :type domain_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + domain_resource=domain_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + domain_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + app_name: str, + domain_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete the custom domain of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + domain_name: str, + domain_resource: "_models.CustomDomainResource", + **kwargs: Any + ) -> "_models.CustomDomainResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_resource, 'CustomDomainResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + service_name: str, + app_name: str, + domain_name: str, + domain_resource: "_models.CustomDomainResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.CustomDomainResource"]: + """Update custom domain of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :param domain_resource: Parameters for the create or update operation. + :type domain_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + domain_resource=domain_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + def list( + self, + resource_group_name: str, + service_name: str, + app_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.CustomDomainResourceCollection"]: + """List the custom domains of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CustomDomainResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CustomDomainResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_deployments_operations.py new file mode 100755 index 00000000000..af3f05fe7b4 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_deployments_operations.py @@ -0,0 +1,1125 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DeploymentsOperations: + """DeploymentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> "_models.DeploymentResource": + """Get a Deployment and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + deployment_resource: "_models.DeploymentResource", + **kwargs: Any + ) -> "_models.DeploymentResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment_resource, 'DeploymentResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + deployment_resource: "_models.DeploymentResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.DeploymentResource"]: + """Create a new Deployment or update an exiting Deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :param deployment_resource: Parameters for the create or update operation. + :type deployment_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + deployment_resource=deployment_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Operation to delete a Deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + deployment_resource: "_models.DeploymentResource", + **kwargs: Any + ) -> "_models.DeploymentResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment_resource, 'DeploymentResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + deployment_resource: "_models.DeploymentResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.DeploymentResource"]: + """Operation to update an exiting Deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :param deployment_resource: Parameters for the update operation. + :type deployment_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + deployment_resource=deployment_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + def list( + self, + resource_group_name: str, + service_name: str, + app_name: str, + version: Optional[List[str]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.DeploymentResourceCollection"]: + """Handles requests to list all resources in an App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param version: Version of the deployments to be listed. + :type version: list[str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if version is not None: + query_parameters['version'] = [self._serialize.query("version", q, 'str') if q is not None else '' for q in version] + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments'} # type: ignore + + def list_for_cluster( + self, + resource_group_name: str, + service_name: str, + version: Optional[List[str]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.DeploymentResourceCollection"]: + """List deployments for a certain service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param version: Version of the deployments to be listed. + :type version: list[str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_for_cluster.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if version is not None: + query_parameters['version'] = [self._serialize.query("version", q, 'str') if q is not None else '' for q in version] + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_for_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments'} # type: ignore + + async def _start_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start'} # type: ignore + + async def begin_start( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Start the deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start'} # type: ignore + + async def _stop_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop'} # type: ignore + + async def begin_stop( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Stop the deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop'} # type: ignore + + async def _restart_initial( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._restart_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restart_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart'} # type: ignore + + async def begin_restart( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Restart the deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restart_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart'} # type: ignore + + async def get_log_file_url( + self, + resource_group_name: str, + service_name: str, + app_name: str, + deployment_name: str, + **kwargs: Any + ) -> Optional["_models.LogFileUrlResponse"]: + """Get deployment log file URL. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LogFileUrlResponse, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.LogFileUrlResponse or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.LogFileUrlResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_log_file_url.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LogFileUrlResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_log_file_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getLogFileUrl'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_monitoring_settings_operations.py new file mode 100755 index 00000000000..a5fc03172e4 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_monitoring_settings_operations.py @@ -0,0 +1,360 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MonitoringSettingsOperations: + """MonitoringSettingsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> "_models.MonitoringSettingResource": + """Get the Monitoring Setting and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MonitoringSettingResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore + + async def _update_put_initial( + self, + resource_group_name: str, + service_name: str, + monitoring_setting_resource: "_models.MonitoringSettingResource", + **kwargs: Any + ) -> "_models.MonitoringSettingResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_put_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(monitoring_setting_resource, 'MonitoringSettingResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore + + async def begin_update_put( + self, + resource_group_name: str, + service_name: str, + monitoring_setting_resource: "_models.MonitoringSettingResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.MonitoringSettingResource"]: + """Update the Monitoring Setting. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param monitoring_setting_resource: Parameters for the update operation. + :type monitoring_setting_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MonitoringSettingResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_put_initial( + resource_group_name=resource_group_name, + service_name=service_name, + monitoring_setting_resource=monitoring_setting_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore + + async def _update_patch_initial( + self, + resource_group_name: str, + service_name: str, + monitoring_setting_resource: "_models.MonitoringSettingResource", + **kwargs: Any + ) -> "_models.MonitoringSettingResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_patch_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(monitoring_setting_resource, 'MonitoringSettingResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_patch_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore + + async def begin_update_patch( + self, + resource_group_name: str, + service_name: str, + monitoring_setting_resource: "_models.MonitoringSettingResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.MonitoringSettingResource"]: + """Update the Monitoring Setting. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param monitoring_setting_resource: Parameters for the update operation. + :type monitoring_setting_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MonitoringSettingResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_patch_initial( + resource_group_name=resource_group_name, + service_name=service_name, + monitoring_setting_resource=monitoring_setting_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_operations.py new file mode 100755 index 00000000000..4e200df142c --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AvailableOperations"]: + """Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableOperations or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.AvailableOperations] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableOperations', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.AppPlatform/operations'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_runtime_versions_operations.py new file mode 100755 index 00000000000..aed78e05840 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_runtime_versions_operations.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RuntimeVersionsOperations: + """RuntimeVersionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_runtime_versions( + self, + **kwargs: Any + ) -> "_models.AvailableRuntimeVersions": + """Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AvailableRuntimeVersions, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AvailableRuntimeVersions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableRuntimeVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_runtime_versions.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AvailableRuntimeVersions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_runtime_versions.metadata = {'url': '/providers/Microsoft.AppPlatform/runtimeVersions'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_services_operations.py new file mode 100755 index 00000000000..e05cb2acbb0 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_services_operations.py @@ -0,0 +1,913 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServicesOperations: + """ServicesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> "_models.ServiceResource": + """Get a Service and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + resource: "_models.ServiceResource", + **kwargs: Any + ) -> "_models.ServiceResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(resource, 'ServiceResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + resource: "_models.ServiceResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.ServiceResource"]: + """Create a new Service or update an exiting Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param resource: Parameters for the create or update operation. + :type resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ServiceResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + resource=resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Operation to delete a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + service_name: str, + resource: "_models.ServiceResource", + **kwargs: Any + ) -> "_models.ServiceResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(resource, 'ServiceResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + service_name: str, + resource: "_models.ServiceResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.ServiceResource"]: + """Operation to update an exiting Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param resource: Parameters for the update operation. + :type resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ServiceResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + resource=resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + async def list_test_keys( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> "_models.TestKeys": + """List test keys for a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TestKeys, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.TestKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_test_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_test_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys'} # type: ignore + + async def regenerate_test_key( + self, + resource_group_name: str, + service_name: str, + regenerate_test_key_request: "_models.RegenerateTestKeyRequestPayload", + **kwargs: Any + ) -> "_models.TestKeys": + """Regenerate a test key for a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param regenerate_test_key_request: Parameters for the operation. + :type regenerate_test_key_request: ~azure.mgmt.appplatform.v2021_09_01_preview.models.RegenerateTestKeyRequestPayload + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TestKeys, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.TestKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_test_key.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(regenerate_test_key_request, 'RegenerateTestKeyRequestPayload') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_test_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/regenerateTestKey'} # type: ignore + + async def disable_test_endpoint( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> None: + """Disable test endpoint functionality for a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.disable_test_endpoint.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_test_endpoint.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableTestEndpoint'} # type: ignore + + async def enable_test_endpoint( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> "_models.TestKeys": + """Enable test endpoint functionality for a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TestKeys, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.TestKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.enable_test_endpoint.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + enable_test_endpoint.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableTestEndpoint'} # type: ignore + + async def check_name_availability( + self, + location: str, + availability_parameters: "_models.NameAvailabilityParameters", + **kwargs: Any + ) -> "_models.NameAvailability": + """Checks that the resource name is valid and is not already in use. + + :param location: the region. + :type location: str + :param availability_parameters: Parameters supplied to the operation. + :type availability_parameters: ~azure.mgmt.appplatform.v2021_09_01_preview.models.NameAvailabilityParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NameAvailability, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.NameAvailability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(availability_parameters, 'NameAvailabilityParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NameAvailability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ServiceResourceList"]: + """Handles requests to list all resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring'} # type: ignore + + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ServiceResourceList"]: + """Handles requests to list all resources in a resource group. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_skus_operations.py new file mode 100755 index 00000000000..f89076c649b --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_skus_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SkusOperations: + """SkusOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ResourceSkuCollection"]: + """Lists all of the available skus of the Microsoft.AppPlatform provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceSkuCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceSkuCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceSkuCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_storages_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_storages_operations.py new file mode 100755 index 00000000000..e470058c3ec --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/aio/operations/_storages_operations.py @@ -0,0 +1,437 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class StoragesOperations: + """StoragesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + service_name: str, + storage_name: str, + **kwargs: Any + ) -> "_models.StorageResource": + """Get the storage resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param storage_name: The name of the storage resource. + :type storage_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StorageResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StorageResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + storage_name: str, + storage_resource: "_models.StorageResource", + **kwargs: Any + ) -> "_models.StorageResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(storage_resource, 'StorageResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StorageResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('StorageResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StorageResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + storage_name: str, + storage_resource: "_models.StorageResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.StorageResource"]: + """Create or update storage resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param storage_name: The name of the storage resource. + :type storage_name: str + :param storage_resource: Parameters for the create or update operation. + :type storage_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either StorageResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + storage_name=storage_name, + storage_resource=storage_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StorageResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + storage_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + storage_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete the storage resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param storage_name: The name of the storage resource. + :type storage_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + storage_name=storage_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + def list( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.StorageResourceCollection"]: + """List all the storages of one Azure Spring Cloud instance. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StorageResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StorageResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/__init__.py new file mode 100755 index 00000000000..2455fc2d6ab --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/__init__.py @@ -0,0 +1,299 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AppResource + from ._models_py3 import AppResourceCollection + from ._models_py3 import AppResourceProperties + from ._models_py3 import ApplicationInsightsAgentVersions + from ._models_py3 import AvailableOperations + from ._models_py3 import AvailableRuntimeVersions + from ._models_py3 import AzureFileVolume + from ._models_py3 import BindingResource + from ._models_py3 import BindingResourceCollection + from ._models_py3 import BindingResourceProperties + from ._models_py3 import CertificateProperties + from ._models_py3 import CertificateResource + from ._models_py3 import CertificateResourceCollection + from ._models_py3 import CloudErrorBody + from ._models_py3 import ClusterResourceProperties + from ._models_py3 import ConfigServerGitProperty + from ._models_py3 import ConfigServerProperties + from ._models_py3 import ConfigServerResource + from ._models_py3 import ConfigServerSettings + from ._models_py3 import ConfigServerSettingsErrorRecord + from ._models_py3 import ConfigServerSettingsValidateResult + from ._models_py3 import ContentCertificateProperties + from ._models_py3 import CustomContainer + from ._models_py3 import CustomDomainProperties + from ._models_py3 import CustomDomainResource + from ._models_py3 import CustomDomainResourceCollection + from ._models_py3 import CustomDomainValidatePayload + from ._models_py3 import CustomDomainValidateResult + from ._models_py3 import CustomPersistentDiskProperties + from ._models_py3 import CustomPersistentDiskResource + from ._models_py3 import DeploymentInstance + from ._models_py3 import DeploymentResource + from ._models_py3 import DeploymentResourceCollection + from ._models_py3 import DeploymentResourceProperties + from ._models_py3 import DeploymentSettings + from ._models_py3 import Error + from ._models_py3 import GitPatternRepository + from ._models_py3 import ImageRegistryCredential + from ._models_py3 import KeyVaultCertificateProperties + from ._models_py3 import LoadedCertificate + from ._models_py3 import LogFileUrlResponse + from ._models_py3 import LogSpecification + from ._models_py3 import ManagedIdentityProperties + from ._models_py3 import MetricDimension + from ._models_py3 import MetricSpecification + from ._models_py3 import MonitoringSettingProperties + from ._models_py3 import MonitoringSettingResource + from ._models_py3 import NameAvailability + from ._models_py3 import NameAvailabilityParameters + from ._models_py3 import NetworkProfile + from ._models_py3 import NetworkProfileOutboundIPs + from ._models_py3 import OperationDetail + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationProperties + from ._models_py3 import PersistentDisk + from ._models_py3 import ProxyResource + from ._models_py3 import RegenerateTestKeyRequestPayload + from ._models_py3 import RequiredTraffic + from ._models_py3 import Resource + from ._models_py3 import ResourceRequests + from ._models_py3 import ResourceSku + from ._models_py3 import ResourceSkuCapabilities + from ._models_py3 import ResourceSkuCollection + from ._models_py3 import ResourceSkuLocationInfo + from ._models_py3 import ResourceSkuRestrictionInfo + from ._models_py3 import ResourceSkuRestrictions + from ._models_py3 import ResourceSkuZoneDetails + from ._models_py3 import ResourceUploadDefinition + from ._models_py3 import ServiceResource + from ._models_py3 import ServiceResourceList + from ._models_py3 import ServiceSpecification + from ._models_py3 import Sku + from ._models_py3 import SkuCapacity + from ._models_py3 import StorageAccount + from ._models_py3 import StorageProperties + from ._models_py3 import StorageResource + from ._models_py3 import StorageResourceCollection + from ._models_py3 import SupportedRuntimeVersion + from ._models_py3 import SystemData + from ._models_py3 import TemporaryDisk + from ._models_py3 import TestKeys + from ._models_py3 import TrackedResource + from ._models_py3 import UserSourceInfo +except (SyntaxError, ImportError): + from ._models import AppResource # type: ignore + from ._models import AppResourceCollection # type: ignore + from ._models import AppResourceProperties # type: ignore + from ._models import ApplicationInsightsAgentVersions # type: ignore + from ._models import AvailableOperations # type: ignore + from ._models import AvailableRuntimeVersions # type: ignore + from ._models import AzureFileVolume # type: ignore + from ._models import BindingResource # type: ignore + from ._models import BindingResourceCollection # type: ignore + from ._models import BindingResourceProperties # type: ignore + from ._models import CertificateProperties # type: ignore + from ._models import CertificateResource # type: ignore + from ._models import CertificateResourceCollection # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import ClusterResourceProperties # type: ignore + from ._models import ConfigServerGitProperty # type: ignore + from ._models import ConfigServerProperties # type: ignore + from ._models import ConfigServerResource # type: ignore + from ._models import ConfigServerSettings # type: ignore + from ._models import ConfigServerSettingsErrorRecord # type: ignore + from ._models import ConfigServerSettingsValidateResult # type: ignore + from ._models import ContentCertificateProperties # type: ignore + from ._models import CustomContainer # type: ignore + from ._models import CustomDomainProperties # type: ignore + from ._models import CustomDomainResource # type: ignore + from ._models import CustomDomainResourceCollection # type: ignore + from ._models import CustomDomainValidatePayload # type: ignore + from ._models import CustomDomainValidateResult # type: ignore + from ._models import CustomPersistentDiskProperties # type: ignore + from ._models import CustomPersistentDiskResource # type: ignore + from ._models import DeploymentInstance # type: ignore + from ._models import DeploymentResource # type: ignore + from ._models import DeploymentResourceCollection # type: ignore + from ._models import DeploymentResourceProperties # type: ignore + from ._models import DeploymentSettings # type: ignore + from ._models import Error # type: ignore + from ._models import GitPatternRepository # type: ignore + from ._models import ImageRegistryCredential # type: ignore + from ._models import KeyVaultCertificateProperties # type: ignore + from ._models import LoadedCertificate # type: ignore + from ._models import LogFileUrlResponse # type: ignore + from ._models import LogSpecification # type: ignore + from ._models import ManagedIdentityProperties # type: ignore + from ._models import MetricDimension # type: ignore + from ._models import MetricSpecification # type: ignore + from ._models import MonitoringSettingProperties # type: ignore + from ._models import MonitoringSettingResource # type: ignore + from ._models import NameAvailability # type: ignore + from ._models import NameAvailabilityParameters # type: ignore + from ._models import NetworkProfile # type: ignore + from ._models import NetworkProfileOutboundIPs # type: ignore + from ._models import OperationDetail # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationProperties # type: ignore + from ._models import PersistentDisk # type: ignore + from ._models import ProxyResource # type: ignore + from ._models import RegenerateTestKeyRequestPayload # type: ignore + from ._models import RequiredTraffic # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceRequests # type: ignore + from ._models import ResourceSku # type: ignore + from ._models import ResourceSkuCapabilities # type: ignore + from ._models import ResourceSkuCollection # type: ignore + from ._models import ResourceSkuLocationInfo # type: ignore + from ._models import ResourceSkuRestrictionInfo # type: ignore + from ._models import ResourceSkuRestrictions # type: ignore + from ._models import ResourceSkuZoneDetails # type: ignore + from ._models import ResourceUploadDefinition # type: ignore + from ._models import ServiceResource # type: ignore + from ._models import ServiceResourceList # type: ignore + from ._models import ServiceSpecification # type: ignore + from ._models import Sku # type: ignore + from ._models import SkuCapacity # type: ignore + from ._models import StorageAccount # type: ignore + from ._models import StorageProperties # type: ignore + from ._models import StorageResource # type: ignore + from ._models import StorageResourceCollection # type: ignore + from ._models import SupportedRuntimeVersion # type: ignore + from ._models import SystemData # type: ignore + from ._models import TemporaryDisk # type: ignore + from ._models import TestKeys # type: ignore + from ._models import TrackedResource # type: ignore + from ._models import UserSourceInfo # type: ignore + +from ._app_platform_management_client_enums import ( + AppResourceProvisioningState, + ConfigServerState, + CreatedByType, + DeploymentResourceProvisioningState, + DeploymentResourceStatus, + ManagedIdentityType, + MonitoringSettingState, + ProvisioningState, + ResourceSkuRestrictionsReasonCode, + ResourceSkuRestrictionsType, + RuntimeVersion, + SkuScaleType, + SupportedRuntimePlatform, + SupportedRuntimeValue, + TestKeyType, + TrafficDirection, + UserSourceType, +) + +__all__ = [ + 'AppResource', + 'AppResourceCollection', + 'AppResourceProperties', + 'ApplicationInsightsAgentVersions', + 'AvailableOperations', + 'AvailableRuntimeVersions', + 'AzureFileVolume', + 'BindingResource', + 'BindingResourceCollection', + 'BindingResourceProperties', + 'CertificateProperties', + 'CertificateResource', + 'CertificateResourceCollection', + 'CloudErrorBody', + 'ClusterResourceProperties', + 'ConfigServerGitProperty', + 'ConfigServerProperties', + 'ConfigServerResource', + 'ConfigServerSettings', + 'ConfigServerSettingsErrorRecord', + 'ConfigServerSettingsValidateResult', + 'ContentCertificateProperties', + 'CustomContainer', + 'CustomDomainProperties', + 'CustomDomainResource', + 'CustomDomainResourceCollection', + 'CustomDomainValidatePayload', + 'CustomDomainValidateResult', + 'CustomPersistentDiskProperties', + 'CustomPersistentDiskResource', + 'DeploymentInstance', + 'DeploymentResource', + 'DeploymentResourceCollection', + 'DeploymentResourceProperties', + 'DeploymentSettings', + 'Error', + 'GitPatternRepository', + 'ImageRegistryCredential', + 'KeyVaultCertificateProperties', + 'LoadedCertificate', + 'LogFileUrlResponse', + 'LogSpecification', + 'ManagedIdentityProperties', + 'MetricDimension', + 'MetricSpecification', + 'MonitoringSettingProperties', + 'MonitoringSettingResource', + 'NameAvailability', + 'NameAvailabilityParameters', + 'NetworkProfile', + 'NetworkProfileOutboundIPs', + 'OperationDetail', + 'OperationDisplay', + 'OperationProperties', + 'PersistentDisk', + 'ProxyResource', + 'RegenerateTestKeyRequestPayload', + 'RequiredTraffic', + 'Resource', + 'ResourceRequests', + 'ResourceSku', + 'ResourceSkuCapabilities', + 'ResourceSkuCollection', + 'ResourceSkuLocationInfo', + 'ResourceSkuRestrictionInfo', + 'ResourceSkuRestrictions', + 'ResourceSkuZoneDetails', + 'ResourceUploadDefinition', + 'ServiceResource', + 'ServiceResourceList', + 'ServiceSpecification', + 'Sku', + 'SkuCapacity', + 'StorageAccount', + 'StorageProperties', + 'StorageResource', + 'StorageResourceCollection', + 'SupportedRuntimeVersion', + 'SystemData', + 'TemporaryDisk', + 'TestKeys', + 'TrackedResource', + 'UserSourceInfo', + 'AppResourceProvisioningState', + 'ConfigServerState', + 'CreatedByType', + 'DeploymentResourceProvisioningState', + 'DeploymentResourceStatus', + 'ManagedIdentityType', + 'MonitoringSettingState', + 'ProvisioningState', + 'ResourceSkuRestrictionsReasonCode', + 'ResourceSkuRestrictionsType', + 'RuntimeVersion', + 'SkuScaleType', + 'SupportedRuntimePlatform', + 'SupportedRuntimeValue', + 'TestKeyType', + 'TrafficDirection', + 'UserSourceType', +] diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_app_platform_management_client_enums.py new file mode 100755 index 00000000000..f40d11d89e2 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_app_platform_management_client_enums.py @@ -0,0 +1,177 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AppResourceProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the App + """ + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CREATING = "Creating" + UPDATING = "Updating" + +class ConfigServerState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """State of the config server. + """ + + NOT_AVAILABLE = "NotAvailable" + DELETED = "Deleted" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class DeploymentResourceProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the Deployment + """ + + CREATING = "Creating" + UPDATING = "Updating" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class DeploymentResourceStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of the Deployment + """ + + UNKNOWN = "Unknown" + STOPPED = "Stopped" + RUNNING = "Running" + FAILED = "Failed" + ALLOCATING = "Allocating" + UPGRADING = "Upgrading" + COMPILING = "Compiling" + +class ManagedIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the managed identity + """ + + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + +class MonitoringSettingState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """State of the Monitoring Setting. + """ + + NOT_AVAILABLE = "NotAvailable" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the Service + """ + + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + DELETED = "Deleted" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + MOVING = "Moving" + MOVED = "Moved" + MOVE_FAILED = "MoveFailed" + +class ResourceSkuRestrictionsReasonCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets the reason for restriction. Possible values include: 'QuotaId', + 'NotAvailableForSubscription' + """ + + QUOTA_ID = "QuotaId" + NOT_AVAILABLE_FOR_SUBSCRIPTION = "NotAvailableForSubscription" + +class ResourceSkuRestrictionsType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets the type of restrictions. Possible values include: 'Location', 'Zone' + """ + + LOCATION = "Location" + ZONE = "Zone" + +class RuntimeVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Runtime version + """ + + JAVA8 = "Java_8" + JAVA11 = "Java_11" + NET_CORE31 = "NetCore_31" + +class SkuScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type of the scale. + """ + + NONE = "None" + MANUAL = "Manual" + AUTOMATIC = "Automatic" + +class SupportedRuntimePlatform(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The platform of this runtime version (possible values: "Java" or ".NET"). + """ + + JAVA = "Java" + _NET_CORE = ".NET Core" + +class SupportedRuntimeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The raw value which could be passed to deployment CRUD operations. + """ + + JAVA8 = "Java_8" + JAVA11 = "Java_11" + NET_CORE31 = "NetCore_31" + +class TestKeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the test key + """ + + PRIMARY = "Primary" + SECONDARY = "Secondary" + +class TrafficDirection(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The direction of required traffic + """ + + INBOUND = "Inbound" + OUTBOUND = "Outbound" + +class UserSourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the source uploaded + """ + + JAR = "Jar" + NET_CORE_ZIP = "NetCoreZip" + SOURCE = "Source" + CONTAINER = "Container" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_models.py new file mode 100755 index 00000000000..85ba16d6e6a --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_models.py @@ -0,0 +1,2968 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import msrest.serialization + + +class ApplicationInsightsAgentVersions(msrest.serialization.Model): + """Application Insights agent versions properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar java: Indicates the version of application insight java agent. + :vartype java: str + """ + + _validation = { + 'java': {'readonly': True}, + } + + _attribute_map = { + 'java': {'key': 'java', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationInsightsAgentVersions, self).__init__(**kwargs) + self.java = None + + +class Resource(msrest.serialization.Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class AppResource(ProxyResource): + """App resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the App resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResourceProperties + :param identity: The Managed Identity type of the app resource. + :type identity: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ManagedIdentityProperties + :param location: The GEO location of the application, always the same with its parent resource. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AppResourceProperties'}, + 'identity': {'key': 'identity', 'type': 'ManagedIdentityProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + + +class AppResourceCollection(msrest.serialization.Model): + """Object that includes an array of App resources and a possible link for next set. + + :param value: Collection of App resources. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AppResourceProperties(msrest.serialization.Model): + """App resource properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param public: Indicates whether the App exposes public endpoint. + :type public: bool + :ivar url: URL of the App. + :vartype url: str + :ivar provisioning_state: Provisioning state of the App. Possible values include: "Succeeded", + "Failed", "Creating", "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResourceProvisioningState + :param active_deployment_name: Name of the active deployment of the App. + :type active_deployment_name: str + :param fqdn: Fully qualified dns Name. + :type fqdn: str + :param https_only: Indicate if only https is allowed. + :type https_only: bool + :ivar created_time: Date time when the resource is created. + :vartype created_time: ~datetime.datetime + :param temporary_disk: Temporary disk settings. + :type temporary_disk: ~azure.mgmt.appplatform.v2021_09_01_preview.models.TemporaryDisk + :param persistent_disk: Persistent disk settings. + :type persistent_disk: ~azure.mgmt.appplatform.v2021_09_01_preview.models.PersistentDisk + :param custom_persistent_disks: List of custom persistent disks. + :type custom_persistent_disks: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomPersistentDiskResource] + :param enable_end_to_end_tls: Indicate if end to end TLS is enabled. + :type enable_end_to_end_tls: bool + :param loaded_certificates: Collection of loaded certificates. + :type loaded_certificates: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.LoadedCertificate] + """ + + _validation = { + 'url': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + } + + _attribute_map = { + 'public': {'key': 'public', 'type': 'bool'}, + 'url': {'key': 'url', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'active_deployment_name': {'key': 'activeDeploymentName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'https_only': {'key': 'httpsOnly', 'type': 'bool'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'temporary_disk': {'key': 'temporaryDisk', 'type': 'TemporaryDisk'}, + 'persistent_disk': {'key': 'persistentDisk', 'type': 'PersistentDisk'}, + 'custom_persistent_disks': {'key': 'customPersistentDisks', 'type': '[CustomPersistentDiskResource]'}, + 'enable_end_to_end_tls': {'key': 'enableEndToEndTLS', 'type': 'bool'}, + 'loaded_certificates': {'key': 'loadedCertificates', 'type': '[LoadedCertificate]'}, + } + + def __init__( + self, + **kwargs + ): + super(AppResourceProperties, self).__init__(**kwargs) + self.public = kwargs.get('public', None) + self.url = None + self.provisioning_state = None + self.active_deployment_name = kwargs.get('active_deployment_name', None) + self.fqdn = kwargs.get('fqdn', None) + self.https_only = kwargs.get('https_only', False) + self.created_time = None + self.temporary_disk = kwargs.get('temporary_disk', None) + self.persistent_disk = kwargs.get('persistent_disk', None) + self.custom_persistent_disks = kwargs.get('custom_persistent_disks', None) + self.enable_end_to_end_tls = kwargs.get('enable_end_to_end_tls', False) + self.loaded_certificates = kwargs.get('loaded_certificates', None) + + +class AvailableOperations(msrest.serialization.Model): + """Available operations of the service. + + :param value: Collection of available operation details. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.OperationDetail] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationDetail]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableOperations, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AvailableRuntimeVersions(msrest.serialization.Model): + """AvailableRuntimeVersions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of all supported runtime versions. + :vartype value: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.SupportedRuntimeVersion] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + +class CustomPersistentDiskProperties(msrest.serialization.Model): + """Custom persistent disk resource payload. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileVolume. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the underlying resource to mount as a persistent + disk.Constant filled by server. + :type type: str + :param mount_path: Required. The mount path of the persistent disk. + :type mount_path: str + :param readonly: Indicates whether the persistent disk is a readonly one. + :type readonly: bool + :param mount_options: These are the mount options for a persistent disk. + :type mount_options: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'mount_path': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'readonly': {'key': 'readonly', 'type': 'bool'}, + 'mount_options': {'key': 'mountOptions', 'type': '[str]'}, + } + + _subtype_map = { + 'type': {'AzureFileVolume': 'AzureFileVolume'} + } + + def __init__( + self, + **kwargs + ): + super(CustomPersistentDiskProperties, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.mount_path = kwargs['mount_path'] + self.readonly = kwargs.get('readonly', None) + self.mount_options = kwargs.get('mount_options', None) + + +class AzureFileVolume(CustomPersistentDiskProperties): + """The properties of the Azure File volume. Azure File shares are mounted as volumes. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the underlying resource to mount as a persistent + disk.Constant filled by server. + :type type: str + :param mount_path: Required. The mount path of the persistent disk. + :type mount_path: str + :param readonly: Indicates whether the persistent disk is a readonly one. + :type readonly: bool + :param mount_options: These are the mount options for a persistent disk. + :type mount_options: list[str] + :param share_name: Required. The share name of the Azure File share. + :type share_name: str + """ + + _validation = { + 'type': {'required': True}, + 'mount_path': {'required': True}, + 'share_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'readonly': {'key': 'readonly', 'type': 'bool'}, + 'mount_options': {'key': 'mountOptions', 'type': '[str]'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFileVolume, self).__init__(**kwargs) + self.type = 'AzureFileVolume' # type: str + self.share_name = kwargs['share_name'] + + +class BindingResource(ProxyResource): + """Binding resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Binding resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BindingResourceProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(BindingResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BindingResourceCollection(msrest.serialization.Model): + """Object that includes an array of Binding resources and a possible link for next set. + + :param value: Collection of Binding resources. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BindingResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BindingResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class BindingResourceProperties(msrest.serialization.Model): + """Binding resource properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_name: The name of the bound resource. + :vartype resource_name: str + :ivar resource_type: The standard Azure resource type of the bound resource. + :vartype resource_type: str + :param resource_id: The Azure resource id of the bound resource. + :type resource_id: str + :param key: The key of the bound resource. + :type key: str + :param binding_parameters: Binding parameters of the Binding resource. + :type binding_parameters: dict[str, any] + :ivar generated_properties: The generated Spring Boot property file for this binding. The + secret will be deducted. + :vartype generated_properties: str + :ivar created_at: Creation time of the Binding resource. + :vartype created_at: str + :ivar updated_at: Update time of the Binding resource. + :vartype updated_at: str + """ + + _validation = { + 'resource_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'generated_properties': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + } + + _attribute_map = { + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'binding_parameters': {'key': 'bindingParameters', 'type': '{object}'}, + 'generated_properties': {'key': 'generatedProperties', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'str'}, + 'updated_at': {'key': 'updatedAt', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BindingResourceProperties, self).__init__(**kwargs) + self.resource_name = None + self.resource_type = None + self.resource_id = kwargs.get('resource_id', None) + self.key = kwargs.get('key', None) + self.binding_parameters = kwargs.get('binding_parameters', None) + self.generated_properties = None + self.created_at = None + self.updated_at = None + + +class CertificateProperties(msrest.serialization.Model): + """Certificate resource payload. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ContentCertificateProperties, KeyVaultCertificateProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the certificate source.Constant filled by server. + :type type: str + :ivar thumbprint: The thumbprint of certificate. + :vartype thumbprint: str + :ivar issuer: The issuer of certificate. + :vartype issuer: str + :ivar issued_date: The issue date of certificate. + :vartype issued_date: str + :ivar expiration_date: The expiration date of certificate. + :vartype expiration_date: str + :ivar activate_date: The activate date of certificate. + :vartype activate_date: str + :ivar subject_name: The subject name of certificate. + :vartype subject_name: str + :ivar dns_names: The domain list of certificate. + :vartype dns_names: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issued_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'activate_date': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'dns_names': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'issued_date': {'key': 'issuedDate', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'str'}, + 'activate_date': {'key': 'activateDate', 'type': 'str'}, + 'subject_name': {'key': 'subjectName', 'type': 'str'}, + 'dns_names': {'key': 'dnsNames', 'type': '[str]'}, + } + + _subtype_map = { + 'type': {'ContentCertificate': 'ContentCertificateProperties', 'KeyVaultCertificate': 'KeyVaultCertificateProperties'} + } + + def __init__( + self, + **kwargs + ): + super(CertificateProperties, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.thumbprint = None + self.issuer = None + self.issued_date = None + self.expiration_date = None + self.activate_date = None + self.subject_name = None + self.dns_names = None + + +class CertificateResource(ProxyResource): + """Certificate resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the certificate resource payload. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(CertificateResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class CertificateResourceCollection(msrest.serialization.Model): + """Collection compose of certificate resources list and a possible link for next page. + + :param value: The certificate resources list. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResource] + :param next_link: The link to next page of certificate list. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CertificateResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ClusterResourceProperties(msrest.serialization.Model): + """Service properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: Provisioning state of the Service. Possible values include: + "Creating", "Updating", "Deleting", "Deleted", "Succeeded", "Failed", "Moving", "Moved", + "MoveFailed". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ProvisioningState + :param network_profile: Network profile of the Service. + :type network_profile: ~azure.mgmt.appplatform.v2021_09_01_preview.models.NetworkProfile + :ivar version: Version of the Service. + :vartype version: int + :ivar service_id: ServiceInstanceEntity GUID which uniquely identifies a created resource. + :vartype service_id: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'version': {'readonly': True}, + 'service_id': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'network_profile': {'key': 'networkProfile', 'type': 'NetworkProfile'}, + 'version': {'key': 'version', 'type': 'int'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.network_profile = kwargs.get('network_profile', None) + self.version = None + self.service_id = None + + +class ConfigServerGitProperty(msrest.serialization.Model): + """Property of git. + + All required parameters must be populated in order to send to Azure. + + :param repositories: Repositories of git. + :type repositories: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.GitPatternRepository] + :param uri: Required. URI of the repository. + :type uri: str + :param label: Label of the repository. + :type label: str + :param search_paths: Searching path of the repository. + :type search_paths: list[str] + :param username: Username of git repository basic auth. + :type username: str + :param password: Password of git repository basic auth. + :type password: str + :param host_key: Public sshKey of git repository. + :type host_key: str + :param host_key_algorithm: SshKey algorithm of git repository. + :type host_key_algorithm: str + :param private_key: Private sshKey algorithm of git repository. + :type private_key: str + :param strict_host_key_checking: Strict host key checking or not. + :type strict_host_key_checking: bool + """ + + _validation = { + 'uri': {'required': True}, + } + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[GitPatternRepository]'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'search_paths': {'key': 'searchPaths', 'type': '[str]'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'host_key': {'key': 'hostKey', 'type': 'str'}, + 'host_key_algorithm': {'key': 'hostKeyAlgorithm', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'strict_host_key_checking': {'key': 'strictHostKeyChecking', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigServerGitProperty, self).__init__(**kwargs) + self.repositories = kwargs.get('repositories', None) + self.uri = kwargs['uri'] + self.label = kwargs.get('label', None) + self.search_paths = kwargs.get('search_paths', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.host_key = kwargs.get('host_key', None) + self.host_key_algorithm = kwargs.get('host_key_algorithm', None) + self.private_key = kwargs.get('private_key', None) + self.strict_host_key_checking = kwargs.get('strict_host_key_checking', None) + + +class ConfigServerProperties(msrest.serialization.Model): + """Config server git properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: State of the config server. Possible values include: "NotAvailable", + "Deleted", "Failed", "Succeeded", "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerState + :param error: Error when apply config server settings. + :type error: ~azure.mgmt.appplatform.v2021_09_01_preview.models.Error + :param config_server: Settings of config server. + :type config_server: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerSettings + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'config_server': {'key': 'configServer', 'type': 'ConfigServerSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigServerProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.error = kwargs.get('error', None) + self.config_server = kwargs.get('config_server', None) + + +class ConfigServerResource(ProxyResource): + """Config Server resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Config Server resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ConfigServerProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigServerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ConfigServerSettings(msrest.serialization.Model): + """The settings of config server. + + :param git_property: Property of git environment. + :type git_property: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerGitProperty + """ + + _attribute_map = { + 'git_property': {'key': 'gitProperty', 'type': 'ConfigServerGitProperty'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigServerSettings, self).__init__(**kwargs) + self.git_property = kwargs.get('git_property', None) + + +class ConfigServerSettingsErrorRecord(msrest.serialization.Model): + """Error record of the config server settings. + + :param name: The name of the config server settings error record. + :type name: str + :param uri: The uri of the config server settings error record. + :type uri: str + :param messages: The detail error messages of the record. + :type messages: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'messages': {'key': 'messages', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigServerSettingsErrorRecord, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.uri = kwargs.get('uri', None) + self.messages = kwargs.get('messages', None) + + +class ConfigServerSettingsValidateResult(msrest.serialization.Model): + """Validation result for config server settings. + + :param is_valid: Indicate if the config server settings are valid. + :type is_valid: bool + :param details: The detail validation results. + :type details: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerSettingsErrorRecord] + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'details': {'key': 'details', 'type': '[ConfigServerSettingsErrorRecord]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigServerSettingsValidateResult, self).__init__(**kwargs) + self.is_valid = kwargs.get('is_valid', None) + self.details = kwargs.get('details', None) + + +class ContentCertificateProperties(CertificateProperties): + """Properties of certificate imported from key vault. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the certificate source.Constant filled by server. + :type type: str + :ivar thumbprint: The thumbprint of certificate. + :vartype thumbprint: str + :ivar issuer: The issuer of certificate. + :vartype issuer: str + :ivar issued_date: The issue date of certificate. + :vartype issued_date: str + :ivar expiration_date: The expiration date of certificate. + :vartype expiration_date: str + :ivar activate_date: The activate date of certificate. + :vartype activate_date: str + :ivar subject_name: The subject name of certificate. + :vartype subject_name: str + :ivar dns_names: The domain list of certificate. + :vartype dns_names: list[str] + :param content: Required. The content of uploaded certificate. + :type content: str + """ + + _validation = { + 'type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issued_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'activate_date': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'dns_names': {'readonly': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'issued_date': {'key': 'issuedDate', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'str'}, + 'activate_date': {'key': 'activateDate', 'type': 'str'}, + 'subject_name': {'key': 'subjectName', 'type': 'str'}, + 'dns_names': {'key': 'dnsNames', 'type': '[str]'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContentCertificateProperties, self).__init__(**kwargs) + self.type = 'ContentCertificate' # type: str + self.content = kwargs['content'] + + +class CustomContainer(msrest.serialization.Model): + """Custom container payload. + + :param server: The name of the registry that contains the container image. + :type server: str + :param container_image: Container image of the custom container. This should be in the form of + :code:``::code:`` without the server name of the registry. + :type container_image: str + :param command: Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is + used if this is not provided. + :type command: list[str] + :param args: Arguments to the entrypoint. The docker image's CMD is used if this is not + provided. + :type args: list[str] + :param image_registry_credential: Credential of the image registry. + :type image_registry_credential: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ImageRegistryCredential + """ + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'container_image': {'key': 'containerImage', 'type': 'str'}, + 'command': {'key': 'command', 'type': '[str]'}, + 'args': {'key': 'args', 'type': '[str]'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomContainer, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.container_image = kwargs.get('container_image', None) + self.command = kwargs.get('command', None) + self.args = kwargs.get('args', None) + self.image_registry_credential = kwargs.get('image_registry_credential', None) + + +class CustomDomainProperties(msrest.serialization.Model): + """Custom domain of app resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param thumbprint: The thumbprint of bound certificate. + :type thumbprint: str + :ivar app_name: The app name of domain. + :vartype app_name: str + :param cert_name: The bound certificate name of domain. + :type cert_name: str + """ + + _validation = { + 'app_name': {'readonly': True}, + } + + _attribute_map = { + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'app_name': {'key': 'appName', 'type': 'str'}, + 'cert_name': {'key': 'certName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomDomainProperties, self).__init__(**kwargs) + self.thumbprint = kwargs.get('thumbprint', None) + self.app_name = None + self.cert_name = kwargs.get('cert_name', None) + + +class CustomDomainResource(ProxyResource): + """Custom domain resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the custom domain resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CustomDomainProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomDomainResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class CustomDomainResourceCollection(msrest.serialization.Model): + """Collection compose of a custom domain resources list and a possible link for next page. + + :param value: The custom domain resources list. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource] + :param next_link: The link to next page of custom domain list. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CustomDomainResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomDomainResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class CustomDomainValidatePayload(msrest.serialization.Model): + """Custom domain validate payload. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name to be validated. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomDomainValidatePayload, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class CustomDomainValidateResult(msrest.serialization.Model): + """Validation result for custom domain. + + :param is_valid: Indicates if domain name is valid. + :type is_valid: bool + :param message: Message of why domain name is invalid. + :type message: str + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomDomainValidateResult, self).__init__(**kwargs) + self.is_valid = kwargs.get('is_valid', None) + self.message = kwargs.get('message', None) + + +class CustomPersistentDiskResource(msrest.serialization.Model): + """Custom persistent disk resource payload. + + All required parameters must be populated in order to send to Azure. + + :param custom_persistent_disk_properties: Properties of the custom persistent disk resource + payload. + :type custom_persistent_disk_properties: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomPersistentDiskProperties + :param storage_id: Required. The resource id of Azure Spring Cloud Storage resource. + :type storage_id: str + """ + + _validation = { + 'storage_id': {'required': True}, + } + + _attribute_map = { + 'custom_persistent_disk_properties': {'key': 'customPersistentDiskProperties', 'type': 'CustomPersistentDiskProperties'}, + 'storage_id': {'key': 'storageId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomPersistentDiskResource, self).__init__(**kwargs) + self.custom_persistent_disk_properties = kwargs.get('custom_persistent_disk_properties', None) + self.storage_id = kwargs['storage_id'] + + +class DeploymentInstance(msrest.serialization.Model): + """Deployment instance payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the deployment instance. + :vartype name: str + :ivar status: Status of the deployment instance. + :vartype status: str + :ivar reason: Failed reason of the deployment instance. + :vartype reason: str + :ivar discovery_status: Discovery status of the deployment instance. + :vartype discovery_status: str + :ivar start_time: Start time of the deployment instance. + :vartype start_time: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'reason': {'readonly': True}, + 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'discovery_status': {'key': 'discoveryStatus', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentInstance, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = None + self.discovery_status = None + self.start_time = None + + +class DeploymentResource(ProxyResource): + """Deployment resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Deployment resource. + :type properties: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource. + :type sku: ~azure.mgmt.appplatform.v2021_09_01_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeploymentResourceProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + + +class DeploymentResourceCollection(msrest.serialization.Model): + """Object that includes an array of App resources and a possible link for next set. + + :param value: Collection of Deployment resources. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeploymentResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class DeploymentResourceProperties(msrest.serialization.Model): + """Deployment resource properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param source: Uploaded source information of the deployment. + :type source: ~azure.mgmt.appplatform.v2021_09_01_preview.models.UserSourceInfo + :ivar app_name: App name of the deployment. + :vartype app_name: str + :param deployment_settings: Deployment settings of the Deployment. + :type deployment_settings: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentSettings + :ivar provisioning_state: Provisioning state of the Deployment. Possible values include: + "Creating", "Updating", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceProvisioningState + :ivar status: Status of the Deployment. Possible values include: "Unknown", "Stopped", + "Running", "Failed", "Allocating", "Upgrading", "Compiling". + :vartype status: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceStatus + :ivar active: Indicates whether the Deployment is active. + :vartype active: bool + :ivar created_time: Date time when the resource is created. + :vartype created_time: ~datetime.datetime + :ivar instances: Collection of instances belong to the Deployment. + :vartype instances: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentInstance] + """ + + _validation = { + 'app_name': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'active': {'readonly': True}, + 'created_time': {'readonly': True}, + 'instances': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'UserSourceInfo'}, + 'app_name': {'key': 'appName', 'type': 'str'}, + 'deployment_settings': {'key': 'deploymentSettings', 'type': 'DeploymentSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'active': {'key': 'active', 'type': 'bool'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'instances': {'key': 'instances', 'type': '[DeploymentInstance]'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentResourceProperties, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.app_name = None + self.deployment_settings = kwargs.get('deployment_settings', None) + self.provisioning_state = None + self.status = None + self.active = None + self.created_time = None + self.instances = None + + +class DeploymentSettings(msrest.serialization.Model): + """Deployment settings payload. + + :param cpu: Required CPU. This should be 1 for Basic tier, and in range [1, 4] for Standard + tier. This is deprecated starting from API version 2021-09-01-preview. Please use the + resourceRequests field to set the CPU size. + :type cpu: int + :param memory_in_gb: Required Memory size in GB. This should be in range [1, 2] for Basic tier, + and in range [1, 8] for Standard tier. This is deprecated starting from API version + 2021-09-01-preview. Please use the resourceRequests field to set the the memory size. + :type memory_in_gb: int + :param resource_requests: The requested resource quantity for required CPU and Memory. It is + recommended that using this field to represent the required CPU and Memory, the old field cpu + and memoryInGB will be deprecated later. + :type resource_requests: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceRequests + :param jvm_options: JVM parameter. + :type jvm_options: str + :param net_core_main_entry_path: The path to the .NET executable relative to zip root. + :type net_core_main_entry_path: str + :param environment_variables: Collection of environment variables. + :type environment_variables: dict[str, str] + :param runtime_version: Runtime version. Possible values include: "Java_8", "Java_11", + "NetCore_31". Default value: "Java_8". + :type runtime_version: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.RuntimeVersion + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, + 'resource_requests': {'key': 'resourceRequests', 'type': 'ResourceRequests'}, + 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, + 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentSettings, self).__init__(**kwargs) + self.cpu = kwargs.get('cpu', 1) + self.memory_in_gb = kwargs.get('memory_in_gb', 1) + self.resource_requests = kwargs.get('resource_requests', None) + self.jvm_options = kwargs.get('jvm_options', None) + self.net_core_main_entry_path = kwargs.get('net_core_main_entry_path', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.runtime_version = kwargs.get('runtime_version', "Java_8") + + +class Error(msrest.serialization.Model): + """The error code compose of code and message. + + :param code: The code of error. + :type code: str + :param message: The message of error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class GitPatternRepository(msrest.serialization.Model): + """Git repository property payload. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the repository. + :type name: str + :param pattern: Collection of pattern of the repository. + :type pattern: list[str] + :param uri: Required. URI of the repository. + :type uri: str + :param label: Label of the repository. + :type label: str + :param search_paths: Searching path of the repository. + :type search_paths: list[str] + :param username: Username of git repository basic auth. + :type username: str + :param password: Password of git repository basic auth. + :type password: str + :param host_key: Public sshKey of git repository. + :type host_key: str + :param host_key_algorithm: SshKey algorithm of git repository. + :type host_key_algorithm: str + :param private_key: Private sshKey algorithm of git repository. + :type private_key: str + :param strict_host_key_checking: Strict host key checking or not. + :type strict_host_key_checking: bool + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': '[str]'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'search_paths': {'key': 'searchPaths', 'type': '[str]'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'host_key': {'key': 'hostKey', 'type': 'str'}, + 'host_key_algorithm': {'key': 'hostKeyAlgorithm', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'strict_host_key_checking': {'key': 'strictHostKeyChecking', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(GitPatternRepository, self).__init__(**kwargs) + self.name = kwargs['name'] + self.pattern = kwargs.get('pattern', None) + self.uri = kwargs['uri'] + self.label = kwargs.get('label', None) + self.search_paths = kwargs.get('search_paths', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.host_key = kwargs.get('host_key', None) + self.host_key_algorithm = kwargs.get('host_key_algorithm', None) + self.private_key = kwargs.get('private_key', None) + self.strict_host_key_checking = kwargs.get('strict_host_key_checking', None) + + +class ImageRegistryCredential(msrest.serialization.Model): + """Credential of the image registry. + + :param username: The username of the image registry credential. + :type username: str + :param password: The password of the image registry credential. + :type password: str + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImageRegistryCredential, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class KeyVaultCertificateProperties(CertificateProperties): + """Properties of certificate imported from key vault. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the certificate source.Constant filled by server. + :type type: str + :ivar thumbprint: The thumbprint of certificate. + :vartype thumbprint: str + :ivar issuer: The issuer of certificate. + :vartype issuer: str + :ivar issued_date: The issue date of certificate. + :vartype issued_date: str + :ivar expiration_date: The expiration date of certificate. + :vartype expiration_date: str + :ivar activate_date: The activate date of certificate. + :vartype activate_date: str + :ivar subject_name: The subject name of certificate. + :vartype subject_name: str + :ivar dns_names: The domain list of certificate. + :vartype dns_names: list[str] + :param vault_uri: Required. The vault uri of user key vault. + :type vault_uri: str + :param key_vault_cert_name: Required. The certificate name of key vault. + :type key_vault_cert_name: str + :param cert_version: The certificate version of key vault. + :type cert_version: str + :param exclude_private_key: Optional. If set to true, it will not import private key from key + vault. + :type exclude_private_key: bool + """ + + _validation = { + 'type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issued_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'activate_date': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'dns_names': {'readonly': True}, + 'vault_uri': {'required': True}, + 'key_vault_cert_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'issued_date': {'key': 'issuedDate', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'str'}, + 'activate_date': {'key': 'activateDate', 'type': 'str'}, + 'subject_name': {'key': 'subjectName', 'type': 'str'}, + 'dns_names': {'key': 'dnsNames', 'type': '[str]'}, + 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'key_vault_cert_name': {'key': 'keyVaultCertName', 'type': 'str'}, + 'cert_version': {'key': 'certVersion', 'type': 'str'}, + 'exclude_private_key': {'key': 'excludePrivateKey', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultCertificateProperties, self).__init__(**kwargs) + self.type = 'KeyVaultCertificate' # type: str + self.vault_uri = kwargs['vault_uri'] + self.key_vault_cert_name = kwargs['key_vault_cert_name'] + self.cert_version = kwargs.get('cert_version', None) + self.exclude_private_key = kwargs.get('exclude_private_key', False) + + +class LoadedCertificate(msrest.serialization.Model): + """Loaded certificate payload. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. Resource Id of loaded certificate. + :type resource_id: str + :param load_trust_store: Indicate whether the certificate will be loaded into default trust + store, only work for Java runtime. + :type load_trust_store: bool + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'load_trust_store': {'key': 'loadTrustStore', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadedCertificate, self).__init__(**kwargs) + self.resource_id = kwargs['resource_id'] + self.load_trust_store = kwargs.get('load_trust_store', False) + + +class LogFileUrlResponse(msrest.serialization.Model): + """Log file URL payload. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. URL of the log file. + :type url: str + """ + + _validation = { + 'url': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogFileUrlResponse, self).__init__(**kwargs) + self.url = kwargs['url'] + + +class LogSpecification(msrest.serialization.Model): + """Specifications of the Log for Azure Monitoring. + + :param name: Name of the log. + :type name: str + :param display_name: Localized friendly display name of the log. + :type display_name: str + :param blob_duration: Blob duration of the log. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class ManagedIdentityProperties(msrest.serialization.Model): + """Managed identity properties retrieved from ARM request headers. + + :param type: Type of the managed identity. Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :type type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.ManagedIdentityType + :param principal_id: Principal Id. + :type principal_id: str + :param tenant_id: Tenant Id. + :type tenant_id: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedIdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class MetricDimension(msrest.serialization.Model): + """Specifications of the Dimension of metrics. + + :param name: Name of the dimension. + :type name: str + :param display_name: Localized friendly display name of the dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Whether this dimension should be included for the Shoebox + export scenario. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricDimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class MetricSpecification(msrest.serialization.Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric. + :type name: str + :param display_name: Localized friendly display name of the metric. + :type display_name: str + :param display_description: Localized friendly description of the metric. + :type display_description: str + :param unit: Unit that makes sense for the metric. + :type unit: str + :param category: Name of the metric category that the metric belongs to. A metric can only + belong to a single category. + :type category: str + :param aggregation_type: Only provide one value for this field. Valid values: Average, Minimum, + Maximum, Total, Count. + :type aggregation_type: str + :param supported_aggregation_types: Supported aggregation types. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: Supported time grain types. + :type supported_time_grain_types: list[str] + :param fill_gap_with_zero: Optional. If set to true, then zero will be returned for time + duration where no metric is emitted/published. + :type fill_gap_with_zero: bool + :param dimensions: Dimensions of the metric. + :type dimensions: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.category = kwargs.get('category', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.dimensions = kwargs.get('dimensions', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) + + +class MonitoringSettingProperties(msrest.serialization.Model): + """Monitoring Setting properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: State of the Monitoring Setting. Possible values include: + "NotAvailable", "Failed", "Succeeded", "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingState + :param error: Error when apply Monitoring Setting changes. + :type error: ~azure.mgmt.appplatform.v2021_09_01_preview.models.Error + :param trace_enabled: Indicates whether enable the trace functionality, which will be + deprecated since api version 2020-11-01-preview. Please leverage appInsightsInstrumentationKey + to indicate if monitoringSettings enabled or not. + :type trace_enabled: bool + :param app_insights_instrumentation_key: Target application insight instrumentation key, null + or whitespace include empty will disable monitoringSettings. + :type app_insights_instrumentation_key: str + :param app_insights_sampling_rate: Indicates the sampling rate of application insight agent, + should be in range [0.0, 100.0]. + :type app_insights_sampling_rate: float + :param app_insights_agent_versions: Indicates the versions of application insight agent. + :type app_insights_agent_versions: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ApplicationInsightsAgentVersions + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'app_insights_sampling_rate': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'trace_enabled': {'key': 'traceEnabled', 'type': 'bool'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'app_insights_sampling_rate': {'key': 'appInsightsSamplingRate', 'type': 'float'}, + 'app_insights_agent_versions': {'key': 'appInsightsAgentVersions', 'type': 'ApplicationInsightsAgentVersions'}, + } + + def __init__( + self, + **kwargs + ): + super(MonitoringSettingProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.error = kwargs.get('error', None) + self.trace_enabled = kwargs.get('trace_enabled', None) + self.app_insights_instrumentation_key = kwargs.get('app_insights_instrumentation_key', None) + self.app_insights_sampling_rate = kwargs.get('app_insights_sampling_rate', None) + self.app_insights_agent_versions = kwargs.get('app_insights_agent_versions', None) + + +class MonitoringSettingResource(ProxyResource): + """Monitoring Setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Monitoring Setting resource. + :type properties: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'MonitoringSettingProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(MonitoringSettingResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class NameAvailability(msrest.serialization.Model): + """Name availability result payload. + + :param name_available: Indicates whether the name is available. + :type name_available: bool + :param reason: Reason why the name is not available. + :type reason: str + :param message: Message why the name is not available. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NameAvailability, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class NameAvailabilityParameters(msrest.serialization.Model): + """Name availability parameters payload. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of the resource to check name availability. + :type type: str + :param name: Required. Name to be checked. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NameAvailabilityParameters, self).__init__(**kwargs) + self.type = kwargs['type'] + self.name = kwargs['name'] + + +class NetworkProfile(msrest.serialization.Model): + """Service network profile payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param service_runtime_subnet_id: Fully qualified resource Id of the subnet to host Azure + Spring Cloud Service Runtime. + :type service_runtime_subnet_id: str + :param app_subnet_id: Fully qualified resource Id of the subnet to host Azure Spring Cloud + Apps. + :type app_subnet_id: str + :param service_cidr: Azure Spring Cloud service reserved CIDR. + :type service_cidr: str + :param service_runtime_network_resource_group: Name of the resource group containing network + resources of Azure Spring Cloud Service Runtime. + :type service_runtime_network_resource_group: str + :param app_network_resource_group: Name of the resource group containing network resources of + Azure Spring Cloud Apps. + :type app_network_resource_group: str + :ivar outbound_i_ps: Desired outbound IP resources for Azure Spring Cloud instance. + :vartype outbound_i_ps: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.NetworkProfileOutboundIPs + :ivar required_traffics: Required inbound or outbound traffics for Azure Spring Cloud instance. + :vartype required_traffics: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.RequiredTraffic] + """ + + _validation = { + 'outbound_i_ps': {'readonly': True}, + 'required_traffics': {'readonly': True}, + } + + _attribute_map = { + 'service_runtime_subnet_id': {'key': 'serviceRuntimeSubnetId', 'type': 'str'}, + 'app_subnet_id': {'key': 'appSubnetId', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, + 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, + 'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkProfile, self).__init__(**kwargs) + self.service_runtime_subnet_id = kwargs.get('service_runtime_subnet_id', None) + self.app_subnet_id = kwargs.get('app_subnet_id', None) + self.service_cidr = kwargs.get('service_cidr', None) + self.service_runtime_network_resource_group = kwargs.get('service_runtime_network_resource_group', None) + self.app_network_resource_group = kwargs.get('app_network_resource_group', None) + self.outbound_i_ps = None + self.required_traffics = None + + +class NetworkProfileOutboundIPs(msrest.serialization.Model): + """Desired outbound IP resources for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar public_i_ps: A list of public IP addresses. + :vartype public_i_ps: list[str] + """ + + _validation = { + 'public_i_ps': {'readonly': True}, + } + + _attribute_map = { + 'public_i_ps': {'key': 'publicIPs', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkProfileOutboundIPs, self).__init__(**kwargs) + self.public_i_ps = None + + +class OperationDetail(msrest.serialization.Model): + """Operation detail payload. + + :param name: Name of the operation. + :type name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :param display: Display of the operation. + :type display: ~azure.mgmt.appplatform.v2021_09_01_preview.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param properties: Properties of the operation. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDetail, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationDisplay(msrest.serialization.Model): + """Operation display payload. + + :param provider: Resource provider of the operation. + :type provider: str + :param resource: Resource of the operation. + :type resource: str + :param operation: Localized friendly name for the operation. + :type operation: str + :param description: Localized friendly description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationProperties(msrest.serialization.Model): + """Extra Operation properties. + + :param service_specification: Service specifications of the operation. + :type service_specification: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class PersistentDisk(msrest.serialization.Model): + """Persistent disk payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param size_in_gb: Size of the persistent disk in GB. + :type size_in_gb: int + :ivar used_in_gb: Size of the used persistent disk in GB. + :vartype used_in_gb: int + :param mount_path: Mount path of the persistent disk. + :type mount_path: str + """ + + _validation = { + 'size_in_gb': {'maximum': 50, 'minimum': 0}, + 'used_in_gb': {'readonly': True, 'maximum': 50, 'minimum': 0}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'used_in_gb': {'key': 'usedInGB', 'type': 'int'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PersistentDisk, self).__init__(**kwargs) + self.size_in_gb = kwargs.get('size_in_gb', None) + self.used_in_gb = None + self.mount_path = kwargs.get('mount_path', None) + + +class RegenerateTestKeyRequestPayload(msrest.serialization.Model): + """Regenerate test key request payload. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Type of the test key. Possible values include: "Primary", + "Secondary". + :type key_type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.TestKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegenerateTestKeyRequestPayload, self).__init__(**kwargs) + self.key_type = kwargs['key_type'] + + +class RequiredTraffic(msrest.serialization.Model): + """Required inbound or outbound traffic for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar protocol: The protocol of required traffic. + :vartype protocol: str + :ivar port: The port of required traffic. + :vartype port: int + :ivar ips: The ip list of required traffic. + :vartype ips: list[str] + :ivar fqdns: The FQDN list of required traffic. + :vartype fqdns: list[str] + :ivar direction: The direction of required traffic. Possible values include: "Inbound", + "Outbound". + :vartype direction: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.TrafficDirection + """ + + _validation = { + 'protocol': {'readonly': True}, + 'port': {'readonly': True}, + 'ips': {'readonly': True}, + 'fqdns': {'readonly': True}, + 'direction': {'readonly': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'ips': {'key': 'ips', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RequiredTraffic, self).__init__(**kwargs) + self.protocol = None + self.port = None + self.ips = None + self.fqdns = None + self.direction = None + + +class ResourceRequests(msrest.serialization.Model): + """Deployment resource request payload. + + :param cpu: Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for + Basic tier, and {500m, 1, 2, 3, 4} for Standard tier. + :type cpu: str + :param memory: Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be + {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. + :type memory: str + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'str'}, + 'memory': {'key': 'memory', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceRequests, self).__init__(**kwargs) + self.cpu = kwargs.get('cpu', None) + self.memory = kwargs.get('memory', None) + + +class ResourceSku(msrest.serialization.Model): + """Describes an available Azure Spring Cloud SKU. + + :param resource_type: Gets the type of resource the SKU applies to. + :type resource_type: str + :param name: Gets the name of SKU. + :type name: str + :param tier: Gets the tier of SKU. + :type tier: str + :param capacity: Gets the capacity of SKU. + :type capacity: ~azure.mgmt.appplatform.v2021_09_01_preview.models.SkuCapacity + :param locations: Gets the set of locations that the SKU is available. + :type locations: list[str] + :param location_info: Gets a list of locations and availability zones in those locations where + the SKU is available. + :type location_info: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuLocationInfo] + :param restrictions: Gets the restrictions because of which SKU cannot be used. This is + empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuRestrictions] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + self.locations = kwargs.get('locations', None) + self.location_info = kwargs.get('location_info', None) + self.restrictions = kwargs.get('restrictions', None) + + +class ResourceSkuCapabilities(msrest.serialization.Model): + """ResourceSkuCapabilities. + + :param name: Gets an invariant to describe the feature. + :type name: str + :param value: Gets an invariant if the feature is measured by quantity. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ResourceSkuCollection(msrest.serialization.Model): + """Object that includes an array of Azure Spring Cloud SKU and a possible link for next set. + + :param value: Collection of resource SKU. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSku] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ResourceSkuLocationInfo(msrest.serialization.Model): + """Locations and availability zones where the SKU is available. + + :param location: Gets location of the SKU. + :type location: str + :param zones: Gets list of availability zones where the SKU is supported. + :type zones: list[str] + :param zone_details: Gets details of capabilities available to a SKU in specific zones. + :type zone_details: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuZoneDetails] + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.zones = kwargs.get('zones', None) + self.zone_details = kwargs.get('zone_details', None) + + +class ResourceSkuRestrictionInfo(msrest.serialization.Model): + """Information about the restriction where the SKU cannot be used. + + :param locations: Gets locations where the SKU is restricted. + :type locations: list[str] + :param zones: Gets list of availability zones where the SKU is restricted. + :type zones: list[str] + """ + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = kwargs.get('locations', None) + self.zones = kwargs.get('zones', None) + + +class ResourceSkuRestrictions(msrest.serialization.Model): + """Restrictions where the SKU cannot be used. + + :param type: Gets the type of restrictions. Possible values include: 'Location', 'Zone'. + Possible values include: "Location", "Zone". + :type type: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuRestrictionsType + :param values: Gets the value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :type values: list[str] + :param restriction_info: Gets the information about the restriction where the SKU cannot be + used. + :type restriction_info: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuRestrictionInfo + :param reason_code: Gets the reason for restriction. Possible values include: 'QuotaId', + 'NotAvailableForSubscription'. Possible values include: "QuotaId", + "NotAvailableForSubscription". + :type reason_code: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuRestrictionsReasonCode + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.values = kwargs.get('values', None) + self.restriction_info = kwargs.get('restriction_info', None) + self.reason_code = kwargs.get('reason_code', None) + + +class ResourceSkuZoneDetails(msrest.serialization.Model): + """Details of capabilities available to a SKU in specific zones. + + :param name: Gets the set of zones that the SKU is available in with the + specified capabilities. + :type name: list[str] + :param capabilities: Gets a list of capabilities that are available for the SKU in the + specified list of zones. + :type capabilities: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuCapabilities] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.capabilities = kwargs.get('capabilities', None) + + +class ResourceUploadDefinition(msrest.serialization.Model): + """Resource upload definition payload. + + :param relative_path: Source relative path. + :type relative_path: str + :param upload_url: Upload URL. + :type upload_url: str + """ + + _attribute_map = { + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'upload_url': {'key': 'uploadUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceUploadDefinition, self).__init__(**kwargs) + self.relative_path = kwargs.get('relative_path', None) + self.upload_url = kwargs.get('upload_url', None) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The GEO location of the resource. + :type location: str + :param tags: A set of tags. Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ServiceResource(TrackedResource): + """Service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The GEO location of the resource. + :type location: str + :param tags: A set of tags. Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + :param properties: Properties of the Service resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ClusterResourceProperties + :param sku: Sku of the Service resource. + :type sku: ~azure.mgmt.appplatform.v2021_09_01_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + + +class ServiceResourceList(msrest.serialization.Model): + """Object that includes an array of Service resources and a possible link for next set. + + :param value: Collection of Service resources. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ServiceSpecification(msrest.serialization.Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring. + :type log_specifications: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.LogSpecification] + :param metric_specifications: Specifications of the Metrics for Azure Monitoring. + :type metric_specifications: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class Sku(msrest.serialization.Model): + """Sku of Azure Spring Cloud. + + :param name: Name of the Sku. + :type name: str + :param tier: Tier of the Sku. + :type tier: str + :param capacity: Current capacity of the target resource. + :type capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', "S0") + self.tier = kwargs.get('tier', "Standard") + self.capacity = kwargs.get('capacity', None) + + +class SkuCapacity(msrest.serialization.Model): + """The SKU capacity. + + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. Gets or sets the minimum. + :type minimum: int + :param maximum: Gets or sets the maximum. + :type maximum: int + :param default: Gets or sets the default. + :type default: int + :param scale_type: Gets or sets the type of the scale. Possible values include: "None", + "Manual", "Automatic". + :type scale_type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.SkuScaleType + """ + + _validation = { + 'minimum': {'required': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = kwargs['minimum'] + self.maximum = kwargs.get('maximum', None) + self.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class StorageProperties(msrest.serialization.Model): + """Storage resource payload. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StorageAccount. + + All required parameters must be populated in order to send to Azure. + + :param storage_type: Required. The type of the storage.Constant filled by server. + :type storage_type: str + """ + + _validation = { + 'storage_type': {'required': True}, + } + + _attribute_map = { + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + _subtype_map = { + 'storage_type': {'StorageAccount': 'StorageAccount'} + } + + def __init__( + self, + **kwargs + ): + super(StorageProperties, self).__init__(**kwargs) + self.storage_type = None # type: Optional[str] + + +class StorageAccount(StorageProperties): + """storage resource of type Azure Storage Account. + + All required parameters must be populated in order to send to Azure. + + :param storage_type: Required. The type of the storage.Constant filled by server. + :type storage_type: str + :param account_name: Required. The account name of the Azure Storage Account. + :type account_name: str + :param account_key: Required. The account key of the Azure Storage Account. + :type account_key: str + """ + + _validation = { + 'storage_type': {'required': True}, + 'account_name': {'required': True}, + 'account_key': {'required': True}, + } + + _attribute_map = { + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageAccount, self).__init__(**kwargs) + self.storage_type = 'StorageAccount' # type: str + self.account_name = kwargs['account_name'] + self.account_key = kwargs['account_key'] + + +class StorageResource(ProxyResource): + """Storage resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the storage resource payload. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.appplatform.v2021_09_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'StorageProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.system_data = None + + +class StorageResourceCollection(msrest.serialization.Model): + """Collection compose of storage resources list and a possible link for next page. + + :param value: The storage resources list. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResource] + :param next_link: The link to next page of storage list. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SupportedRuntimeVersion(msrest.serialization.Model): + """Supported deployment runtime version descriptor. + + :param value: The raw value which could be passed to deployment CRUD operations. Possible + values include: "Java_8", "Java_11", "NetCore_31". + :type value: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.SupportedRuntimeValue + :param platform: The platform of this runtime version (possible values: "Java" or ".NET"). + Possible values include: "Java", ".NET Core". + :type platform: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.SupportedRuntimePlatform + :param version: The detailed version (major.minor) of the platform. + :type version: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SupportedRuntimeVersion, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.platform = kwargs.get('platform', None) + self.version = kwargs.get('version', None) + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TemporaryDisk(msrest.serialization.Model): + """Temporary disk payload. + + :param size_in_gb: Size of the temporary disk in GB. + :type size_in_gb: int + :param mount_path: Mount path of the temporary disk. + :type mount_path: str + """ + + _validation = { + 'size_in_gb': {'maximum': 5, 'minimum': 0}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TemporaryDisk, self).__init__(**kwargs) + self.size_in_gb = kwargs.get('size_in_gb', None) + self.mount_path = kwargs.get('mount_path', "/tmp") + + +class TestKeys(msrest.serialization.Model): + """Test keys payload. + + :param primary_key: Primary key. + :type primary_key: str + :param secondary_key: Secondary key. + :type secondary_key: str + :param primary_test_endpoint: Primary test endpoint. + :type primary_test_endpoint: str + :param secondary_test_endpoint: Secondary test endpoint. + :type secondary_test_endpoint: str + :param enabled: Indicates whether the test endpoint feature enabled or not. + :type enabled: bool + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_test_endpoint': {'key': 'primaryTestEndpoint', 'type': 'str'}, + 'secondary_test_endpoint': {'key': 'secondaryTestEndpoint', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(TestKeys, self).__init__(**kwargs) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.primary_test_endpoint = kwargs.get('primary_test_endpoint', None) + self.secondary_test_endpoint = kwargs.get('secondary_test_endpoint', None) + self.enabled = kwargs.get('enabled', None) + + +class UserSourceInfo(msrest.serialization.Model): + """Source information for a deployment. + + :param type: Type of the source uploaded. Possible values include: "Jar", "NetCoreZip", + "Source", "Container". + :type type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.UserSourceType + :param relative_path: Relative path of the storage which stores the source. + :type relative_path: str + :param version: Version of the source. + :type version: str + :param artifact_selector: Selector for the artifact to be used for the deployment for + multi-module projects. This should be + the relative path to the target module/project. + :type artifact_selector: str + :param custom_container: Custom container payload. + :type custom_container: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomContainer + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'artifact_selector': {'key': 'artifactSelector', 'type': 'str'}, + 'custom_container': {'key': 'customContainer', 'type': 'CustomContainer'}, + } + + def __init__( + self, + **kwargs + ): + super(UserSourceInfo, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.relative_path = kwargs.get('relative_path', None) + self.version = kwargs.get('version', None) + self.artifact_selector = kwargs.get('artifact_selector', None) + self.custom_container = kwargs.get('custom_container', None) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_models_py3.py new file mode 100755 index 00000000000..1f4a5076d90 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/models/_models_py3.py @@ -0,0 +1,3272 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Any, Dict, List, Optional, Union + +import msrest.serialization + +from ._app_platform_management_client_enums import * + + +class ApplicationInsightsAgentVersions(msrest.serialization.Model): + """Application Insights agent versions properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar java: Indicates the version of application insight java agent. + :vartype java: str + """ + + _validation = { + 'java': {'readonly': True}, + } + + _attribute_map = { + 'java': {'key': 'java', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationInsightsAgentVersions, self).__init__(**kwargs) + self.java = None + + +class Resource(msrest.serialization.Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class AppResource(ProxyResource): + """App resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the App resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResourceProperties + :param identity: The Managed Identity type of the app resource. + :type identity: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ManagedIdentityProperties + :param location: The GEO location of the application, always the same with its parent resource. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AppResourceProperties'}, + 'identity': {'key': 'identity', 'type': 'ManagedIdentityProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + properties: Optional["AppResourceProperties"] = None, + identity: Optional["ManagedIdentityProperties"] = None, + location: Optional[str] = None, + **kwargs + ): + super(AppResource, self).__init__(**kwargs) + self.properties = properties + self.identity = identity + self.location = location + + +class AppResourceCollection(msrest.serialization.Model): + """Object that includes an array of App resources and a possible link for next set. + + :param value: Collection of App resources. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AppResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AppResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AppResourceProperties(msrest.serialization.Model): + """App resource properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param public: Indicates whether the App exposes public endpoint. + :type public: bool + :ivar url: URL of the App. + :vartype url: str + :ivar provisioning_state: Provisioning state of the App. Possible values include: "Succeeded", + "Failed", "Creating", "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResourceProvisioningState + :param active_deployment_name: Name of the active deployment of the App. + :type active_deployment_name: str + :param fqdn: Fully qualified dns Name. + :type fqdn: str + :param https_only: Indicate if only https is allowed. + :type https_only: bool + :ivar created_time: Date time when the resource is created. + :vartype created_time: ~datetime.datetime + :param temporary_disk: Temporary disk settings. + :type temporary_disk: ~azure.mgmt.appplatform.v2021_09_01_preview.models.TemporaryDisk + :param persistent_disk: Persistent disk settings. + :type persistent_disk: ~azure.mgmt.appplatform.v2021_09_01_preview.models.PersistentDisk + :param custom_persistent_disks: List of custom persistent disks. + :type custom_persistent_disks: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomPersistentDiskResource] + :param enable_end_to_end_tls: Indicate if end to end TLS is enabled. + :type enable_end_to_end_tls: bool + :param loaded_certificates: Collection of loaded certificates. + :type loaded_certificates: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.LoadedCertificate] + """ + + _validation = { + 'url': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + } + + _attribute_map = { + 'public': {'key': 'public', 'type': 'bool'}, + 'url': {'key': 'url', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'active_deployment_name': {'key': 'activeDeploymentName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'https_only': {'key': 'httpsOnly', 'type': 'bool'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'temporary_disk': {'key': 'temporaryDisk', 'type': 'TemporaryDisk'}, + 'persistent_disk': {'key': 'persistentDisk', 'type': 'PersistentDisk'}, + 'custom_persistent_disks': {'key': 'customPersistentDisks', 'type': '[CustomPersistentDiskResource]'}, + 'enable_end_to_end_tls': {'key': 'enableEndToEndTLS', 'type': 'bool'}, + 'loaded_certificates': {'key': 'loadedCertificates', 'type': '[LoadedCertificate]'}, + } + + def __init__( + self, + *, + public: Optional[bool] = None, + active_deployment_name: Optional[str] = None, + fqdn: Optional[str] = None, + https_only: Optional[bool] = False, + temporary_disk: Optional["TemporaryDisk"] = None, + persistent_disk: Optional["PersistentDisk"] = None, + custom_persistent_disks: Optional[List["CustomPersistentDiskResource"]] = None, + enable_end_to_end_tls: Optional[bool] = False, + loaded_certificates: Optional[List["LoadedCertificate"]] = None, + **kwargs + ): + super(AppResourceProperties, self).__init__(**kwargs) + self.public = public + self.url = None + self.provisioning_state = None + self.active_deployment_name = active_deployment_name + self.fqdn = fqdn + self.https_only = https_only + self.created_time = None + self.temporary_disk = temporary_disk + self.persistent_disk = persistent_disk + self.custom_persistent_disks = custom_persistent_disks + self.enable_end_to_end_tls = enable_end_to_end_tls + self.loaded_certificates = loaded_certificates + + +class AvailableOperations(msrest.serialization.Model): + """Available operations of the service. + + :param value: Collection of available operation details. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.OperationDetail] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationDetail]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["OperationDetail"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AvailableOperations, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AvailableRuntimeVersions(msrest.serialization.Model): + """AvailableRuntimeVersions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of all supported runtime versions. + :vartype value: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.SupportedRuntimeVersion] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + +class CustomPersistentDiskProperties(msrest.serialization.Model): + """Custom persistent disk resource payload. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileVolume. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the underlying resource to mount as a persistent + disk.Constant filled by server. + :type type: str + :param mount_path: Required. The mount path of the persistent disk. + :type mount_path: str + :param readonly: Indicates whether the persistent disk is a readonly one. + :type readonly: bool + :param mount_options: These are the mount options for a persistent disk. + :type mount_options: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'mount_path': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'readonly': {'key': 'readonly', 'type': 'bool'}, + 'mount_options': {'key': 'mountOptions', 'type': '[str]'}, + } + + _subtype_map = { + 'type': {'AzureFileVolume': 'AzureFileVolume'} + } + + def __init__( + self, + *, + mount_path: str, + readonly: Optional[bool] = None, + mount_options: Optional[List[str]] = None, + **kwargs + ): + super(CustomPersistentDiskProperties, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.mount_path = mount_path + self.readonly = readonly + self.mount_options = mount_options + + +class AzureFileVolume(CustomPersistentDiskProperties): + """The properties of the Azure File volume. Azure File shares are mounted as volumes. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the underlying resource to mount as a persistent + disk.Constant filled by server. + :type type: str + :param mount_path: Required. The mount path of the persistent disk. + :type mount_path: str + :param readonly: Indicates whether the persistent disk is a readonly one. + :type readonly: bool + :param mount_options: These are the mount options for a persistent disk. + :type mount_options: list[str] + :param share_name: Required. The share name of the Azure File share. + :type share_name: str + """ + + _validation = { + 'type': {'required': True}, + 'mount_path': {'required': True}, + 'share_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'readonly': {'key': 'readonly', 'type': 'bool'}, + 'mount_options': {'key': 'mountOptions', 'type': '[str]'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + } + + def __init__( + self, + *, + mount_path: str, + share_name: str, + readonly: Optional[bool] = None, + mount_options: Optional[List[str]] = None, + **kwargs + ): + super(AzureFileVolume, self).__init__(mount_path=mount_path, readonly=readonly, mount_options=mount_options, **kwargs) + self.type = 'AzureFileVolume' # type: str + self.share_name = share_name + + +class BindingResource(ProxyResource): + """Binding resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Binding resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BindingResourceProperties'}, + } + + def __init__( + self, + *, + properties: Optional["BindingResourceProperties"] = None, + **kwargs + ): + super(BindingResource, self).__init__(**kwargs) + self.properties = properties + + +class BindingResourceCollection(msrest.serialization.Model): + """Object that includes an array of Binding resources and a possible link for next set. + + :param value: Collection of Binding resources. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BindingResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BindingResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(BindingResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BindingResourceProperties(msrest.serialization.Model): + """Binding resource properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_name: The name of the bound resource. + :vartype resource_name: str + :ivar resource_type: The standard Azure resource type of the bound resource. + :vartype resource_type: str + :param resource_id: The Azure resource id of the bound resource. + :type resource_id: str + :param key: The key of the bound resource. + :type key: str + :param binding_parameters: Binding parameters of the Binding resource. + :type binding_parameters: dict[str, any] + :ivar generated_properties: The generated Spring Boot property file for this binding. The + secret will be deducted. + :vartype generated_properties: str + :ivar created_at: Creation time of the Binding resource. + :vartype created_at: str + :ivar updated_at: Update time of the Binding resource. + :vartype updated_at: str + """ + + _validation = { + 'resource_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'generated_properties': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + } + + _attribute_map = { + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'binding_parameters': {'key': 'bindingParameters', 'type': '{object}'}, + 'generated_properties': {'key': 'generatedProperties', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'str'}, + 'updated_at': {'key': 'updatedAt', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + key: Optional[str] = None, + binding_parameters: Optional[Dict[str, Any]] = None, + **kwargs + ): + super(BindingResourceProperties, self).__init__(**kwargs) + self.resource_name = None + self.resource_type = None + self.resource_id = resource_id + self.key = key + self.binding_parameters = binding_parameters + self.generated_properties = None + self.created_at = None + self.updated_at = None + + +class CertificateProperties(msrest.serialization.Model): + """Certificate resource payload. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ContentCertificateProperties, KeyVaultCertificateProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the certificate source.Constant filled by server. + :type type: str + :ivar thumbprint: The thumbprint of certificate. + :vartype thumbprint: str + :ivar issuer: The issuer of certificate. + :vartype issuer: str + :ivar issued_date: The issue date of certificate. + :vartype issued_date: str + :ivar expiration_date: The expiration date of certificate. + :vartype expiration_date: str + :ivar activate_date: The activate date of certificate. + :vartype activate_date: str + :ivar subject_name: The subject name of certificate. + :vartype subject_name: str + :ivar dns_names: The domain list of certificate. + :vartype dns_names: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issued_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'activate_date': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'dns_names': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'issued_date': {'key': 'issuedDate', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'str'}, + 'activate_date': {'key': 'activateDate', 'type': 'str'}, + 'subject_name': {'key': 'subjectName', 'type': 'str'}, + 'dns_names': {'key': 'dnsNames', 'type': '[str]'}, + } + + _subtype_map = { + 'type': {'ContentCertificate': 'ContentCertificateProperties', 'KeyVaultCertificate': 'KeyVaultCertificateProperties'} + } + + def __init__( + self, + **kwargs + ): + super(CertificateProperties, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.thumbprint = None + self.issuer = None + self.issued_date = None + self.expiration_date = None + self.activate_date = None + self.subject_name = None + self.dns_names = None + + +class CertificateResource(ProxyResource): + """Certificate resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the certificate resource payload. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + } + + def __init__( + self, + *, + properties: Optional["CertificateProperties"] = None, + **kwargs + ): + super(CertificateResource, self).__init__(**kwargs) + self.properties = properties + + +class CertificateResourceCollection(msrest.serialization.Model): + """Collection compose of certificate resources list and a possible link for next page. + + :param value: The certificate resources list. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResource] + :param next_link: The link to next page of certificate list. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["CertificateResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(CertificateResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ClusterResourceProperties(msrest.serialization.Model): + """Service properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: Provisioning state of the Service. Possible values include: + "Creating", "Updating", "Deleting", "Deleted", "Succeeded", "Failed", "Moving", "Moved", + "MoveFailed". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ProvisioningState + :param network_profile: Network profile of the Service. + :type network_profile: ~azure.mgmt.appplatform.v2021_09_01_preview.models.NetworkProfile + :ivar version: Version of the Service. + :vartype version: int + :ivar service_id: ServiceInstanceEntity GUID which uniquely identifies a created resource. + :vartype service_id: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'version': {'readonly': True}, + 'service_id': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'network_profile': {'key': 'networkProfile', 'type': 'NetworkProfile'}, + 'version': {'key': 'version', 'type': 'int'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + } + + def __init__( + self, + *, + network_profile: Optional["NetworkProfile"] = None, + **kwargs + ): + super(ClusterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.network_profile = network_profile + self.version = None + self.service_id = None + + +class ConfigServerGitProperty(msrest.serialization.Model): + """Property of git. + + All required parameters must be populated in order to send to Azure. + + :param repositories: Repositories of git. + :type repositories: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.GitPatternRepository] + :param uri: Required. URI of the repository. + :type uri: str + :param label: Label of the repository. + :type label: str + :param search_paths: Searching path of the repository. + :type search_paths: list[str] + :param username: Username of git repository basic auth. + :type username: str + :param password: Password of git repository basic auth. + :type password: str + :param host_key: Public sshKey of git repository. + :type host_key: str + :param host_key_algorithm: SshKey algorithm of git repository. + :type host_key_algorithm: str + :param private_key: Private sshKey algorithm of git repository. + :type private_key: str + :param strict_host_key_checking: Strict host key checking or not. + :type strict_host_key_checking: bool + """ + + _validation = { + 'uri': {'required': True}, + } + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[GitPatternRepository]'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'search_paths': {'key': 'searchPaths', 'type': '[str]'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'host_key': {'key': 'hostKey', 'type': 'str'}, + 'host_key_algorithm': {'key': 'hostKeyAlgorithm', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'strict_host_key_checking': {'key': 'strictHostKeyChecking', 'type': 'bool'}, + } + + def __init__( + self, + *, + uri: str, + repositories: Optional[List["GitPatternRepository"]] = None, + label: Optional[str] = None, + search_paths: Optional[List[str]] = None, + username: Optional[str] = None, + password: Optional[str] = None, + host_key: Optional[str] = None, + host_key_algorithm: Optional[str] = None, + private_key: Optional[str] = None, + strict_host_key_checking: Optional[bool] = None, + **kwargs + ): + super(ConfigServerGitProperty, self).__init__(**kwargs) + self.repositories = repositories + self.uri = uri + self.label = label + self.search_paths = search_paths + self.username = username + self.password = password + self.host_key = host_key + self.host_key_algorithm = host_key_algorithm + self.private_key = private_key + self.strict_host_key_checking = strict_host_key_checking + + +class ConfigServerProperties(msrest.serialization.Model): + """Config server git properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: State of the config server. Possible values include: "NotAvailable", + "Deleted", "Failed", "Succeeded", "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerState + :param error: Error when apply config server settings. + :type error: ~azure.mgmt.appplatform.v2021_09_01_preview.models.Error + :param config_server: Settings of config server. + :type config_server: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerSettings + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'config_server': {'key': 'configServer', 'type': 'ConfigServerSettings'}, + } + + def __init__( + self, + *, + error: Optional["Error"] = None, + config_server: Optional["ConfigServerSettings"] = None, + **kwargs + ): + super(ConfigServerProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.error = error + self.config_server = config_server + + +class ConfigServerResource(ProxyResource): + """Config Server resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Config Server resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ConfigServerProperties'}, + } + + def __init__( + self, + *, + properties: Optional["ConfigServerProperties"] = None, + **kwargs + ): + super(ConfigServerResource, self).__init__(**kwargs) + self.properties = properties + + +class ConfigServerSettings(msrest.serialization.Model): + """The settings of config server. + + :param git_property: Property of git environment. + :type git_property: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerGitProperty + """ + + _attribute_map = { + 'git_property': {'key': 'gitProperty', 'type': 'ConfigServerGitProperty'}, + } + + def __init__( + self, + *, + git_property: Optional["ConfigServerGitProperty"] = None, + **kwargs + ): + super(ConfigServerSettings, self).__init__(**kwargs) + self.git_property = git_property + + +class ConfigServerSettingsErrorRecord(msrest.serialization.Model): + """Error record of the config server settings. + + :param name: The name of the config server settings error record. + :type name: str + :param uri: The uri of the config server settings error record. + :type uri: str + :param messages: The detail error messages of the record. + :type messages: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'messages': {'key': 'messages', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + uri: Optional[str] = None, + messages: Optional[List[str]] = None, + **kwargs + ): + super(ConfigServerSettingsErrorRecord, self).__init__(**kwargs) + self.name = name + self.uri = uri + self.messages = messages + + +class ConfigServerSettingsValidateResult(msrest.serialization.Model): + """Validation result for config server settings. + + :param is_valid: Indicate if the config server settings are valid. + :type is_valid: bool + :param details: The detail validation results. + :type details: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerSettingsErrorRecord] + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'details': {'key': 'details', 'type': '[ConfigServerSettingsErrorRecord]'}, + } + + def __init__( + self, + *, + is_valid: Optional[bool] = None, + details: Optional[List["ConfigServerSettingsErrorRecord"]] = None, + **kwargs + ): + super(ConfigServerSettingsValidateResult, self).__init__(**kwargs) + self.is_valid = is_valid + self.details = details + + +class ContentCertificateProperties(CertificateProperties): + """Properties of certificate imported from key vault. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the certificate source.Constant filled by server. + :type type: str + :ivar thumbprint: The thumbprint of certificate. + :vartype thumbprint: str + :ivar issuer: The issuer of certificate. + :vartype issuer: str + :ivar issued_date: The issue date of certificate. + :vartype issued_date: str + :ivar expiration_date: The expiration date of certificate. + :vartype expiration_date: str + :ivar activate_date: The activate date of certificate. + :vartype activate_date: str + :ivar subject_name: The subject name of certificate. + :vartype subject_name: str + :ivar dns_names: The domain list of certificate. + :vartype dns_names: list[str] + :param content: Required. The content of uploaded certificate. + :type content: str + """ + + _validation = { + 'type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issued_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'activate_date': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'dns_names': {'readonly': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'issued_date': {'key': 'issuedDate', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'str'}, + 'activate_date': {'key': 'activateDate', 'type': 'str'}, + 'subject_name': {'key': 'subjectName', 'type': 'str'}, + 'dns_names': {'key': 'dnsNames', 'type': '[str]'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__( + self, + *, + content: str, + **kwargs + ): + super(ContentCertificateProperties, self).__init__(**kwargs) + self.type = 'ContentCertificate' # type: str + self.content = content + + +class CustomContainer(msrest.serialization.Model): + """Custom container payload. + + :param server: The name of the registry that contains the container image. + :type server: str + :param container_image: Container image of the custom container. This should be in the form of + :code:``::code:`` without the server name of the registry. + :type container_image: str + :param command: Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is + used if this is not provided. + :type command: list[str] + :param args: Arguments to the entrypoint. The docker image's CMD is used if this is not + provided. + :type args: list[str] + :param image_registry_credential: Credential of the image registry. + :type image_registry_credential: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ImageRegistryCredential + """ + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'container_image': {'key': 'containerImage', 'type': 'str'}, + 'command': {'key': 'command', 'type': '[str]'}, + 'args': {'key': 'args', 'type': '[str]'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + } + + def __init__( + self, + *, + server: Optional[str] = None, + container_image: Optional[str] = None, + command: Optional[List[str]] = None, + args: Optional[List[str]] = None, + image_registry_credential: Optional["ImageRegistryCredential"] = None, + **kwargs + ): + super(CustomContainer, self).__init__(**kwargs) + self.server = server + self.container_image = container_image + self.command = command + self.args = args + self.image_registry_credential = image_registry_credential + + +class CustomDomainProperties(msrest.serialization.Model): + """Custom domain of app resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param thumbprint: The thumbprint of bound certificate. + :type thumbprint: str + :ivar app_name: The app name of domain. + :vartype app_name: str + :param cert_name: The bound certificate name of domain. + :type cert_name: str + """ + + _validation = { + 'app_name': {'readonly': True}, + } + + _attribute_map = { + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'app_name': {'key': 'appName', 'type': 'str'}, + 'cert_name': {'key': 'certName', 'type': 'str'}, + } + + def __init__( + self, + *, + thumbprint: Optional[str] = None, + cert_name: Optional[str] = None, + **kwargs + ): + super(CustomDomainProperties, self).__init__(**kwargs) + self.thumbprint = thumbprint + self.app_name = None + self.cert_name = cert_name + + +class CustomDomainResource(ProxyResource): + """Custom domain resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the custom domain resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CustomDomainProperties'}, + } + + def __init__( + self, + *, + properties: Optional["CustomDomainProperties"] = None, + **kwargs + ): + super(CustomDomainResource, self).__init__(**kwargs) + self.properties = properties + + +class CustomDomainResourceCollection(msrest.serialization.Model): + """Collection compose of a custom domain resources list and a possible link for next page. + + :param value: The custom domain resources list. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource] + :param next_link: The link to next page of custom domain list. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CustomDomainResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["CustomDomainResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(CustomDomainResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class CustomDomainValidatePayload(msrest.serialization.Model): + """Custom domain validate payload. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name to be validated. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(CustomDomainValidatePayload, self).__init__(**kwargs) + self.name = name + + +class CustomDomainValidateResult(msrest.serialization.Model): + """Validation result for custom domain. + + :param is_valid: Indicates if domain name is valid. + :type is_valid: bool + :param message: Message of why domain name is invalid. + :type message: str + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + is_valid: Optional[bool] = None, + message: Optional[str] = None, + **kwargs + ): + super(CustomDomainValidateResult, self).__init__(**kwargs) + self.is_valid = is_valid + self.message = message + + +class CustomPersistentDiskResource(msrest.serialization.Model): + """Custom persistent disk resource payload. + + All required parameters must be populated in order to send to Azure. + + :param custom_persistent_disk_properties: Properties of the custom persistent disk resource + payload. + :type custom_persistent_disk_properties: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomPersistentDiskProperties + :param storage_id: Required. The resource id of Azure Spring Cloud Storage resource. + :type storage_id: str + """ + + _validation = { + 'storage_id': {'required': True}, + } + + _attribute_map = { + 'custom_persistent_disk_properties': {'key': 'customPersistentDiskProperties', 'type': 'CustomPersistentDiskProperties'}, + 'storage_id': {'key': 'storageId', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_id: str, + custom_persistent_disk_properties: Optional["CustomPersistentDiskProperties"] = None, + **kwargs + ): + super(CustomPersistentDiskResource, self).__init__(**kwargs) + self.custom_persistent_disk_properties = custom_persistent_disk_properties + self.storage_id = storage_id + + +class DeploymentInstance(msrest.serialization.Model): + """Deployment instance payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the deployment instance. + :vartype name: str + :ivar status: Status of the deployment instance. + :vartype status: str + :ivar reason: Failed reason of the deployment instance. + :vartype reason: str + :ivar discovery_status: Discovery status of the deployment instance. + :vartype discovery_status: str + :ivar start_time: Start time of the deployment instance. + :vartype start_time: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'reason': {'readonly': True}, + 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'discovery_status': {'key': 'discoveryStatus', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentInstance, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = None + self.discovery_status = None + self.start_time = None + + +class DeploymentResource(ProxyResource): + """Deployment resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Deployment resource. + :type properties: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource. + :type sku: ~azure.mgmt.appplatform.v2021_09_01_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeploymentResourceProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + *, + properties: Optional["DeploymentResourceProperties"] = None, + sku: Optional["Sku"] = None, + **kwargs + ): + super(DeploymentResource, self).__init__(**kwargs) + self.properties = properties + self.sku = sku + + +class DeploymentResourceCollection(msrest.serialization.Model): + """Object that includes an array of App resources and a possible link for next set. + + :param value: Collection of Deployment resources. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeploymentResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["DeploymentResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(DeploymentResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DeploymentResourceProperties(msrest.serialization.Model): + """Deployment resource properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param source: Uploaded source information of the deployment. + :type source: ~azure.mgmt.appplatform.v2021_09_01_preview.models.UserSourceInfo + :ivar app_name: App name of the deployment. + :vartype app_name: str + :param deployment_settings: Deployment settings of the Deployment. + :type deployment_settings: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentSettings + :ivar provisioning_state: Provisioning state of the Deployment. Possible values include: + "Creating", "Updating", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceProvisioningState + :ivar status: Status of the Deployment. Possible values include: "Unknown", "Stopped", + "Running", "Failed", "Allocating", "Upgrading", "Compiling". + :vartype status: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceStatus + :ivar active: Indicates whether the Deployment is active. + :vartype active: bool + :ivar created_time: Date time when the resource is created. + :vartype created_time: ~datetime.datetime + :ivar instances: Collection of instances belong to the Deployment. + :vartype instances: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentInstance] + """ + + _validation = { + 'app_name': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'active': {'readonly': True}, + 'created_time': {'readonly': True}, + 'instances': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'UserSourceInfo'}, + 'app_name': {'key': 'appName', 'type': 'str'}, + 'deployment_settings': {'key': 'deploymentSettings', 'type': 'DeploymentSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'active': {'key': 'active', 'type': 'bool'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'instances': {'key': 'instances', 'type': '[DeploymentInstance]'}, + } + + def __init__( + self, + *, + source: Optional["UserSourceInfo"] = None, + deployment_settings: Optional["DeploymentSettings"] = None, + **kwargs + ): + super(DeploymentResourceProperties, self).__init__(**kwargs) + self.source = source + self.app_name = None + self.deployment_settings = deployment_settings + self.provisioning_state = None + self.status = None + self.active = None + self.created_time = None + self.instances = None + + +class DeploymentSettings(msrest.serialization.Model): + """Deployment settings payload. + + :param cpu: Required CPU. This should be 1 for Basic tier, and in range [1, 4] for Standard + tier. This is deprecated starting from API version 2021-09-01-preview. Please use the + resourceRequests field to set the CPU size. + :type cpu: int + :param memory_in_gb: Required Memory size in GB. This should be in range [1, 2] for Basic tier, + and in range [1, 8] for Standard tier. This is deprecated starting from API version + 2021-09-01-preview. Please use the resourceRequests field to set the the memory size. + :type memory_in_gb: int + :param resource_requests: The requested resource quantity for required CPU and Memory. It is + recommended that using this field to represent the required CPU and Memory, the old field cpu + and memoryInGB will be deprecated later. + :type resource_requests: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceRequests + :param jvm_options: JVM parameter. + :type jvm_options: str + :param net_core_main_entry_path: The path to the .NET executable relative to zip root. + :type net_core_main_entry_path: str + :param environment_variables: Collection of environment variables. + :type environment_variables: dict[str, str] + :param runtime_version: Runtime version. Possible values include: "Java_8", "Java_11", + "NetCore_31". Default value: "Java_8". + :type runtime_version: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.RuntimeVersion + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, + 'resource_requests': {'key': 'resourceRequests', 'type': 'ResourceRequests'}, + 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, + 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + cpu: Optional[int] = 1, + memory_in_gb: Optional[int] = 1, + resource_requests: Optional["ResourceRequests"] = None, + jvm_options: Optional[str] = None, + net_core_main_entry_path: Optional[str] = None, + environment_variables: Optional[Dict[str, str]] = None, + runtime_version: Optional[Union[str, "RuntimeVersion"]] = "Java_8", + **kwargs + ): + super(DeploymentSettings, self).__init__(**kwargs) + self.cpu = cpu + self.memory_in_gb = memory_in_gb + self.resource_requests = resource_requests + self.jvm_options = jvm_options + self.net_core_main_entry_path = net_core_main_entry_path + self.environment_variables = environment_variables + self.runtime_version = runtime_version + + +class Error(msrest.serialization.Model): + """The error code compose of code and message. + + :param code: The code of error. + :type code: str + :param message: The message of error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = code + self.message = message + + +class GitPatternRepository(msrest.serialization.Model): + """Git repository property payload. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the repository. + :type name: str + :param pattern: Collection of pattern of the repository. + :type pattern: list[str] + :param uri: Required. URI of the repository. + :type uri: str + :param label: Label of the repository. + :type label: str + :param search_paths: Searching path of the repository. + :type search_paths: list[str] + :param username: Username of git repository basic auth. + :type username: str + :param password: Password of git repository basic auth. + :type password: str + :param host_key: Public sshKey of git repository. + :type host_key: str + :param host_key_algorithm: SshKey algorithm of git repository. + :type host_key_algorithm: str + :param private_key: Private sshKey algorithm of git repository. + :type private_key: str + :param strict_host_key_checking: Strict host key checking or not. + :type strict_host_key_checking: bool + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': '[str]'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'search_paths': {'key': 'searchPaths', 'type': '[str]'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'host_key': {'key': 'hostKey', 'type': 'str'}, + 'host_key_algorithm': {'key': 'hostKeyAlgorithm', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'strict_host_key_checking': {'key': 'strictHostKeyChecking', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: str, + uri: str, + pattern: Optional[List[str]] = None, + label: Optional[str] = None, + search_paths: Optional[List[str]] = None, + username: Optional[str] = None, + password: Optional[str] = None, + host_key: Optional[str] = None, + host_key_algorithm: Optional[str] = None, + private_key: Optional[str] = None, + strict_host_key_checking: Optional[bool] = None, + **kwargs + ): + super(GitPatternRepository, self).__init__(**kwargs) + self.name = name + self.pattern = pattern + self.uri = uri + self.label = label + self.search_paths = search_paths + self.username = username + self.password = password + self.host_key = host_key + self.host_key_algorithm = host_key_algorithm + self.private_key = private_key + self.strict_host_key_checking = strict_host_key_checking + + +class ImageRegistryCredential(msrest.serialization.Model): + """Credential of the image registry. + + :param username: The username of the image registry credential. + :type username: str + :param password: The password of the image registry credential. + :type password: str + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + *, + username: Optional[str] = None, + password: Optional[str] = None, + **kwargs + ): + super(ImageRegistryCredential, self).__init__(**kwargs) + self.username = username + self.password = password + + +class KeyVaultCertificateProperties(CertificateProperties): + """Properties of certificate imported from key vault. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the certificate source.Constant filled by server. + :type type: str + :ivar thumbprint: The thumbprint of certificate. + :vartype thumbprint: str + :ivar issuer: The issuer of certificate. + :vartype issuer: str + :ivar issued_date: The issue date of certificate. + :vartype issued_date: str + :ivar expiration_date: The expiration date of certificate. + :vartype expiration_date: str + :ivar activate_date: The activate date of certificate. + :vartype activate_date: str + :ivar subject_name: The subject name of certificate. + :vartype subject_name: str + :ivar dns_names: The domain list of certificate. + :vartype dns_names: list[str] + :param vault_uri: Required. The vault uri of user key vault. + :type vault_uri: str + :param key_vault_cert_name: Required. The certificate name of key vault. + :type key_vault_cert_name: str + :param cert_version: The certificate version of key vault. + :type cert_version: str + :param exclude_private_key: Optional. If set to true, it will not import private key from key + vault. + :type exclude_private_key: bool + """ + + _validation = { + 'type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issued_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'activate_date': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'dns_names': {'readonly': True}, + 'vault_uri': {'required': True}, + 'key_vault_cert_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'issued_date': {'key': 'issuedDate', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'str'}, + 'activate_date': {'key': 'activateDate', 'type': 'str'}, + 'subject_name': {'key': 'subjectName', 'type': 'str'}, + 'dns_names': {'key': 'dnsNames', 'type': '[str]'}, + 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'key_vault_cert_name': {'key': 'keyVaultCertName', 'type': 'str'}, + 'cert_version': {'key': 'certVersion', 'type': 'str'}, + 'exclude_private_key': {'key': 'excludePrivateKey', 'type': 'bool'}, + } + + def __init__( + self, + *, + vault_uri: str, + key_vault_cert_name: str, + cert_version: Optional[str] = None, + exclude_private_key: Optional[bool] = False, + **kwargs + ): + super(KeyVaultCertificateProperties, self).__init__(**kwargs) + self.type = 'KeyVaultCertificate' # type: str + self.vault_uri = vault_uri + self.key_vault_cert_name = key_vault_cert_name + self.cert_version = cert_version + self.exclude_private_key = exclude_private_key + + +class LoadedCertificate(msrest.serialization.Model): + """Loaded certificate payload. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. Resource Id of loaded certificate. + :type resource_id: str + :param load_trust_store: Indicate whether the certificate will be loaded into default trust + store, only work for Java runtime. + :type load_trust_store: bool + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'load_trust_store': {'key': 'loadTrustStore', 'type': 'bool'}, + } + + def __init__( + self, + *, + resource_id: str, + load_trust_store: Optional[bool] = False, + **kwargs + ): + super(LoadedCertificate, self).__init__(**kwargs) + self.resource_id = resource_id + self.load_trust_store = load_trust_store + + +class LogFileUrlResponse(msrest.serialization.Model): + """Log file URL payload. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. URL of the log file. + :type url: str + """ + + _validation = { + 'url': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + *, + url: str, + **kwargs + ): + super(LogFileUrlResponse, self).__init__(**kwargs) + self.url = url + + +class LogSpecification(msrest.serialization.Model): + """Specifications of the Log for Azure Monitoring. + + :param name: Name of the log. + :type name: str + :param display_name: Localized friendly display name of the log. + :type display_name: str + :param blob_duration: Blob duration of the log. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class ManagedIdentityProperties(msrest.serialization.Model): + """Managed identity properties retrieved from ARM request headers. + + :param type: Type of the managed identity. Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :type type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.ManagedIdentityType + :param principal_id: Principal Id. + :type principal_id: str + :param tenant_id: Tenant Id. + :type tenant_id: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ManagedIdentityType"]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): + super(ManagedIdentityProperties, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id + + +class MetricDimension(msrest.serialization.Model): + """Specifications of the Dimension of metrics. + + :param name: Name of the dimension. + :type name: str + :param display_name: Localized friendly display name of the dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Whether this dimension should be included for the Shoebox + export scenario. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + to_be_exported_for_shoebox: Optional[bool] = None, + **kwargs + ): + super(MetricDimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class MetricSpecification(msrest.serialization.Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric. + :type name: str + :param display_name: Localized friendly display name of the metric. + :type display_name: str + :param display_description: Localized friendly description of the metric. + :type display_description: str + :param unit: Unit that makes sense for the metric. + :type unit: str + :param category: Name of the metric category that the metric belongs to. A metric can only + belong to a single category. + :type category: str + :param aggregation_type: Only provide one value for this field. Valid values: Average, Minimum, + Maximum, Total, Count. + :type aggregation_type: str + :param supported_aggregation_types: Supported aggregation types. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: Supported time grain types. + :type supported_time_grain_types: list[str] + :param fill_gap_with_zero: Optional. If set to true, then zero will be returned for time + duration where no metric is emitted/published. + :type fill_gap_with_zero: bool + :param dimensions: Dimensions of the metric. + :type dimensions: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.MetricDimension] + :param source_mdm_namespace: Name of the MDM namespace. Optional. + :type source_mdm_namespace: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + category: Optional[str] = None, + aggregation_type: Optional[str] = None, + supported_aggregation_types: Optional[List[str]] = None, + supported_time_grain_types: Optional[List[str]] = None, + fill_gap_with_zero: Optional[bool] = None, + dimensions: Optional[List["MetricDimension"]] = None, + source_mdm_namespace: Optional[str] = None, + **kwargs + ): + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.category = category + self.aggregation_type = aggregation_type + self.supported_aggregation_types = supported_aggregation_types + self.supported_time_grain_types = supported_time_grain_types + self.fill_gap_with_zero = fill_gap_with_zero + self.dimensions = dimensions + self.source_mdm_namespace = source_mdm_namespace + + +class MonitoringSettingProperties(msrest.serialization.Model): + """Monitoring Setting properties payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: State of the Monitoring Setting. Possible values include: + "NotAvailable", "Failed", "Succeeded", "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingState + :param error: Error when apply Monitoring Setting changes. + :type error: ~azure.mgmt.appplatform.v2021_09_01_preview.models.Error + :param trace_enabled: Indicates whether enable the trace functionality, which will be + deprecated since api version 2020-11-01-preview. Please leverage appInsightsInstrumentationKey + to indicate if monitoringSettings enabled or not. + :type trace_enabled: bool + :param app_insights_instrumentation_key: Target application insight instrumentation key, null + or whitespace include empty will disable monitoringSettings. + :type app_insights_instrumentation_key: str + :param app_insights_sampling_rate: Indicates the sampling rate of application insight agent, + should be in range [0.0, 100.0]. + :type app_insights_sampling_rate: float + :param app_insights_agent_versions: Indicates the versions of application insight agent. + :type app_insights_agent_versions: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ApplicationInsightsAgentVersions + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'app_insights_sampling_rate': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'trace_enabled': {'key': 'traceEnabled', 'type': 'bool'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'app_insights_sampling_rate': {'key': 'appInsightsSamplingRate', 'type': 'float'}, + 'app_insights_agent_versions': {'key': 'appInsightsAgentVersions', 'type': 'ApplicationInsightsAgentVersions'}, + } + + def __init__( + self, + *, + error: Optional["Error"] = None, + trace_enabled: Optional[bool] = None, + app_insights_instrumentation_key: Optional[str] = None, + app_insights_sampling_rate: Optional[float] = None, + app_insights_agent_versions: Optional["ApplicationInsightsAgentVersions"] = None, + **kwargs + ): + super(MonitoringSettingProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.error = error + self.trace_enabled = trace_enabled + self.app_insights_instrumentation_key = app_insights_instrumentation_key + self.app_insights_sampling_rate = app_insights_sampling_rate + self.app_insights_agent_versions = app_insights_agent_versions + + +class MonitoringSettingResource(ProxyResource): + """Monitoring Setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Monitoring Setting resource. + :type properties: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'MonitoringSettingProperties'}, + } + + def __init__( + self, + *, + properties: Optional["MonitoringSettingProperties"] = None, + **kwargs + ): + super(MonitoringSettingResource, self).__init__(**kwargs) + self.properties = properties + + +class NameAvailability(msrest.serialization.Model): + """Name availability result payload. + + :param name_available: Indicates whether the name is available. + :type name_available: bool + :param reason: Reason why the name is not available. + :type reason: str + :param message: Message why the name is not available. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(NameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class NameAvailabilityParameters(msrest.serialization.Model): + """Name availability parameters payload. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of the resource to check name availability. + :type type: str + :param name: Required. Name to be checked. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + type: str, + name: str, + **kwargs + ): + super(NameAvailabilityParameters, self).__init__(**kwargs) + self.type = type + self.name = name + + +class NetworkProfile(msrest.serialization.Model): + """Service network profile payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param service_runtime_subnet_id: Fully qualified resource Id of the subnet to host Azure + Spring Cloud Service Runtime. + :type service_runtime_subnet_id: str + :param app_subnet_id: Fully qualified resource Id of the subnet to host Azure Spring Cloud + Apps. + :type app_subnet_id: str + :param service_cidr: Azure Spring Cloud service reserved CIDR. + :type service_cidr: str + :param service_runtime_network_resource_group: Name of the resource group containing network + resources of Azure Spring Cloud Service Runtime. + :type service_runtime_network_resource_group: str + :param app_network_resource_group: Name of the resource group containing network resources of + Azure Spring Cloud Apps. + :type app_network_resource_group: str + :ivar outbound_i_ps: Desired outbound IP resources for Azure Spring Cloud instance. + :vartype outbound_i_ps: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.NetworkProfileOutboundIPs + :ivar required_traffics: Required inbound or outbound traffics for Azure Spring Cloud instance. + :vartype required_traffics: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.RequiredTraffic] + """ + + _validation = { + 'outbound_i_ps': {'readonly': True}, + 'required_traffics': {'readonly': True}, + } + + _attribute_map = { + 'service_runtime_subnet_id': {'key': 'serviceRuntimeSubnetId', 'type': 'str'}, + 'app_subnet_id': {'key': 'appSubnetId', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, + 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, + 'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'}, + } + + def __init__( + self, + *, + service_runtime_subnet_id: Optional[str] = None, + app_subnet_id: Optional[str] = None, + service_cidr: Optional[str] = None, + service_runtime_network_resource_group: Optional[str] = None, + app_network_resource_group: Optional[str] = None, + **kwargs + ): + super(NetworkProfile, self).__init__(**kwargs) + self.service_runtime_subnet_id = service_runtime_subnet_id + self.app_subnet_id = app_subnet_id + self.service_cidr = service_cidr + self.service_runtime_network_resource_group = service_runtime_network_resource_group + self.app_network_resource_group = app_network_resource_group + self.outbound_i_ps = None + self.required_traffics = None + + +class NetworkProfileOutboundIPs(msrest.serialization.Model): + """Desired outbound IP resources for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar public_i_ps: A list of public IP addresses. + :vartype public_i_ps: list[str] + """ + + _validation = { + 'public_i_ps': {'readonly': True}, + } + + _attribute_map = { + 'public_i_ps': {'key': 'publicIPs', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkProfileOutboundIPs, self).__init__(**kwargs) + self.public_i_ps = None + + +class OperationDetail(msrest.serialization.Model): + """Operation detail payload. + + :param name: Name of the operation. + :type name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :param display: Display of the operation. + :type display: ~azure.mgmt.appplatform.v2021_09_01_preview.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param properties: Properties of the operation. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + is_data_action: Optional[bool] = None, + display: Optional["OperationDisplay"] = None, + origin: Optional[str] = None, + properties: Optional["OperationProperties"] = None, + **kwargs + ): + super(OperationDetail, self).__init__(**kwargs) + self.name = name + self.is_data_action = is_data_action + self.display = display + self.origin = origin + self.properties = properties + + +class OperationDisplay(msrest.serialization.Model): + """Operation display payload. + + :param provider: Resource provider of the operation. + :type provider: str + :param resource: Resource of the operation. + :type resource: str + :param operation: Localized friendly name for the operation. + :type operation: str + :param description: Localized friendly description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationProperties(msrest.serialization.Model): + """Extra Operation properties. + + :param service_specification: Service specifications of the operation. + :type service_specification: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + *, + service_specification: Optional["ServiceSpecification"] = None, + **kwargs + ): + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class PersistentDisk(msrest.serialization.Model): + """Persistent disk payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param size_in_gb: Size of the persistent disk in GB. + :type size_in_gb: int + :ivar used_in_gb: Size of the used persistent disk in GB. + :vartype used_in_gb: int + :param mount_path: Mount path of the persistent disk. + :type mount_path: str + """ + + _validation = { + 'size_in_gb': {'maximum': 50, 'minimum': 0}, + 'used_in_gb': {'readonly': True, 'maximum': 50, 'minimum': 0}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'used_in_gb': {'key': 'usedInGB', 'type': 'int'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + } + + def __init__( + self, + *, + size_in_gb: Optional[int] = None, + mount_path: Optional[str] = None, + **kwargs + ): + super(PersistentDisk, self).__init__(**kwargs) + self.size_in_gb = size_in_gb + self.used_in_gb = None + self.mount_path = mount_path + + +class RegenerateTestKeyRequestPayload(msrest.serialization.Model): + """Regenerate test key request payload. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Type of the test key. Possible values include: "Primary", + "Secondary". + :type key_type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.TestKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__( + self, + *, + key_type: Union[str, "TestKeyType"], + **kwargs + ): + super(RegenerateTestKeyRequestPayload, self).__init__(**kwargs) + self.key_type = key_type + + +class RequiredTraffic(msrest.serialization.Model): + """Required inbound or outbound traffic for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar protocol: The protocol of required traffic. + :vartype protocol: str + :ivar port: The port of required traffic. + :vartype port: int + :ivar ips: The ip list of required traffic. + :vartype ips: list[str] + :ivar fqdns: The FQDN list of required traffic. + :vartype fqdns: list[str] + :ivar direction: The direction of required traffic. Possible values include: "Inbound", + "Outbound". + :vartype direction: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.TrafficDirection + """ + + _validation = { + 'protocol': {'readonly': True}, + 'port': {'readonly': True}, + 'ips': {'readonly': True}, + 'fqdns': {'readonly': True}, + 'direction': {'readonly': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'ips': {'key': 'ips', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RequiredTraffic, self).__init__(**kwargs) + self.protocol = None + self.port = None + self.ips = None + self.fqdns = None + self.direction = None + + +class ResourceRequests(msrest.serialization.Model): + """Deployment resource request payload. + + :param cpu: Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for + Basic tier, and {500m, 1, 2, 3, 4} for Standard tier. + :type cpu: str + :param memory: Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be + {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. + :type memory: str + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'str'}, + 'memory': {'key': 'memory', 'type': 'str'}, + } + + def __init__( + self, + *, + cpu: Optional[str] = None, + memory: Optional[str] = None, + **kwargs + ): + super(ResourceRequests, self).__init__(**kwargs) + self.cpu = cpu + self.memory = memory + + +class ResourceSku(msrest.serialization.Model): + """Describes an available Azure Spring Cloud SKU. + + :param resource_type: Gets the type of resource the SKU applies to. + :type resource_type: str + :param name: Gets the name of SKU. + :type name: str + :param tier: Gets the tier of SKU. + :type tier: str + :param capacity: Gets the capacity of SKU. + :type capacity: ~azure.mgmt.appplatform.v2021_09_01_preview.models.SkuCapacity + :param locations: Gets the set of locations that the SKU is available. + :type locations: list[str] + :param location_info: Gets a list of locations and availability zones in those locations where + the SKU is available. + :type location_info: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuLocationInfo] + :param restrictions: Gets the restrictions because of which SKU cannot be used. This is + empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuRestrictions] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__( + self, + *, + resource_type: Optional[str] = None, + name: Optional[str] = None, + tier: Optional[str] = None, + capacity: Optional["SkuCapacity"] = None, + locations: Optional[List[str]] = None, + location_info: Optional[List["ResourceSkuLocationInfo"]] = None, + restrictions: Optional[List["ResourceSkuRestrictions"]] = None, + **kwargs + ): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = resource_type + self.name = name + self.tier = tier + self.capacity = capacity + self.locations = locations + self.location_info = location_info + self.restrictions = restrictions + + +class ResourceSkuCapabilities(msrest.serialization.Model): + """ResourceSkuCapabilities. + + :param name: Gets an invariant to describe the feature. + :type name: str + :param value: Gets an invariant if the feature is measured by quantity. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ResourceSkuCollection(msrest.serialization.Model): + """Object that includes an array of Azure Spring Cloud SKU and a possible link for next set. + + :param value: Collection of resource SKU. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSku] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ResourceSku"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ResourceSkuCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ResourceSkuLocationInfo(msrest.serialization.Model): + """Locations and availability zones where the SKU is available. + + :param location: Gets location of the SKU. + :type location: str + :param zones: Gets list of availability zones where the SKU is supported. + :type zones: list[str] + :param zone_details: Gets details of capabilities available to a SKU in specific zones. + :type zone_details: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuZoneDetails] + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + zones: Optional[List[str]] = None, + zone_details: Optional[List["ResourceSkuZoneDetails"]] = None, + **kwargs + ): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = location + self.zones = zones + self.zone_details = zone_details + + +class ResourceSkuRestrictionInfo(msrest.serialization.Model): + """Information about the restriction where the SKU cannot be used. + + :param locations: Gets locations where the SKU is restricted. + :type locations: list[str] + :param zones: Gets list of availability zones where the SKU is restricted. + :type zones: list[str] + """ + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__( + self, + *, + locations: Optional[List[str]] = None, + zones: Optional[List[str]] = None, + **kwargs + ): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = locations + self.zones = zones + + +class ResourceSkuRestrictions(msrest.serialization.Model): + """Restrictions where the SKU cannot be used. + + :param type: Gets the type of restrictions. Possible values include: 'Location', 'Zone'. + Possible values include: "Location", "Zone". + :type type: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuRestrictionsType + :param values: Gets the value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :type values: list[str] + :param restriction_info: Gets the information about the restriction where the SKU cannot be + used. + :type restriction_info: + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuRestrictionInfo + :param reason_code: Gets the reason for restriction. Possible values include: 'QuotaId', + 'NotAvailableForSubscription'. Possible values include: "QuotaId", + "NotAvailableForSubscription". + :type reason_code: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuRestrictionsReasonCode + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceSkuRestrictionsType"]] = None, + values: Optional[List[str]] = None, + restriction_info: Optional["ResourceSkuRestrictionInfo"] = None, + reason_code: Optional[Union[str, "ResourceSkuRestrictionsReasonCode"]] = None, + **kwargs + ): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = type + self.values = values + self.restriction_info = restriction_info + self.reason_code = reason_code + + +class ResourceSkuZoneDetails(msrest.serialization.Model): + """Details of capabilities available to a SKU in specific zones. + + :param name: Gets the set of zones that the SKU is available in with the + specified capabilities. + :type name: list[str] + :param capabilities: Gets a list of capabilities that are available for the SKU in the + specified list of zones. + :type capabilities: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuCapabilities] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + } + + def __init__( + self, + *, + name: Optional[List[str]] = None, + capabilities: Optional[List["ResourceSkuCapabilities"]] = None, + **kwargs + ): + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = name + self.capabilities = capabilities + + +class ResourceUploadDefinition(msrest.serialization.Model): + """Resource upload definition payload. + + :param relative_path: Source relative path. + :type relative_path: str + :param upload_url: Upload URL. + :type upload_url: str + """ + + _attribute_map = { + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'upload_url': {'key': 'uploadUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + relative_path: Optional[str] = None, + upload_url: Optional[str] = None, + **kwargs + ): + super(ResourceUploadDefinition, self).__init__(**kwargs) + self.relative_path = relative_path + self.upload_url = upload_url + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The GEO location of the resource. + :type location: str + :param tags: A set of tags. Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class ServiceResource(TrackedResource): + """Service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The GEO location of the resource. + :type location: str + :param tags: A set of tags. Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + :param properties: Properties of the Service resource. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ClusterResourceProperties + :param sku: Sku of the Service resource. + :type sku: ~azure.mgmt.appplatform.v2021_09_01_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + properties: Optional["ClusterResourceProperties"] = None, + sku: Optional["Sku"] = None, + **kwargs + ): + super(ServiceResource, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + self.sku = sku + + +class ServiceResourceList(msrest.serialization.Model): + """Object that includes an array of Service resources and a possible link for next set. + + :param value: Collection of Service resources. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ServiceResourceList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ServiceSpecification(msrest.serialization.Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring. + :type log_specifications: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.LogSpecification] + :param metric_specifications: Specifications of the Metrics for Azure Monitoring. + :type metric_specifications: + list[~azure.mgmt.appplatform.v2021_09_01_preview.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__( + self, + *, + log_specifications: Optional[List["LogSpecification"]] = None, + metric_specifications: Optional[List["MetricSpecification"]] = None, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + self.metric_specifications = metric_specifications + + +class Sku(msrest.serialization.Model): + """Sku of Azure Spring Cloud. + + :param name: Name of the Sku. + :type name: str + :param tier: Tier of the Sku. + :type tier: str + :param capacity: Current capacity of the target resource. + :type capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: Optional[str] = "S0", + tier: Optional[str] = "Standard", + capacity: Optional[int] = None, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class SkuCapacity(msrest.serialization.Model): + """The SKU capacity. + + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. Gets or sets the minimum. + :type minimum: int + :param maximum: Gets or sets the maximum. + :type maximum: int + :param default: Gets or sets the default. + :type default: int + :param scale_type: Gets or sets the type of the scale. Possible values include: "None", + "Manual", "Automatic". + :type scale_type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.SkuScaleType + """ + + _validation = { + 'minimum': {'required': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + *, + minimum: int, + maximum: Optional[int] = None, + default: Optional[int] = None, + scale_type: Optional[Union[str, "SkuScaleType"]] = None, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class StorageProperties(msrest.serialization.Model): + """Storage resource payload. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StorageAccount. + + All required parameters must be populated in order to send to Azure. + + :param storage_type: Required. The type of the storage.Constant filled by server. + :type storage_type: str + """ + + _validation = { + 'storage_type': {'required': True}, + } + + _attribute_map = { + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + _subtype_map = { + 'storage_type': {'StorageAccount': 'StorageAccount'} + } + + def __init__( + self, + **kwargs + ): + super(StorageProperties, self).__init__(**kwargs) + self.storage_type = None # type: Optional[str] + + +class StorageAccount(StorageProperties): + """storage resource of type Azure Storage Account. + + All required parameters must be populated in order to send to Azure. + + :param storage_type: Required. The type of the storage.Constant filled by server. + :type storage_type: str + :param account_name: Required. The account name of the Azure Storage Account. + :type account_name: str + :param account_key: Required. The account key of the Azure Storage Account. + :type account_key: str + """ + + _validation = { + 'storage_type': {'required': True}, + 'account_name': {'required': True}, + 'account_key': {'required': True}, + } + + _attribute_map = { + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + } + + def __init__( + self, + *, + account_name: str, + account_key: str, + **kwargs + ): + super(StorageAccount, self).__init__(**kwargs) + self.storage_type = 'StorageAccount' # type: str + self.account_name = account_name + self.account_key = account_key + + +class StorageResource(ProxyResource): + """Storage resource payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the storage resource payload. + :type properties: ~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.appplatform.v2021_09_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'StorageProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + properties: Optional["StorageProperties"] = None, + **kwargs + ): + super(StorageResource, self).__init__(**kwargs) + self.properties = properties + self.system_data = None + + +class StorageResourceCollection(msrest.serialization.Model): + """Collection compose of storage resources list and a possible link for next page. + + :param value: The storage resources list. + :type value: list[~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResource] + :param next_link: The link to next page of storage list. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["StorageResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(StorageResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SupportedRuntimeVersion(msrest.serialization.Model): + """Supported deployment runtime version descriptor. + + :param value: The raw value which could be passed to deployment CRUD operations. Possible + values include: "Java_8", "Java_11", "NetCore_31". + :type value: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.SupportedRuntimeValue + :param platform: The platform of this runtime version (possible values: "Java" or ".NET"). + Possible values include: "Java", ".NET Core". + :type platform: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.SupportedRuntimePlatform + :param version: The detailed version (major.minor) of the platform. + :type version: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[Union[str, "SupportedRuntimeValue"]] = None, + platform: Optional[Union[str, "SupportedRuntimePlatform"]] = None, + version: Optional[str] = None, + **kwargs + ): + super(SupportedRuntimeVersion, self).__init__(**kwargs) + self.value = value + self.platform = platform + self.version = version + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or + ~azure.mgmt.appplatform.v2021_09_01_preview.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TemporaryDisk(msrest.serialization.Model): + """Temporary disk payload. + + :param size_in_gb: Size of the temporary disk in GB. + :type size_in_gb: int + :param mount_path: Mount path of the temporary disk. + :type mount_path: str + """ + + _validation = { + 'size_in_gb': {'maximum': 5, 'minimum': 0}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + } + + def __init__( + self, + *, + size_in_gb: Optional[int] = None, + mount_path: Optional[str] = "/tmp", + **kwargs + ): + super(TemporaryDisk, self).__init__(**kwargs) + self.size_in_gb = size_in_gb + self.mount_path = mount_path + + +class TestKeys(msrest.serialization.Model): + """Test keys payload. + + :param primary_key: Primary key. + :type primary_key: str + :param secondary_key: Secondary key. + :type secondary_key: str + :param primary_test_endpoint: Primary test endpoint. + :type primary_test_endpoint: str + :param secondary_test_endpoint: Secondary test endpoint. + :type secondary_test_endpoint: str + :param enabled: Indicates whether the test endpoint feature enabled or not. + :type enabled: bool + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_test_endpoint': {'key': 'primaryTestEndpoint', 'type': 'str'}, + 'secondary_test_endpoint': {'key': 'secondaryTestEndpoint', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + primary_test_endpoint: Optional[str] = None, + secondary_test_endpoint: Optional[str] = None, + enabled: Optional[bool] = None, + **kwargs + ): + super(TestKeys, self).__init__(**kwargs) + self.primary_key = primary_key + self.secondary_key = secondary_key + self.primary_test_endpoint = primary_test_endpoint + self.secondary_test_endpoint = secondary_test_endpoint + self.enabled = enabled + + +class UserSourceInfo(msrest.serialization.Model): + """Source information for a deployment. + + :param type: Type of the source uploaded. Possible values include: "Jar", "NetCoreZip", + "Source", "Container". + :type type: str or ~azure.mgmt.appplatform.v2021_09_01_preview.models.UserSourceType + :param relative_path: Relative path of the storage which stores the source. + :type relative_path: str + :param version: Version of the source. + :type version: str + :param artifact_selector: Selector for the artifact to be used for the deployment for + multi-module projects. This should be + the relative path to the target module/project. + :type artifact_selector: str + :param custom_container: Custom container payload. + :type custom_container: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomContainer + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'artifact_selector': {'key': 'artifactSelector', 'type': 'str'}, + 'custom_container': {'key': 'customContainer', 'type': 'CustomContainer'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "UserSourceType"]] = None, + relative_path: Optional[str] = None, + version: Optional[str] = None, + artifact_selector: Optional[str] = None, + custom_container: Optional["CustomContainer"] = None, + **kwargs + ): + super(UserSourceInfo, self).__init__(**kwargs) + self.type = type + self.relative_path = relative_path + self.version = version + self.artifact_selector = artifact_selector + self.custom_container = custom_container diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/__init__.py new file mode 100755 index 00000000000..97c71859bbd --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/__init__.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._services_operations import ServicesOperations +from ._config_servers_operations import ConfigServersOperations +from ._monitoring_settings_operations import MonitoringSettingsOperations +from ._apps_operations import AppsOperations +from ._bindings_operations import BindingsOperations +from ._storages_operations import StoragesOperations +from ._certificates_operations import CertificatesOperations +from ._custom_domains_operations import CustomDomainsOperations +from ._deployments_operations import DeploymentsOperations +from ._operations import Operations +from ._runtime_versions_operations import RuntimeVersionsOperations +from ._skus_operations import SkusOperations + +__all__ = [ + 'ServicesOperations', + 'ConfigServersOperations', + 'MonitoringSettingsOperations', + 'AppsOperations', + 'BindingsOperations', + 'StoragesOperations', + 'CertificatesOperations', + 'CustomDomainsOperations', + 'DeploymentsOperations', + 'Operations', + 'RuntimeVersionsOperations', + 'SkusOperations', +] diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_apps_operations.py new file mode 100755 index 00000000000..9252b1716cd --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_apps_operations.py @@ -0,0 +1,726 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AppsOperations(object): + """AppsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + sync_status=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.AppResource" + """Get an App and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param sync_status: Indicates whether sync status. + :type sync_status: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if sync_status is not None: + query_parameters['syncStatus'] = self._serialize.query("sync_status", sync_status, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + app_resource, # type: "_models.AppResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_resource, 'AppResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + app_resource, # type: "_models.AppResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AppResource"] + """Create a new App or update an exiting App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param app_resource: Parameters for the create or update operation. + :type app_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AppResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + app_resource=app_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Operation to delete an App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + app_resource, # type: "_models.AppResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_resource, 'AppResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + app_resource, # type: "_models.AppResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AppResource"] + """Operation to update an exiting App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param app_resource: Parameters for the update operation. + :type app_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AppResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + app_resource=app_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AppResourceCollection"] + """Handles requests to list all resources in a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.AppResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AppResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps'} # type: ignore + + def get_resource_upload_url( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceUploadDefinition" + """Get an resource upload URL for an App, which may be artifacts or source archive. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceUploadDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceUploadDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceUploadDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_resource_upload_url.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceUploadDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_resource_upload_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl'} # type: ignore + + def validate_domain( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + validate_payload, # type: "_models.CustomDomainValidatePayload" + **kwargs # type: Any + ): + # type: (...) -> "_models.CustomDomainValidateResult" + """Check the resource name is valid as well as not in use. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param validate_payload: Custom domain payload to be validated. + :type validate_payload: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainValidatePayload + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomDomainValidateResult, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainValidateResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainValidateResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_domain.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_payload, 'CustomDomainValidatePayload') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomDomainValidateResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/validateDomain'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_bindings_operations.py new file mode 100755 index 00000000000..2203d1097fe --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_bindings_operations.py @@ -0,0 +1,614 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class BindingsOperations(object): + """BindingsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + binding_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BindingResource" + """Get a Binding and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BindingResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + binding_name, # type: str + binding_resource, # type: "_models.BindingResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.BindingResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(binding_resource, 'BindingResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + binding_name, # type: str + binding_resource, # type: "_models.BindingResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BindingResource"] + """Create a new Binding or update an exiting Binding. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :param binding_resource: Parameters for the create or update operation. + :type binding_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + binding_resource=binding_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + binding_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + binding_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Operation to delete a Binding. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + binding_name, # type: str + binding_resource, # type: "_models.BindingResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.BindingResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(binding_resource, 'BindingResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + binding_name, # type: str + binding_resource, # type: "_models.BindingResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BindingResource"] + """Operation to update an exiting Binding. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :param binding_resource: Parameters for the update operation. + :type binding_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + binding_resource=binding_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BindingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BindingResourceCollection"] + """Handles requests to list all resources in an App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BindingResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.BindingResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BindingResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BindingResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_certificates_operations.py new file mode 100755 index 00000000000..909a09e8360 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_certificates_operations.py @@ -0,0 +1,447 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + service_name, # type: str + certificate_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CertificateResource" + """Get the certificate resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param certificate_name: The name of the certificate resource. + :type certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CertificateResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + certificate_name, # type: str + certificate_resource, # type: "_models.CertificateResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.CertificateResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_resource, 'CertificateResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + service_name, # type: str + certificate_name, # type: str + certificate_resource, # type: "_models.CertificateResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.CertificateResource"] + """Create or update certificate resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param certificate_name: The name of the certificate resource. + :type certificate_name: str + :param certificate_resource: Parameters for the create or update operation. + :type certificate_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either CertificateResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_name=certificate_name, + certificate_resource=certificate_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + service_name, # type: str + certificate_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + service_name, # type: str + certificate_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete the certificate resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param certificate_name: The name of the certificate resource. + :type certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_name=certificate_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CertificateResourceCollection"] + """List all the certificates of one user. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CertificateResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.CertificateResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CertificateResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_config_servers_operations.py new file mode 100755 index 00000000000..da944554e83 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_config_servers_operations.py @@ -0,0 +1,500 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ConfigServersOperations(object): + """ConfigServersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ConfigServerResource" + """Get the config server and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConfigServerResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + def _update_put_initial( + self, + resource_group_name, # type: str + service_name, # type: str + config_server_resource, # type: "_models.ConfigServerResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConfigServerResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_put_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(config_server_resource, 'ConfigServerResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + def begin_update_put( + self, + resource_group_name, # type: str + service_name, # type: str + config_server_resource, # type: "_models.ConfigServerResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ConfigServerResource"] + """Update the config server. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param config_server_resource: Parameters for the update operation. + :type config_server_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_put_initial( + resource_group_name=resource_group_name, + service_name=service_name, + config_server_resource=config_server_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + def _update_patch_initial( + self, + resource_group_name, # type: str + service_name, # type: str + config_server_resource, # type: "_models.ConfigServerResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConfigServerResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_patch_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(config_server_resource, 'ConfigServerResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_patch_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + def begin_update_patch( + self, + resource_group_name, # type: str + service_name, # type: str + config_server_resource, # type: "_models.ConfigServerResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ConfigServerResource"] + """Update the config server. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param config_server_resource: Parameters for the update operation. + :type config_server_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_patch_initial( + resource_group_name=resource_group_name, + service_name=service_name, + config_server_resource=config_server_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} # type: ignore + + def _validate_initial( + self, + resource_group_name, # type: str + service_name, # type: str + config_server_settings, # type: "_models.ConfigServerSettings" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConfigServerSettingsValidateResult" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerSettingsValidateResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._validate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(config_server_settings, 'ConfigServerSettings') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerSettingsValidateResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerSettingsValidateResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _validate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate'} # type: ignore + + def begin_validate( + self, + resource_group_name, # type: str + service_name, # type: str + config_server_settings, # type: "_models.ConfigServerSettings" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ConfigServerSettingsValidateResult"] + """Check if the config server settings are valid. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param config_server_settings: Config server settings to be validated. + :type config_server_settings: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ConfigServerSettingsValidateResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ConfigServerSettingsValidateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigServerSettingsValidateResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._validate_initial( + resource_group_name=resource_group_name, + service_name=service_name, + config_server_settings=config_server_settings, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigServerSettingsValidateResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_custom_domains_operations.py new file mode 100755 index 00000000000..7c95c48d105 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_custom_domains_operations.py @@ -0,0 +1,614 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CustomDomainsOperations(object): + """CustomDomainsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + domain_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CustomDomainResource" + """Get the custom domain of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomDomainResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + domain_name, # type: str + domain_resource, # type: "_models.CustomDomainResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.CustomDomainResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_resource, 'CustomDomainResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + domain_name, # type: str + domain_resource, # type: "_models.CustomDomainResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.CustomDomainResource"] + """Create or update custom domain of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :param domain_resource: Parameters for the create or update operation. + :type domain_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either CustomDomainResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + domain_resource=domain_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + domain_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + domain_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete the custom domain of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + domain_name, # type: str + domain_resource, # type: "_models.CustomDomainResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.CustomDomainResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_resource, 'CustomDomainResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + domain_name, # type: str + domain_resource, # type: "_models.CustomDomainResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.CustomDomainResource"] + """Update custom domain of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :param domain_resource: Parameters for the create or update operation. + :type domain_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either CustomDomainResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + domain_resource=domain_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CustomDomainResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CustomDomainResourceCollection"] + """List the custom domains of one lifecycle application. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CustomDomainResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.CustomDomainResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomainResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CustomDomainResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_deployments_operations.py new file mode 100755 index 00000000000..d03c9827847 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_deployments_operations.py @@ -0,0 +1,1145 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DeploymentsOperations(object): + """DeploymentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DeploymentResource" + """Get a Deployment and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + deployment_resource, # type: "_models.DeploymentResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.DeploymentResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment_resource, 'DeploymentResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + deployment_resource, # type: "_models.DeploymentResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DeploymentResource"] + """Create a new Deployment or update an exiting Deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :param deployment_resource: Parameters for the create or update operation. + :type deployment_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + deployment_resource=deployment_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Operation to delete a Deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + deployment_resource, # type: "_models.DeploymentResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.DeploymentResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment_resource, 'DeploymentResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + deployment_resource, # type: "_models.DeploymentResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DeploymentResource"] + """Operation to update an exiting Deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :param deployment_resource: Parameters for the update operation. + :type deployment_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + deployment_resource=deployment_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DeploymentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + version=None, # type: Optional[List[str]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DeploymentResourceCollection"] + """Handles requests to list all resources in an App. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param version: Version of the deployments to be listed. + :type version: list[str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if version is not None: + query_parameters['version'] = [self._serialize.query("version", q, 'str') if q is not None else '' for q in version] + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments'} # type: ignore + + def list_for_cluster( + self, + resource_group_name, # type: str + service_name, # type: str + version=None, # type: Optional[List[str]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DeploymentResourceCollection"] + """List deployments for a certain service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param version: Version of the deployments to be listed. + :type version: list[str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.DeploymentResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_for_cluster.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if version is not None: + query_parameters['version'] = [self._serialize.query("version", q, 'str') if q is not None else '' for q in version] + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_for_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments'} # type: ignore + + def _start_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start'} # type: ignore + + def begin_start( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Start the deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start'} # type: ignore + + def _stop_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop'} # type: ignore + + def begin_stop( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Stop the deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop'} # type: ignore + + def _restart_initial( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._restart_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restart_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart'} # type: ignore + + def begin_restart( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restart the deployment. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart'} # type: ignore + + def get_log_file_url( + self, + resource_group_name, # type: str + service_name, # type: str + app_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.LogFileUrlResponse"] + """Get deployment log file URL. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LogFileUrlResponse, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.LogFileUrlResponse or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.LogFileUrlResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_log_file_url.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LogFileUrlResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_log_file_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getLogFileUrl'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_monitoring_settings_operations.py new file mode 100755 index 00000000000..4b2214f6802 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_monitoring_settings_operations.py @@ -0,0 +1,369 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class MonitoringSettingsOperations(object): + """MonitoringSettingsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MonitoringSettingResource" + """Get the Monitoring Setting and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MonitoringSettingResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore + + def _update_put_initial( + self, + resource_group_name, # type: str + service_name, # type: str + monitoring_setting_resource, # type: "_models.MonitoringSettingResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.MonitoringSettingResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_put_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(monitoring_setting_resource, 'MonitoringSettingResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore + + def begin_update_put( + self, + resource_group_name, # type: str + service_name, # type: str + monitoring_setting_resource, # type: "_models.MonitoringSettingResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MonitoringSettingResource"] + """Update the Monitoring Setting. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param monitoring_setting_resource: Parameters for the update operation. + :type monitoring_setting_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either MonitoringSettingResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_put_initial( + resource_group_name=resource_group_name, + service_name=service_name, + monitoring_setting_resource=monitoring_setting_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore + + def _update_patch_initial( + self, + resource_group_name, # type: str + service_name, # type: str + monitoring_setting_resource, # type: "_models.MonitoringSettingResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.MonitoringSettingResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_patch_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(monitoring_setting_resource, 'MonitoringSettingResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_patch_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore + + def begin_update_patch( + self, + resource_group_name, # type: str + service_name, # type: str + monitoring_setting_resource, # type: "_models.MonitoringSettingResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MonitoringSettingResource"] + """Update the Monitoring Setting. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param monitoring_setting_resource: Parameters for the update operation. + :type monitoring_setting_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either MonitoringSettingResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.MonitoringSettingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MonitoringSettingResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_patch_initial( + resource_group_name=resource_group_name, + service_name=service_name, + monitoring_setting_resource=monitoring_setting_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MonitoringSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_operations.py new file mode 100755 index 00000000000..9f101fb7be3 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailableOperations"] + """Lists all of the available REST API operations of the Microsoft.AppPlatform provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableOperations or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.AvailableOperations] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableOperations', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.AppPlatform/operations'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_runtime_versions_operations.py new file mode 100755 index 00000000000..a3f7d1e885c --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_runtime_versions_operations.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RuntimeVersionsOperations(object): + """RuntimeVersionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_runtime_versions( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.AvailableRuntimeVersions" + """Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AvailableRuntimeVersions, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.AvailableRuntimeVersions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableRuntimeVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_runtime_versions.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AvailableRuntimeVersions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_runtime_versions.metadata = {'url': '/providers/Microsoft.AppPlatform/runtimeVersions'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_services_operations.py new file mode 100755 index 00000000000..b5e5fb8638f --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_services_operations.py @@ -0,0 +1,931 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServicesOperations(object): + """ServicesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceResource" + """Get a Service and its properties. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + resource, # type: "_models.ServiceResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(resource, 'ServiceResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + service_name, # type: str + resource, # type: "_models.ServiceResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ServiceResource"] + """Create a new Service or update an exiting Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param resource: Parameters for the create or update operation. + :type resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ServiceResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + resource=resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Operation to delete a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + resource, # type: "_models.ServiceResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(resource, 'ServiceResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + service_name, # type: str + resource, # type: "_models.ServiceResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ServiceResource"] + """Operation to update an exiting Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param resource: Parameters for the update operation. + :type resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ServiceResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + resource=resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ServiceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} # type: ignore + + def list_test_keys( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.TestKeys" + """List test keys for a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TestKeys, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.TestKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_test_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_test_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys'} # type: ignore + + def regenerate_test_key( + self, + resource_group_name, # type: str + service_name, # type: str + regenerate_test_key_request, # type: "_models.RegenerateTestKeyRequestPayload" + **kwargs # type: Any + ): + # type: (...) -> "_models.TestKeys" + """Regenerate a test key for a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param regenerate_test_key_request: Parameters for the operation. + :type regenerate_test_key_request: ~azure.mgmt.appplatform.v2021_09_01_preview.models.RegenerateTestKeyRequestPayload + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TestKeys, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.TestKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_test_key.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(regenerate_test_key_request, 'RegenerateTestKeyRequestPayload') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_test_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/regenerateTestKey'} # type: ignore + + def disable_test_endpoint( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Disable test endpoint functionality for a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.disable_test_endpoint.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_test_endpoint.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableTestEndpoint'} # type: ignore + + def enable_test_endpoint( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.TestKeys" + """Enable test endpoint functionality for a Service. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TestKeys, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.TestKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.enable_test_endpoint.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + enable_test_endpoint.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableTestEndpoint'} # type: ignore + + def check_name_availability( + self, + location, # type: str + availability_parameters, # type: "_models.NameAvailabilityParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.NameAvailability" + """Checks that the resource name is valid and is not already in use. + + :param location: the region. + :type location: str + :param availability_parameters: Parameters supplied to the operation. + :type availability_parameters: ~azure.mgmt.appplatform.v2021_09_01_preview.models.NameAvailabilityParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NameAvailability, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.NameAvailability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(availability_parameters, 'NameAvailabilityParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NameAvailability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ServiceResourceList"] + """Handles requests to list all resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring'} # type: ignore + + def list( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ServiceResourceList"] + """Handles requests to list all resources in a resource group. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.ServiceResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_skus_operations.py new file mode 100755 index 00000000000..03bebe5f0bf --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_skus_operations.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SkusOperations(object): + """SkusOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceSkuCollection"] + """Lists all of the available skus of the Microsoft.AppPlatform provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceSkuCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.ResourceSkuCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceSkuCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceSkuCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_storages_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_storages_operations.py new file mode 100755 index 00000000000..6752237e796 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_09_01_preview/operations/_storages_operations.py @@ -0,0 +1,447 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class StoragesOperations(object): + """StoragesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.appplatform.v2021_09_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + service_name, # type: str + storage_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StorageResource" + """Get the storage resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param storage_name: The name of the storage resource. + :type storage_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StorageResource, or the result of cls(response) + :rtype: ~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StorageResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + service_name, # type: str + storage_name, # type: str + storage_resource, # type: "_models.StorageResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.StorageResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(storage_resource, 'StorageResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StorageResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('StorageResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StorageResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + service_name, # type: str + storage_name, # type: str + storage_resource, # type: "_models.StorageResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.StorageResource"] + """Create or update storage resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param storage_name: The name of the storage resource. + :type storage_name: str + :param storage_resource: Parameters for the create or update operation. + :type storage_resource: ~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either StorageResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + storage_name=storage_name, + storage_resource=storage_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StorageResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + service_name, # type: str + storage_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + service_name, # type: str + storage_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete the storage resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param storage_name: The name of the storage resource. + :type storage_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + storage_name=storage_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'storageName': self._serialize.url("storage_name", storage_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StorageResourceCollection"] + """List all the storages of one Azure Spring Cloud instance. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StorageResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2021_09_01_preview.models.StorageResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StorageResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages'} # type: ignore From 8102b03d3e8134b6c75d24f8437738200c400897 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Wed, 20 Oct 2021 18:56:54 +0800 Subject: [PATCH 14/26] Update --- src/spring-cloud/azext_spring_cloud/custom.py | 2 + .../vendored_sdks/appplatform/__init__.py | 0 .../_app_platform_management_client.py | 50 ------------------- .../appplatform/_configuration.py | 0 .../vendored_sdks/appplatform/_version.py | 0 .../vendored_sdks/appplatform/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 50 ------------------- .../appplatform/aio/_configuration.py | 0 .../vendored_sdks/appplatform/models.py | 0 .../v2019_05_01_preview/__init__.py | 0 .../_app_platform_management_client.py | 0 .../v2019_05_01_preview/_configuration.py | 0 .../v2019_05_01_preview/_version.py | 2 +- .../v2019_05_01_preview/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 0 .../v2019_05_01_preview/aio/_configuration.py | 0 .../aio/operations/__init__.py | 0 .../aio/operations/_apps_operations.py | 0 .../aio/operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../aio/operations/_deployments_operations.py | 0 .../aio/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../aio/operations/_services_operations.py | 0 .../aio/operations/_sku_operations.py | 0 .../v2019_05_01_preview/models/__init__.py | 0 .../_app_platform_management_client_enums.py | 0 .../v2019_05_01_preview/models/_models.py | 4 -- .../v2019_05_01_preview/models/_models_py3.py | 5 -- .../operations/__init__.py | 0 .../operations/_apps_operations.py | 0 .../operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../operations/_deployments_operations.py | 0 .../operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../operations/_services_operations.py | 0 .../operations/_sku_operations.py | 0 .../appplatform/v2020_07_01/__init__.py | 0 .../_app_platform_management_client.py | 0 .../appplatform/v2020_07_01/_configuration.py | 0 .../appplatform/v2020_07_01/_version.py | 2 +- .../appplatform/v2020_07_01/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 0 .../v2020_07_01/aio/_configuration.py | 0 .../v2020_07_01/aio/operations/__init__.py | 0 .../aio/operations/_apps_operations.py | 0 .../aio/operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../aio/operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../v2020_07_01/aio/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../aio/operations/_services_operations.py | 0 .../aio/operations/_skus_operations.py | 0 .../v2020_07_01/models/__init__.py | 0 .../_app_platform_management_client_enums.py | 0 .../appplatform/v2020_07_01/models/_models.py | 4 -- .../v2020_07_01/models/_models_py3.py | 5 -- .../v2020_07_01/operations/__init__.py | 0 .../operations/_apps_operations.py | 0 .../operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../v2020_07_01/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../operations/_services_operations.py | 0 .../operations/_skus_operations.py | 0 .../v2020_11_01_preview/__init__.py | 0 .../_app_platform_management_client.py | 0 .../v2020_11_01_preview/_configuration.py | 0 .../v2020_11_01_preview/_version.py | 2 +- .../v2020_11_01_preview/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 0 .../v2020_11_01_preview/aio/_configuration.py | 0 .../aio/operations/__init__.py | 0 .../aio/operations/_apps_operations.py | 0 .../aio/operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../aio/operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../aio/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../aio/operations/_services_operations.py | 0 .../aio/operations/_skus_operations.py | 0 .../v2020_11_01_preview/models/__init__.py | 0 .../_app_platform_management_client_enums.py | 0 .../v2020_11_01_preview/models/_models.py | 4 -- .../v2020_11_01_preview/models/_models_py3.py | 5 -- .../operations/__init__.py | 0 .../operations/_apps_operations.py | 0 .../operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../operations/_services_operations.py | 0 .../operations/_skus_operations.py | 0 .../v2021_06_01_preview/__init__.py | 0 .../_app_platform_management_client.py | 0 .../v2021_06_01_preview/_configuration.py | 0 .../v2021_06_01_preview/_version.py | 2 +- .../v2021_06_01_preview/aio/__init__.py | 0 .../aio/_app_platform_management_client.py | 0 .../v2021_06_01_preview/aio/_configuration.py | 0 .../aio/operations/__init__.py | 0 .../aio/operations/_apps_operations.py | 0 .../aio/operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../aio/operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../aio/operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../aio/operations/_services_operations.py | 0 .../aio/operations/_skus_operations.py | 0 .../v2021_06_01_preview/models/__init__.py | 0 .../_app_platform_management_client_enums.py | 0 .../v2021_06_01_preview/models/_models.py | 14 ++---- .../v2021_06_01_preview/models/_models_py3.py | 15 ++---- .../operations/__init__.py | 0 .../operations/_apps_operations.py | 0 .../operations/_bindings_operations.py | 0 .../operations/_certificates_operations.py | 0 .../operations/_config_servers_operations.py | 0 .../operations/_custom_domains_operations.py | 0 .../operations/_deployments_operations.py | 0 .../_monitoring_settings_operations.py | 0 .../operations/_operations.py | 0 .../_runtime_versions_operations.py | 0 .../operations/_services_operations.py | 0 .../operations/_skus_operations.py | 0 145 files changed, 16 insertions(+), 150 deletions(-) mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_version.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_apps_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_bindings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_certificates_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_custom_domains_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_deployments_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_runtime_versions_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_services_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_sku_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_apps_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_bindings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_certificates_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_custom_domains_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_deployments_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_services_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_sku_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_apps_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_bindings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_certificates_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_config_servers_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_custom_domains_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_deployments_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_monitoring_settings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_runtime_versions_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_services_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_skus_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_apps_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_bindings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_certificates_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_config_servers_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_custom_domains_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_deployments_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_monitoring_settings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_runtime_versions_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_services_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_skus_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_apps_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_bindings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_certificates_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_config_servers_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_custom_domains_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_deployments_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_monitoring_settings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_runtime_versions_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_services_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_skus_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_app_platform_management_client_enums.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_apps_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_bindings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_certificates_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_config_servers_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_custom_domains_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_deployments_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_monitoring_settings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_runtime_versions_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_services_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_skus_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_app_platform_management_client.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_configuration.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_apps_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_bindings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_certificates_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_config_servers_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_custom_domains_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_deployments_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_monitoring_settings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_runtime_versions_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_services_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_skus_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_app_platform_management_client_enums.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/__init__.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_apps_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_bindings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_certificates_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_config_servers_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_custom_domains_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_deployments_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_monitoring_settings_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_runtime_versions_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_services_operations.py mode change 100755 => 100644 src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_skus_operations.py diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 6006499b24b..a7635bdfdce 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -1624,6 +1624,8 @@ def certificate_add(cmd, client, resource_group, service, name, only_public_cert raise InvalidArgumentValueError("--vault-certificate-name should be provided for Key Vault Certificate") if vault_uri is not None: + if only_public_certificate is None: + only_public_certificate = False properties = models_20210901preview.KeyVaultCertificateProperties( type="KeyVaultCertificate", vault_uri=vault_uri, diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py old mode 100755 new mode 100644 index 16c097ec411..b417f26cc70 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py @@ -96,7 +96,6 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2020-07-01: :mod:`v2020_07_01.models` * 2020-11-01-preview: :mod:`v2020_11_01_preview.models` * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` - * 2021-09-01-preview: :mod:`v2021_09_01_preview.models` """ if api_version == '2019-05-01-preview': from .v2019_05_01_preview import models @@ -110,9 +109,6 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-06-01-preview': from .v2021_06_01_preview import models return models - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview import models - return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -123,7 +119,6 @@ def apps(self): * 2020-07-01: :class:`AppsOperations` * 2020-11-01-preview: :class:`AppsOperations` * 2021-06-01-preview: :class:`AppsOperations` - * 2021-09-01-preview: :class:`AppsOperations` """ api_version = self._get_api_version('apps') if api_version == '2019-05-01-preview': @@ -134,8 +129,6 @@ def apps(self): from .v2020_11_01_preview.operations import AppsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import AppsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import AppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'apps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -148,7 +141,6 @@ def bindings(self): * 2020-07-01: :class:`BindingsOperations` * 2020-11-01-preview: :class:`BindingsOperations` * 2021-06-01-preview: :class:`BindingsOperations` - * 2021-09-01-preview: :class:`BindingsOperations` """ api_version = self._get_api_version('bindings') if api_version == '2019-05-01-preview': @@ -159,8 +151,6 @@ def bindings(self): from .v2020_11_01_preview.operations import BindingsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import BindingsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import BindingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'bindings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -173,7 +163,6 @@ def certificates(self): * 2020-07-01: :class:`CertificatesOperations` * 2020-11-01-preview: :class:`CertificatesOperations` * 2021-06-01-preview: :class:`CertificatesOperations` - * 2021-09-01-preview: :class:`CertificatesOperations` """ api_version = self._get_api_version('certificates') if api_version == '2019-05-01-preview': @@ -184,8 +173,6 @@ def certificates(self): from .v2020_11_01_preview.operations import CertificatesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import CertificatesOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import CertificatesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'certificates'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -197,7 +184,6 @@ def config_servers(self): * 2020-07-01: :class:`ConfigServersOperations` * 2020-11-01-preview: :class:`ConfigServersOperations` * 2021-06-01-preview: :class:`ConfigServersOperations` - * 2021-09-01-preview: :class:`ConfigServersOperations` """ api_version = self._get_api_version('config_servers') if api_version == '2020-07-01': @@ -206,8 +192,6 @@ def config_servers(self): from .v2020_11_01_preview.operations import ConfigServersOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ConfigServersOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import ConfigServersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'config_servers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -220,7 +204,6 @@ def custom_domains(self): * 2020-07-01: :class:`CustomDomainsOperations` * 2020-11-01-preview: :class:`CustomDomainsOperations` * 2021-06-01-preview: :class:`CustomDomainsOperations` - * 2021-09-01-preview: :class:`CustomDomainsOperations` """ api_version = self._get_api_version('custom_domains') if api_version == '2019-05-01-preview': @@ -231,8 +214,6 @@ def custom_domains(self): from .v2020_11_01_preview.operations import CustomDomainsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import CustomDomainsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import CustomDomainsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'custom_domains'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -245,7 +226,6 @@ def deployments(self): * 2020-07-01: :class:`DeploymentsOperations` * 2020-11-01-preview: :class:`DeploymentsOperations` * 2021-06-01-preview: :class:`DeploymentsOperations` - * 2021-09-01-preview: :class:`DeploymentsOperations` """ api_version = self._get_api_version('deployments') if api_version == '2019-05-01-preview': @@ -256,8 +236,6 @@ def deployments(self): from .v2020_11_01_preview.operations import DeploymentsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import DeploymentsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import DeploymentsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'deployments'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -269,7 +247,6 @@ def monitoring_settings(self): * 2020-07-01: :class:`MonitoringSettingsOperations` * 2020-11-01-preview: :class:`MonitoringSettingsOperations` * 2021-06-01-preview: :class:`MonitoringSettingsOperations` - * 2021-09-01-preview: :class:`MonitoringSettingsOperations` """ api_version = self._get_api_version('monitoring_settings') if api_version == '2020-07-01': @@ -278,8 +255,6 @@ def monitoring_settings(self): from .v2020_11_01_preview.operations import MonitoringSettingsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import MonitoringSettingsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import MonitoringSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'monitoring_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -292,7 +267,6 @@ def operations(self): * 2020-07-01: :class:`Operations` * 2020-11-01-preview: :class:`Operations` * 2021-06-01-preview: :class:`Operations` - * 2021-09-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2019-05-01-preview': @@ -303,8 +277,6 @@ def operations(self): from .v2020_11_01_preview.operations import Operations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import Operations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -317,7 +289,6 @@ def runtime_versions(self): * 2020-07-01: :class:`RuntimeVersionsOperations` * 2020-11-01-preview: :class:`RuntimeVersionsOperations` * 2021-06-01-preview: :class:`RuntimeVersionsOperations` - * 2021-09-01-preview: :class:`RuntimeVersionsOperations` """ api_version = self._get_api_version('runtime_versions') if api_version == '2019-05-01-preview': @@ -328,8 +299,6 @@ def runtime_versions(self): from .v2020_11_01_preview.operations import RuntimeVersionsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import RuntimeVersionsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import RuntimeVersionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'runtime_versions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -342,7 +311,6 @@ def services(self): * 2020-07-01: :class:`ServicesOperations` * 2020-11-01-preview: :class:`ServicesOperations` * 2021-06-01-preview: :class:`ServicesOperations` - * 2021-09-01-preview: :class:`ServicesOperations` """ api_version = self._get_api_version('services') if api_version == '2019-05-01-preview': @@ -353,8 +321,6 @@ def services(self): from .v2020_11_01_preview.operations import ServicesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ServicesOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import ServicesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'services'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -379,7 +345,6 @@ def skus(self): * 2020-07-01: :class:`SkusOperations` * 2020-11-01-preview: :class:`SkusOperations` * 2021-06-01-preview: :class:`SkusOperations` - * 2021-09-01-preview: :class:`SkusOperations` """ api_version = self._get_api_version('skus') if api_version == '2020-07-01': @@ -388,25 +353,10 @@ def skus(self): from .v2020_11_01_preview.operations import SkusOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import SkusOperations as OperationClass - elif api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import SkusOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'skus'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - @property - def storages(self): - """Instance depends on the API version: - - * 2021-09-01-preview: :class:`StoragesOperations` - """ - api_version = self._get_api_version('storages') - if api_version == '2021-09-01-preview': - from .v2021_09_01_preview.operations import StoragesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'storages'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - def close(self): self._client.close() def __enter__(self): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_version.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py old mode 100755 new mode 100644 index 8449050d7a6..401fdc29467 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_app_platform_management_client.py @@ -94,7 +94,6 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2020-07-01: :mod:`v2020_07_01.models` * 2020-11-01-preview: :mod:`v2020_11_01_preview.models` * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` - * 2021-09-01-preview: :mod:`v2021_09_01_preview.models` """ if api_version == '2019-05-01-preview': from ..v2019_05_01_preview import models @@ -108,9 +107,6 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview import models return models - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview import models - return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -121,7 +117,6 @@ def apps(self): * 2020-07-01: :class:`AppsOperations` * 2020-11-01-preview: :class:`AppsOperations` * 2021-06-01-preview: :class:`AppsOperations` - * 2021-09-01-preview: :class:`AppsOperations` """ api_version = self._get_api_version('apps') if api_version == '2019-05-01-preview': @@ -132,8 +127,6 @@ def apps(self): from ..v2020_11_01_preview.aio.operations import AppsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import AppsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import AppsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'apps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -146,7 +139,6 @@ def bindings(self): * 2020-07-01: :class:`BindingsOperations` * 2020-11-01-preview: :class:`BindingsOperations` * 2021-06-01-preview: :class:`BindingsOperations` - * 2021-09-01-preview: :class:`BindingsOperations` """ api_version = self._get_api_version('bindings') if api_version == '2019-05-01-preview': @@ -157,8 +149,6 @@ def bindings(self): from ..v2020_11_01_preview.aio.operations import BindingsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import BindingsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import BindingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'bindings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -171,7 +161,6 @@ def certificates(self): * 2020-07-01: :class:`CertificatesOperations` * 2020-11-01-preview: :class:`CertificatesOperations` * 2021-06-01-preview: :class:`CertificatesOperations` - * 2021-09-01-preview: :class:`CertificatesOperations` """ api_version = self._get_api_version('certificates') if api_version == '2019-05-01-preview': @@ -182,8 +171,6 @@ def certificates(self): from ..v2020_11_01_preview.aio.operations import CertificatesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import CertificatesOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import CertificatesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'certificates'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -195,7 +182,6 @@ def config_servers(self): * 2020-07-01: :class:`ConfigServersOperations` * 2020-11-01-preview: :class:`ConfigServersOperations` * 2021-06-01-preview: :class:`ConfigServersOperations` - * 2021-09-01-preview: :class:`ConfigServersOperations` """ api_version = self._get_api_version('config_servers') if api_version == '2020-07-01': @@ -204,8 +190,6 @@ def config_servers(self): from ..v2020_11_01_preview.aio.operations import ConfigServersOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ConfigServersOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import ConfigServersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'config_servers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -218,7 +202,6 @@ def custom_domains(self): * 2020-07-01: :class:`CustomDomainsOperations` * 2020-11-01-preview: :class:`CustomDomainsOperations` * 2021-06-01-preview: :class:`CustomDomainsOperations` - * 2021-09-01-preview: :class:`CustomDomainsOperations` """ api_version = self._get_api_version('custom_domains') if api_version == '2019-05-01-preview': @@ -229,8 +212,6 @@ def custom_domains(self): from ..v2020_11_01_preview.aio.operations import CustomDomainsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import CustomDomainsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import CustomDomainsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'custom_domains'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -243,7 +224,6 @@ def deployments(self): * 2020-07-01: :class:`DeploymentsOperations` * 2020-11-01-preview: :class:`DeploymentsOperations` * 2021-06-01-preview: :class:`DeploymentsOperations` - * 2021-09-01-preview: :class:`DeploymentsOperations` """ api_version = self._get_api_version('deployments') if api_version == '2019-05-01-preview': @@ -254,8 +234,6 @@ def deployments(self): from ..v2020_11_01_preview.aio.operations import DeploymentsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import DeploymentsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import DeploymentsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'deployments'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -267,7 +245,6 @@ def monitoring_settings(self): * 2020-07-01: :class:`MonitoringSettingsOperations` * 2020-11-01-preview: :class:`MonitoringSettingsOperations` * 2021-06-01-preview: :class:`MonitoringSettingsOperations` - * 2021-09-01-preview: :class:`MonitoringSettingsOperations` """ api_version = self._get_api_version('monitoring_settings') if api_version == '2020-07-01': @@ -276,8 +253,6 @@ def monitoring_settings(self): from ..v2020_11_01_preview.aio.operations import MonitoringSettingsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import MonitoringSettingsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import MonitoringSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'monitoring_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -290,7 +265,6 @@ def operations(self): * 2020-07-01: :class:`Operations` * 2020-11-01-preview: :class:`Operations` * 2021-06-01-preview: :class:`Operations` - * 2021-09-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2019-05-01-preview': @@ -301,8 +275,6 @@ def operations(self): from ..v2020_11_01_preview.aio.operations import Operations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import Operations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -315,7 +287,6 @@ def runtime_versions(self): * 2020-07-01: :class:`RuntimeVersionsOperations` * 2020-11-01-preview: :class:`RuntimeVersionsOperations` * 2021-06-01-preview: :class:`RuntimeVersionsOperations` - * 2021-09-01-preview: :class:`RuntimeVersionsOperations` """ api_version = self._get_api_version('runtime_versions') if api_version == '2019-05-01-preview': @@ -326,8 +297,6 @@ def runtime_versions(self): from ..v2020_11_01_preview.aio.operations import RuntimeVersionsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import RuntimeVersionsOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import RuntimeVersionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'runtime_versions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -340,7 +309,6 @@ def services(self): * 2020-07-01: :class:`ServicesOperations` * 2020-11-01-preview: :class:`ServicesOperations` * 2021-06-01-preview: :class:`ServicesOperations` - * 2021-09-01-preview: :class:`ServicesOperations` """ api_version = self._get_api_version('services') if api_version == '2019-05-01-preview': @@ -351,8 +319,6 @@ def services(self): from ..v2020_11_01_preview.aio.operations import ServicesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ServicesOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import ServicesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'services'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -377,7 +343,6 @@ def skus(self): * 2020-07-01: :class:`SkusOperations` * 2020-11-01-preview: :class:`SkusOperations` * 2021-06-01-preview: :class:`SkusOperations` - * 2021-09-01-preview: :class:`SkusOperations` """ api_version = self._get_api_version('skus') if api_version == '2020-07-01': @@ -386,25 +351,10 @@ def skus(self): from ..v2020_11_01_preview.aio.operations import SkusOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import SkusOperations as OperationClass - elif api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import SkusOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'skus'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - @property - def storages(self): - """Instance depends on the API version: - - * 2021-09-01-preview: :class:`StoragesOperations` - """ - api_version = self._get_api_version('storages') - if api_version == '2021-09-01-preview': - from ..v2021_09_01_preview.aio.operations import StoragesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'storages'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - async def close(self): await self._client.close() async def __aenter__(self): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/aio/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_app_platform_management_client.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py old mode 100755 new mode 100644 index e5754a47ce6..92453d8691d --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "6.1.0" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_app_platform_management_client.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_apps_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_bindings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_certificates_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_custom_domains_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_deployments_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_runtime_versions_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_services_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_sku_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/aio/operations/_sku_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py old mode 100755 new mode 100644 index 81e6462e7e0..8e0cc5fe573 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py @@ -1285,8 +1285,6 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2019_05_01_preview.models.MetricDimension] - :param source_mdm_namespace: Name of the MDM namespace. Optional. - :type source_mdm_namespace: str """ _attribute_map = { @@ -1300,7 +1298,6 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1318,7 +1315,6 @@ def __init__( self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.dimensions = kwargs.get('dimensions', None) - self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) class NameAvailability(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py old mode 100755 new mode 100644 index 7afe41afaa2..2538ba5505b --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py @@ -1408,8 +1408,6 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2019_05_01_preview.models.MetricDimension] - :param source_mdm_namespace: Name of the MDM namespace. Optional. - :type source_mdm_namespace: str """ _attribute_map = { @@ -1423,7 +1421,6 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1439,7 +1436,6 @@ def __init__( supported_time_grain_types: Optional[List[str]] = None, fill_gap_with_zero: Optional[bool] = None, dimensions: Optional[List["MetricDimension"]] = None, - source_mdm_namespace: Optional[str] = None, **kwargs ): super(MetricSpecification, self).__init__(**kwargs) @@ -1453,7 +1449,6 @@ def __init__( self.supported_time_grain_types = supported_time_grain_types self.fill_gap_with_zero = fill_gap_with_zero self.dimensions = dimensions - self.source_mdm_namespace = source_mdm_namespace class NameAvailability(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_apps_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_bindings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_certificates_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_custom_domains_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_deployments_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_services_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_sku_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/operations/_sku_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_app_platform_management_client.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py old mode 100755 new mode 100644 index e5754a47ce6..92453d8691d --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "6.1.0" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_app_platform_management_client.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_apps_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_bindings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_certificates_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_config_servers_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_custom_domains_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_deployments_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_monitoring_settings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_runtime_versions_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_services_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/aio/operations/_skus_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py old mode 100755 new mode 100644 index 9428d8d29e6..10db354c88f --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py @@ -1353,8 +1353,6 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2020_07_01.models.MetricDimension] - :param source_mdm_namespace: Name of the MDM namespace. Optional. - :type source_mdm_namespace: str """ _attribute_map = { @@ -1368,7 +1366,6 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1386,7 +1383,6 @@ def __init__( self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.dimensions = kwargs.get('dimensions', None) - self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) class MonitoringSettingProperties(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py old mode 100755 new mode 100644 index b1dad0b57a2..1d9493a9481 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py @@ -1482,8 +1482,6 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2020_07_01.models.MetricDimension] - :param source_mdm_namespace: Name of the MDM namespace. Optional. - :type source_mdm_namespace: str """ _attribute_map = { @@ -1497,7 +1495,6 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1513,7 +1510,6 @@ def __init__( supported_time_grain_types: Optional[List[str]] = None, fill_gap_with_zero: Optional[bool] = None, dimensions: Optional[List["MetricDimension"]] = None, - source_mdm_namespace: Optional[str] = None, **kwargs ): super(MetricSpecification, self).__init__(**kwargs) @@ -1527,7 +1523,6 @@ def __init__( self.supported_time_grain_types = supported_time_grain_types self.fill_gap_with_zero = fill_gap_with_zero self.dimensions = dimensions - self.source_mdm_namespace = source_mdm_namespace class MonitoringSettingProperties(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_apps_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_bindings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_certificates_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_config_servers_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_custom_domains_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_deployments_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_monitoring_settings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_runtime_versions_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_services_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/operations/_skus_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_app_platform_management_client.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py old mode 100755 new mode 100644 index e5754a47ce6..92453d8691d --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "6.1.0" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_app_platform_management_client.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_apps_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_bindings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_certificates_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_config_servers_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_custom_domains_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_deployments_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_monitoring_settings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_runtime_versions_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_services_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/aio/operations/_skus_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_app_platform_management_client_enums.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py old mode 100755 new mode 100644 index 1b64478e417..6a3b321f02f --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py @@ -1388,8 +1388,6 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2020_11_01_preview.models.MetricDimension] - :param source_mdm_namespace: Name of the MDM namespace. Optional. - :type source_mdm_namespace: str """ _attribute_map = { @@ -1403,7 +1401,6 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1421,7 +1418,6 @@ def __init__( self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.dimensions = kwargs.get('dimensions', None) - self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) class MonitoringSettingProperties(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py old mode 100755 new mode 100644 index e8b893255fd..ad133e58850 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py @@ -1518,8 +1518,6 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2020_11_01_preview.models.MetricDimension] - :param source_mdm_namespace: Name of the MDM namespace. Optional. - :type source_mdm_namespace: str """ _attribute_map = { @@ -1533,7 +1531,6 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1549,7 +1546,6 @@ def __init__( supported_time_grain_types: Optional[List[str]] = None, fill_gap_with_zero: Optional[bool] = None, dimensions: Optional[List["MetricDimension"]] = None, - source_mdm_namespace: Optional[str] = None, **kwargs ): super(MetricSpecification, self).__init__(**kwargs) @@ -1563,7 +1559,6 @@ def __init__( self.supported_time_grain_types = supported_time_grain_types self.fill_gap_with_zero = fill_gap_with_zero self.dimensions = dimensions - self.source_mdm_namespace = source_mdm_namespace class MonitoringSettingProperties(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_apps_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_bindings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_certificates_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_config_servers_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_custom_domains_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_deployments_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_monitoring_settings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_runtime_versions_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_services_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/operations/_skus_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_app_platform_management_client.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py old mode 100755 new mode 100644 index e5754a47ce6..92453d8691d --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "6.1.0" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_app_platform_management_client.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/_configuration.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_apps_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_bindings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_certificates_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_config_servers_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_custom_domains_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_deployments_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_monitoring_settings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_runtime_versions_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_services_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/aio/operations/_skus_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_app_platform_management_client_enums.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py old mode 100755 new mode 100644 index 7b45b3b5041..0fff45f07e4 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py @@ -227,11 +227,11 @@ def __init__( self.provisioning_state = None self.active_deployment_name = kwargs.get('active_deployment_name', None) self.fqdn = kwargs.get('fqdn', None) - self.https_only = kwargs.get('https_only', False) + self.https_only = kwargs.get('https_only', None) self.created_time = None self.temporary_disk = kwargs.get('temporary_disk', None) self.persistent_disk = kwargs.get('persistent_disk', None) - self.enable_end_to_end_tls = kwargs.get('enable_end_to_end_tls', False) + self.enable_end_to_end_tls = kwargs.get('enable_end_to_end_tls', None) class AvailableOperations(msrest.serialization.Model): @@ -1185,7 +1185,7 @@ class DeploymentSettings(msrest.serialization.Model): :param environment_variables: Collection of environment variables. :type environment_variables: dict[str, str] :param runtime_version: Runtime version. Possible values include: "Java_8", "Java_11", - "NetCore_31". Default value: "Java_8". + "NetCore_31". :type runtime_version: str or ~azure.mgmt.appplatform.v2021_06_01_preview.models.RuntimeVersion """ @@ -1210,7 +1210,7 @@ def __init__( self.jvm_options = kwargs.get('jvm_options', None) self.net_core_main_entry_path = kwargs.get('net_core_main_entry_path', None) self.environment_variables = kwargs.get('environment_variables', None) - self.runtime_version = kwargs.get('runtime_version', "Java_8") + self.runtime_version = kwargs.get('runtime_version', None) class Error(msrest.serialization.Model): @@ -1459,8 +1459,6 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2021_06_01_preview.models.MetricDimension] - :param source_mdm_namespace: Name of the MDM namespace. Optional. - :type source_mdm_namespace: str """ _attribute_map = { @@ -1474,7 +1472,6 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1492,7 +1489,6 @@ def __init__( self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.dimensions = kwargs.get('dimensions', None) - self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) class MonitoringSettingProperties(msrest.serialization.Model): @@ -2429,7 +2425,7 @@ def __init__( ): super(TemporaryDisk, self).__init__(**kwargs) self.size_in_gb = kwargs.get('size_in_gb', None) - self.mount_path = kwargs.get('mount_path', "/tmp") + self.mount_path = kwargs.get('mount_path', None) class TestKeys(msrest.serialization.Model): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py old mode 100755 new mode 100644 index abec200ca32..f2bb0bee5df --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py @@ -234,10 +234,10 @@ def __init__( public: Optional[bool] = None, active_deployment_name: Optional[str] = None, fqdn: Optional[str] = None, - https_only: Optional[bool] = False, + https_only: Optional[bool] = None, temporary_disk: Optional["TemporaryDisk"] = None, persistent_disk: Optional["PersistentDisk"] = None, - enable_end_to_end_tls: Optional[bool] = False, + enable_end_to_end_tls: Optional[bool] = None, **kwargs ): super(AppResourceProperties, self).__init__(**kwargs) @@ -1285,7 +1285,7 @@ class DeploymentSettings(msrest.serialization.Model): :param environment_variables: Collection of environment variables. :type environment_variables: dict[str, str] :param runtime_version: Runtime version. Possible values include: "Java_8", "Java_11", - "NetCore_31". Default value: "Java_8". + "NetCore_31". :type runtime_version: str or ~azure.mgmt.appplatform.v2021_06_01_preview.models.RuntimeVersion """ @@ -1308,7 +1308,7 @@ def __init__( jvm_options: Optional[str] = None, net_core_main_entry_path: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, - runtime_version: Optional[Union[str, "RuntimeVersion"]] = "Java_8", + runtime_version: Optional[Union[str, "RuntimeVersion"]] = None, **kwargs ): super(DeploymentSettings, self).__init__(**kwargs) @@ -1599,8 +1599,6 @@ class MetricSpecification(msrest.serialization.Model): :type fill_gap_with_zero: bool :param dimensions: Dimensions of the metric. :type dimensions: list[~azure.mgmt.appplatform.v2021_06_01_preview.models.MetricDimension] - :param source_mdm_namespace: Name of the MDM namespace. Optional. - :type source_mdm_namespace: str """ _attribute_map = { @@ -1614,7 +1612,6 @@ class MetricSpecification(msrest.serialization.Model): 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, } def __init__( @@ -1630,7 +1627,6 @@ def __init__( supported_time_grain_types: Optional[List[str]] = None, fill_gap_with_zero: Optional[bool] = None, dimensions: Optional[List["MetricDimension"]] = None, - source_mdm_namespace: Optional[str] = None, **kwargs ): super(MetricSpecification, self).__init__(**kwargs) @@ -1644,7 +1640,6 @@ def __init__( self.supported_time_grain_types = supported_time_grain_types self.fill_gap_with_zero = fill_gap_with_zero self.dimensions = dimensions - self.source_mdm_namespace = source_mdm_namespace class MonitoringSettingProperties(msrest.serialization.Model): @@ -2680,7 +2675,7 @@ def __init__( self, *, size_in_gb: Optional[int] = None, - mount_path: Optional[str] = "/tmp", + mount_path: Optional[str] = None, **kwargs ): super(TemporaryDisk, self).__init__(**kwargs) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/__init__.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_apps_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_bindings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_certificates_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_config_servers_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_custom_domains_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_deployments_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_monitoring_settings_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_runtime_versions_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_services_operations.py old mode 100755 new mode 100644 diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_skus_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_skus_operations.py old mode 100755 new mode 100644 From daaa77e583025234bab0ae59c0c36dd914b018a8 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 21 Oct 2021 12:18:46 +0800 Subject: [PATCH 15/26] Update IT --- .../recordings/test_bind_cert_to_domain.yaml | 208 +++++++++--------- 1 file changed, 104 insertions(+), 104 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_bind_cert_to_domain.yaml b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_bind_cert_to_domain.yaml index 9c63fd743d3..ee66b22d26f 100644 --- a/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_bind_cert_to_domain.yaml +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_bind_cert_to_domain.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"properties": {"vaultUri": "https://integration-test-prod.vault.azure.net/", - "keyVaultCertName": "cli-unittest"}}' + body: '{"properties": {"type": "KeyVaultCertificate", "vaultUri": "https://integration-test-prod.vault.azure.net/", + "keyVaultCertName": "cli-unittest", "excludePrivateKey": false}}' headers: Accept: - application/json @@ -12,27 +12,27 @@ interactions: Connection: - keep-alive Content-Length: - - '114' + - '173' Content-Type: - application/json ParameterSetName: - --name --vault-uri --vault-certificate-name -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: - string: '{"properties":{"thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":false,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' headers: cache-control: - no-cache content-length: - - '623' + - '678' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:33 GMT + - Thu, 21 Oct 2021 03:30:31 GMT expires: - '-1' pragma: @@ -50,9 +50,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -70,21 +70,21 @@ interactions: ParameterSetName: - --name -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: - string: '{"properties":{"thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":false,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' headers: cache-control: - no-cache content-length: - - '623' + - '678' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:33 GMT + - Thu, 21 Oct 2021 03:30:34 GMT expires: - '-1' pragma: @@ -102,7 +102,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -120,21 +120,21 @@ interactions: ParameterSetName: - -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2021-09-01-preview response: body: - string: '{"value":[{"properties":{"thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}]}' + string: '{"value":[{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":false,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}]}' headers: cache-control: - no-cache content-length: - - '635' + - '690' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:35 GMT + - Thu, 21 Oct 2021 03:30:37 GMT expires: - '-1' pragma: @@ -152,7 +152,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -170,21 +170,21 @@ interactions: ParameterSetName: - --domain-name --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: - string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-07-20T03:46:52.134Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: cache-control: - no-cache content-length: - - '548' + - '551' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:36 GMT + - Thu, 21 Oct 2021 03:30:40 GMT expires: - '-1' pragma: @@ -204,7 +204,7 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: - '11999' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -226,9 +226,9 @@ interactions: ParameterSetName: - --domain-name --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"properties":{"appName":"test-app"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}' @@ -240,7 +240,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:37 GMT + - Thu, 21 Oct 2021 03:30:41 GMT expires: - '-1' pragma: @@ -258,9 +258,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -278,21 +278,21 @@ interactions: ParameterSetName: - --domain-name --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: - string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-07-20T03:46:52.134Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: cache-control: - no-cache content-length: - - '548' + - '551' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:39 GMT + - Thu, 21 Oct 2021 03:30:43 GMT expires: - '-1' pragma: @@ -312,7 +312,7 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: - '11999' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -330,9 +330,9 @@ interactions: ParameterSetName: - --domain-name --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"properties":{"appName":"test-app"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}' @@ -344,7 +344,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:39 GMT + - Thu, 21 Oct 2021 03:30:44 GMT expires: - '-1' pragma: @@ -362,7 +362,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -380,21 +380,21 @@ interactions: ParameterSetName: - --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: - string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-07-20T03:46:52.134Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: cache-control: - no-cache content-length: - - '548' + - '551' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:41 GMT + - Thu, 21 Oct 2021 03:30:47 GMT expires: - '-1' pragma: @@ -412,9 +412,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11999' + - '11998' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -432,9 +432,9 @@ interactions: ParameterSetName: - --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains?api-version=2020-07-01 response: body: string: '{"value":[{"properties":{"appName":"test-app"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}]}' @@ -446,7 +446,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:41 GMT + - Thu, 21 Oct 2021 03:30:47 GMT expires: - '-1' pragma: @@ -464,7 +464,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -482,21 +482,21 @@ interactions: ParameterSetName: - --domain-name --certificate --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: - string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-07-20T03:46:52.134Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: cache-control: - no-cache content-length: - - '548' + - '551' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:42 GMT + - Thu, 21 Oct 2021 03:30:50 GMT expires: - '-1' pragma: @@ -514,9 +514,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11998' + - '11997' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -534,12 +534,12 @@ interactions: ParameterSetName: - --domain-name --certificate --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2020-07-01 response: body: - string: '{"properties":{"thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' headers: cache-control: - no-cache @@ -548,7 +548,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:42 GMT + - Thu, 21 Oct 2021 03:30:50 GMT expires: - '-1' pragma: @@ -566,7 +566,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -589,9 +589,9 @@ interactions: ParameterSetName: - --domain-name --certificate --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"properties":{"thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","appName":"test-app","certName":"test-cert"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}' @@ -603,7 +603,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:43 GMT + - Thu, 21 Oct 2021 03:30:51 GMT expires: - '-1' pragma: @@ -621,9 +621,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1196' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -641,9 +641,9 @@ interactions: ParameterSetName: - --domain-name --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"properties":{"thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","appName":"test-app","certName":"test-cert"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}' @@ -655,7 +655,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:44 GMT + - Thu, 21 Oct 2021 03:30:52 GMT expires: - '-1' pragma: @@ -673,7 +673,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -693,9 +693,9 @@ interactions: ParameterSetName: - --domain-name --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '' @@ -705,7 +705,7 @@ interactions: content-length: - '0' date: - - Tue, 20 Jul 2021 05:05:45 GMT + - Thu, 21 Oct 2021 03:30:54 GMT expires: - '-1' pragma: @@ -721,7 +721,7 @@ interactions: x-ms-ratelimit-remaining-subscription-deletes: - '14999' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -739,21 +739,21 @@ interactions: ParameterSetName: - --domain-name --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: - string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-07-20T03:46:52.134Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: cache-control: - no-cache content-length: - - '548' + - '551' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:47 GMT + - Thu, 21 Oct 2021 03:30:57 GMT expires: - '-1' pragma: @@ -771,9 +771,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11999' + - '11998' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -791,9 +791,9 @@ interactions: ParameterSetName: - --domain-name --app -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"error":{"code":"EntityNotFound","message":"CustomDomain ''cli.asc-test.net'' @@ -806,7 +806,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:47 GMT + - Thu, 21 Oct 2021 03:30:57 GMT expires: - '-1' pragma: @@ -820,7 +820,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 404 message: Not Found @@ -838,21 +838,21 @@ interactions: ParameterSetName: - --name -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: - string: '{"properties":{"thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":false,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' headers: cache-control: - no-cache content-length: - - '623' + - '678' content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:48 GMT + - Thu, 21 Oct 2021 03:31:00 GMT expires: - '-1' pragma: @@ -870,7 +870,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -890,9 +890,9 @@ interactions: ParameterSetName: - --name -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '' @@ -902,7 +902,7 @@ interactions: content-length: - '0' date: - - Tue, 20 Jul 2021 05:05:49 GMT + - Thu, 21 Oct 2021 03:31:00 GMT expires: - '-1' pragma: @@ -918,7 +918,7 @@ interactions: x-ms-ratelimit-remaining-subscription-deletes: - '14999' x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 200 message: OK @@ -936,9 +936,9 @@ interactions: ParameterSetName: - --name -g -s User-Agent: - - AZURECLI/2.25.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2020-07-01 + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '{"error":{"code":"EntityNotFound","message":"Certificate ''test-cert'' @@ -951,7 +951,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 20 Jul 2021 05:05:50 GMT + - Thu, 21 Oct 2021 03:31:03 GMT expires: - '-1' pragma: @@ -965,7 +965,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 9c5dac43-ba50-4546-ade2-62b32c9e757c + - 2a353e89-73a9-4f4f-af75-66a74612521b status: code: 404 message: Not Found From dbf5e53787c53f59bbbc4adec48b41593393e2cd Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 21 Oct 2021 12:33:17 +0800 Subject: [PATCH 16/26] Update test records --- .../recordings/test_bind_cert_to_domain.yaml | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_bind_cert_to_domain.yaml b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_bind_cert_to_domain.yaml index ee66b22d26f..719614cb397 100644 --- a/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_bind_cert_to_domain.yaml +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_bind_cert_to_domain.yaml @@ -20,7 +20,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: PUT - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":false,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' @@ -72,7 +72,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":false,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' @@ -122,7 +122,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2021-09-01-preview response: body: string: '{"value":[{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":false,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}]}' @@ -172,7 +172,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' @@ -228,7 +228,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: PUT - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"properties":{"appName":"test-app"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}' @@ -280,7 +280,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' @@ -332,7 +332,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"properties":{"appName":"test-app"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}' @@ -382,7 +382,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' @@ -434,7 +434,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains?api-version=2020-07-01 response: body: string: '{"value":[{"properties":{"appName":"test-app"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}]}' @@ -484,7 +484,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' @@ -536,7 +536,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2020-07-01 response: body: string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' @@ -591,7 +591,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: PUT - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"properties":{"thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","appName":"test-app","certName":"test-cert"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}' @@ -643,7 +643,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"properties":{"thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","appName":"test-app","certName":"test-cert"},"type":"Microsoft.AppPlatform/Spring/apps/domains","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net","name":"cli.asc-test.net"}' @@ -695,7 +695,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: DELETE - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '' @@ -741,7 +741,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2020-07-01 response: body: string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' @@ -793,7 +793,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/domains/cli.asc-test.net?api-version=2020-07-01 response: body: string: '{"error":{"code":"EntityNotFound","message":"CustomDomain ''cli.asc-test.net'' @@ -840,7 +840,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":false,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' @@ -892,7 +892,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: DELETE - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '' @@ -938,7 +938,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '{"error":{"code":"EntityNotFound","message":"Certificate ''test-cert'' From 8161214adf9310915f6b30a24f365c0262f115d8 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 21 Oct 2021 13:20:46 +0800 Subject: [PATCH 17/26] fix linter issue --- src/spring-cloud/azext_spring_cloud/_help.py | 4 ++-- src/spring-cloud/azext_spring_cloud/_params.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/_help.py b/src/spring-cloud/azext_spring_cloud/_help.py index 8716e139a77..ddf76638232 100644 --- a/src/spring-cloud/azext_spring_cloud/_help.py +++ b/src/spring-cloud/azext_spring_cloud/_help.py @@ -377,12 +377,12 @@ short-summary: Update an Azure Cache for Redis service binding of the app. """ -helps['spring-cloud app append_loaded_public_certificate'] = """ +helps['spring-cloud app append-loaded-public-certificate'] = """ type: command short-summary: Append a new loaded public certificate to an app in the Azure Spring Cloud. examples: - name: Append a new loaded public certificate to an app. - text: az spring-cloud app append_loaded_public_certificate --name MyApp -service MyCluster --resource-group MyResourceGroup -–certificate-name MyCertName --load-trust-store true + text: az spring-cloud app append-loaded-public-certificate --name MyApp --service MyCluster --resource-group MyResourceGroup --certificate-name MyCertName --load-trust-store true """ helps['spring-cloud certificate'] = """ diff --git a/src/spring-cloud/azext_spring_cloud/_params.py b/src/spring-cloud/azext_spring_cloud/_params.py index 79648615990..0c34a2df32f 100644 --- a/src/spring-cloud/azext_spring_cloud/_params.py +++ b/src/spring-cloud/azext_spring_cloud/_params.py @@ -119,7 +119,7 @@ def load_arguments(self, _): help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') c.argument('instance_count', type=int, default=1, help='Number of instance.', validator=validate_instance_count) - c.argument('loaded_public_certificate_file', type=str, + c.argument('loaded_public_certificate_file', options_list=['--loaded-public-certificate-file', '-f'], type=str, help='A json file path indicates the certificates which would be loaded to app') with self.argument_context('spring-cloud app update') as c: @@ -128,7 +128,7 @@ def load_arguments(self, _): options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access app via https', default=False) c.argument('enable_end_to_end_tls', arg_type=get_three_state_flag(), help='If true, enable end to end tls') - c.argument('loaded_public_certificate_file', type=str, + c.argument('loaded_public_certificate_file', type=str, options_list=['--loaded-public-certificate-file', '-f'], help='A json file path indicates the certificates which would be loaded to app') for scope in ['spring-cloud app update', 'spring-cloud app start', 'spring-cloud app stop', 'spring-cloud app restart', 'spring-cloud app deploy', 'spring-cloud app scale', 'spring-cloud app set-deployment', 'spring-cloud app show-deploy-log']: @@ -295,8 +295,10 @@ def prepare_logs_argument(c): c.argument('vault_uri', help='The key vault uri where store the certificate') c.argument('vault_certificate_name', help='The certificate name in key vault') c.argument('only_public_certificate', arg_type=get_three_state_flag(), + options_list=['--only-public-certificate', '--only-public-cert'], help='If true, only import public certificate part from key vault.', default=False) - c.argument('public_certificate_file', help='A file path for the public certificate to be uploaded') + c.argument('public_certificate_file', options_list=['--public-certificate-file', '-f'], + help='A file path for the public certificate to be uploaded') with self.argument_context('spring-cloud certificate list') as c: c.argument('certificate_type', help='Type of uploaded certificate', From 6faefefe80eee1e2675df5ea955cf64cfadade0a Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 21 Oct 2021 14:00:41 +0800 Subject: [PATCH 18/26] Add test for new feature --- .../azext_spring_cloud/_params.py | 3 +- src/spring-cloud/azext_spring_cloud/custom.py | 8 +- .../test_load_public_cert_to_app.yaml | 577 ++++++++++++++++++ .../tests/latest/test_asc_scenario.py | 33 + 4 files changed, 615 insertions(+), 6 deletions(-) create mode 100644 src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml diff --git a/src/spring-cloud/azext_spring_cloud/_params.py b/src/spring-cloud/azext_spring_cloud/_params.py index 0c34a2df32f..8cef086810a 100644 --- a/src/spring-cloud/azext_spring_cloud/_params.py +++ b/src/spring-cloud/azext_spring_cloud/_params.py @@ -294,8 +294,7 @@ def prepare_logs_argument(c): with self.argument_context('spring-cloud certificate add') as c: c.argument('vault_uri', help='The key vault uri where store the certificate') c.argument('vault_certificate_name', help='The certificate name in key vault') - c.argument('only_public_certificate', arg_type=get_three_state_flag(), - options_list=['--only-public-certificate', '--only-public-cert'], + c.argument('only_public_cert', arg_type=get_three_state_flag(), help='If true, only import public certificate part from key vault.', default=False) c.argument('public_certificate_file', options_list=['--public-certificate-file', '-f'], help='A file path for the public certificate to be uploaded') diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index a7635bdfdce..73a99a525eb 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -1613,7 +1613,7 @@ def iter_lines(response, limit=2 ** 20): exceptions.append(e) -def certificate_add(cmd, client, resource_group, service, name, only_public_certificate=None, +def certificate_add(cmd, client, resource_group, service, name, only_public_cert=None, vault_uri=None, vault_certificate_name=None, public_certificate_file=None): if vault_uri is None and public_certificate_file is None: raise InvalidArgumentValueError("One of --vault-uri and --public-certificate-file should be provided") @@ -1624,13 +1624,13 @@ def certificate_add(cmd, client, resource_group, service, name, only_public_cert raise InvalidArgumentValueError("--vault-certificate-name should be provided for Key Vault Certificate") if vault_uri is not None: - if only_public_certificate is None: - only_public_certificate = False + if only_public_cert is None: + only_public_cert = False properties = models_20210901preview.KeyVaultCertificateProperties( type="KeyVaultCertificate", vault_uri=vault_uri, key_vault_cert_name=vault_certificate_name, - exclude_private_key=only_public_certificate + exclude_private_key=only_public_cert ) else: if os.path.exists(public_certificate_file): diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml new file mode 100644 index 00000000000..2ebe3592a81 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml @@ -0,0 +1,577 @@ +interactions: +- request: + body: '{"properties": {"type": "KeyVaultCertificate", "vaultUri": "https://integration-test-prod.vault.azure.net/", + "keyVaultCertName": "cli-unittest", "excludePrivateKey": true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate add + Connection: + - keep-alive + Content-Length: + - '172' + Content-Type: + - application/json + ParameterSetName: + - --name --vault-uri --vault-certificate-name --only-public-cert -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '677' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:04 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate show + Connection: + - keep-alive + ParameterSetName: + - --name -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '677' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:06 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate list + Connection: + - keep-alive + ParameterSetName: + - -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2021-09-01-preview + response: + body: + string: '{"value":[{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}]}' + headers: + cache-control: + - no-cache + content-length: + - '689' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:08 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app append-loaded-public-certificate + Connection: + - keep-alive + ParameterSetName: + - --name --certificate-name --load-trust-store -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + headers: + cache-control: + - no-cache + content-length: + - '577' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:12 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app append-loaded-public-certificate + Connection: + - keep-alive + ParameterSetName: + - --name --certificate-name --load-trust-store -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '677' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:12 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +- request: + body: '{"properties": {"public": false, "activeDeploymentName": "default", "fqdn": + "cli-unittest.azuremicroservices.io", "httpsOnly": false, "temporaryDisk": {"sizeInGB": + 5, "mountPath": "/tmp"}, "persistentDisk": {"sizeInGB": 0, "mountPath": "/persistent"}, + "enableEndToEndTLS": false, "loadedCertificates": [{"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert", + "loadTrustStore": true}]}, "location": "centralus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app append-loaded-public-certificate + Connection: + - keep-alive + Content-Length: + - '518' + Content-Type: + - application/json + ParameterSetName: + - --name --certificate-name --load-trust-store -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"public":false,"provisioningState":"Updating","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + headers: + azure-asyncoperation: + - https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912?api-version=2021-09-01-preview + cache-control: + - no-cache + content-length: + - '784' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:12 GMT + expires: + - '-1' + location: + - https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationResults/8419645e-3d95-4123-89cf-a18887fab912/Spring/test-app?api-version=2021-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1199' + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app append-loaded-public-certificate + Connection: + - keep-alive + ParameterSetName: + - --name --certificate-name --load-trust-store -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912?api-version=2021-09-01-preview + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912","name":"8419645e-3d95-4123-89cf-a18887fab912","status":"Succeeded","startTime":"2021-10-21T05:58:13.0691854Z","endTime":"2021-10-21T05:58:19.3402253Z"}' + headers: + cache-control: + - no-cache + content-length: + - '355' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:43 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app append-loaded-public-certificate + Connection: + - keep-alive + ParameterSetName: + - --name --certificate-name --load-trust-store -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + headers: + cache-control: + - no-cache + content-length: + - '785' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:43 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11998' + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app append-loaded-public-certificate + Connection: + - keep-alive + ParameterSetName: + - --name --certificate-name --load-trust-store -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + headers: + cache-control: + - no-cache + content-length: + - '785' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:45 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11997' + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate list-reference-app + Connection: + - keep-alive + ParameterSetName: + - --name -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps?api-version=2021-09-01-preview + response: + body: + string: '{"value":[{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}]}' + headers: + cache-control: + - no-cache + content-length: + - '797' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:48 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11996' + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate list-reference-app + Connection: + - keep-alive + ParameterSetName: + - --name -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '677' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:58:48 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - 2a353e89-73a9-4f4f-af75-66a74612521b + status: + code: 200 + message: OK +version: 1 diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py b/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py index 1a3ba0d6a89..e478a18fd17 100644 --- a/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py @@ -64,3 +64,36 @@ def test_bind_cert_to_domain(self): self.cmd('spring-cloud certificate remove --name {cert} -g {rg} -s {serviceName}') self.cmd('spring-cloud certificate show --name {cert} -g {rg} -s {serviceName}', expect_failure=True) + + +@record_only() +class SslTests(ScenarioTest): + + def test_load_public_cert_to_app(self): + self.kwargs.update({ + 'cert': 'test-cert', + 'keyVaultUri': 'https://integration-test-prod.vault.azure.net/', + 'KeyVaultCertName': 'cli-unittest', + 'app': 'test-app', + 'serviceName': 'cli-unittest', + 'rg': 'cli' + }) + + self.cmd( + 'spring-cloud certificate add --name {cert} --vault-uri {keyVaultUri} --vault-certificate-name {KeyVaultCertName} --only-public-cert true -g {rg} -s {serviceName}', + checks=[ + self.check('name', '{cert}') + ]) + + self.cmd('spring-cloud certificate show --name {cert} -g {rg} -s {serviceName}', checks=[ + self.check('name', '{cert}') + ]) + + cert_result = self.cmd('spring-cloud certificate list -g {rg} -s {serviceName}').get_output_in_json() + self.assertTrue(len(cert_result) > 0) + + self.cmd('spring-cloud app append-loaded-public-certificate --name {app} --certificate-name {cert} --load-trust-store true -g {rg} -s {serviceName}') + + app_result = self.cmd('spring-cloud certificate list-reference-app --name {cert} -g {rg} -s {serviceName}').get_output_in_json() + self.assertTrue(len(app_result) > 0) + From 2723794364210f4ebef69729d54498bfdb0b5c2a Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 21 Oct 2021 14:33:16 +0800 Subject: [PATCH 19/26] Add change log and upgrade version --- src/spring-cloud/HISTORY.md | 8 ++++++++ src/spring-cloud/setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/spring-cloud/HISTORY.md b/src/spring-cloud/HISTORY.md index 6c3918e0d36..8db86992fe6 100644 --- a/src/spring-cloud/HISTORY.md +++ b/src/spring-cloud/HISTORY.md @@ -1,5 +1,13 @@ Release History =============== + +2.11.1 +----- +* Add support for public certificate crud, source could be either key vault or local file +* Application could load public certificate by using argument`--loaded_public_certificate_file` in batch or + directly using `spring-cloud app append-loaded-public-certificate` one by one +* Add support to list all apps which have loaded the certificate `spring-cloud certificate list-reference-app` + 2.10.0 ----- * Support functions for Java In-Process Agent feature General Available. diff --git a/src/spring-cloud/setup.py b/src/spring-cloud/setup.py index aa3b8221870..5bcaf15aacf 100644 --- a/src/spring-cloud/setup.py +++ b/src/spring-cloud/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '2.10.0' +VERSION = '2.10.1' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From f7e6b7c50414a2674b3844e97b07d46c3cec92a8 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 21 Oct 2021 14:35:56 +0800 Subject: [PATCH 20/26] Update record file --- .../test_load_public_cert_to_app.yaml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml index 2ebe3592a81..dbfa0813941 100644 --- a/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml @@ -20,7 +20,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: PUT - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' @@ -72,7 +72,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' @@ -122,7 +122,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2021-09-01-preview response: body: string: '{"value":[{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}]}' @@ -172,7 +172,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview response: body: string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' @@ -224,7 +224,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' @@ -282,13 +282,13 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: PATCH - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview response: body: string: '{"properties":{"public":false,"provisioningState":"Updating","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: azure-asyncoperation: - - https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912?api-version=2021-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912?api-version=2021-09-01-preview cache-control: - no-cache content-length: @@ -300,7 +300,7 @@ interactions: expires: - '-1' location: - - https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationResults/8419645e-3d95-4123-89cf-a18887fab912/Spring/test-app?api-version=2021-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationResults/8419645e-3d95-4123-89cf-a18887fab912/Spring/test-app?api-version=2021-09-01-preview pragma: - no-cache request-context: @@ -334,7 +334,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912?api-version=2021-09-01-preview response: body: string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912","name":"8419645e-3d95-4123-89cf-a18887fab912","status":"Succeeded","startTime":"2021-10-21T05:58:13.0691854Z","endTime":"2021-10-21T05:58:19.3402253Z"}' @@ -384,7 +384,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview response: body: string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' @@ -436,7 +436,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview response: body: string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' @@ -488,7 +488,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps?api-version=2021-09-01-preview response: body: string: '{"value":[{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}]}' @@ -540,7 +540,7 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://centraluseuap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview response: body: string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' From 4d62702934e9430ba6ed23f95bf8c56a382af9be Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 21 Oct 2021 14:46:23 +0800 Subject: [PATCH 21/26] fix version error --- src/spring-cloud/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spring-cloud/setup.py b/src/spring-cloud/setup.py index 5bcaf15aacf..1083ba836af 100644 --- a/src/spring-cloud/setup.py +++ b/src/spring-cloud/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '2.10.1' +VERSION = '2.11.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From d9f1e3beff5da7f8fe64b2869d860de5dd9a215f Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 21 Oct 2021 16:59:05 +0800 Subject: [PATCH 22/26] fix according to comments --- src/spring-cloud/HISTORY.md | 2 +- .../azext_spring_cloud/commands.py | 2 +- src/spring-cloud/azext_spring_cloud/custom.py | 31 +++++++------------ 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/src/spring-cloud/HISTORY.md b/src/spring-cloud/HISTORY.md index 8db86992fe6..ec4511cc76c 100644 --- a/src/spring-cloud/HISTORY.md +++ b/src/spring-cloud/HISTORY.md @@ -4,7 +4,7 @@ Release History 2.11.1 ----- * Add support for public certificate crud, source could be either key vault or local file -* Application could load public certificate by using argument`--loaded_public_certificate_file` in batch or +* Application could load public certificate by using argument `--loaded_public_certificate_file` in batch or directly using `spring-cloud app append-loaded-public-certificate` one by one * Add support to list all apps which have loaded the certificate `spring-cloud certificate list-reference-app` diff --git a/src/spring-cloud/azext_spring_cloud/commands.py b/src/spring-cloud/azext_spring_cloud/commands.py index cd859f79374..dded3820619 100644 --- a/src/spring-cloud/azext_spring_cloud/commands.py +++ b/src/spring-cloud/azext_spring_cloud/commands.py @@ -50,7 +50,7 @@ def load_command_table(self, _): g.custom_command('repo update', 'config_repo_update') g.custom_command('repo list', 'config_repo_list') - with self.command_group('spring-cloud app', client_factory=cf_spring_cloud_20210601preview, + with self.command_group('spring-cloud app', client_factory=cf_spring_cloud_20210901preview, exception_handler=handle_asc_exception) as g: g.custom_command('create', 'app_create') g.custom_command('update', 'app_update') diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 73a99a525eb..eb8753a4c7a 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -26,9 +26,6 @@ from .vendored_sdks.appplatform.v2020_11_01_preview import ( AppPlatformManagementClient as AppPlatformManagementClient_20201101preview ) -from .vendored_sdks.appplatform.v2021_09_01_preview import ( - AppPlatformManagementClient as AppPlatformManagementClient_20210901preview -) from knack.log import get_logger from .azure_storage_file import FileService from azure.cli.core.azclierror import InvalidArgumentValueError, RequiredArgumentMissingError @@ -288,12 +285,12 @@ def app_create(cmd, client, resource_group, service, name, data = get_file_json(loaded_public_certificate_file) if data: if not data.get('loadedCertificates'): - raise CLIError("loadedCertificates must be provided in the json file") + raise FileOperationError("loadedCertificates must be provided in the json file") loaded_certificates = [] for item in data['loadedCertificates']: invalidProperties = not item.get('certificateName') or not item.get('loadTrustStore') if invalidProperties: - raise CLIError("certificateName, loadTrustStore must be provided in the json file") + raise FileOperationError("certificateName, loadTrustStore must be provided in the json file") certificate_resource = client.certificates.get(resource_group, service, item['certificateName']) loaded_certificates.append(models_20210901preview. LoadedCertificate(resource_id=certificate_resource.id, @@ -655,9 +652,7 @@ def app_tail_log(cmd, client, resource_group, service, name, test_keys = client.services.list_test_keys(resource_group, service) primary_key = test_keys.primary_key if not primary_key: - raise CLIError( - "To use the log streaming feature, please enable the test endpoint by running 'az spring-cloud test-endpoint enable -n {0} -g {1}'".format( - service, resource_group)) + raise CLIError("To use the log streaming feature, please enable the test endpoint by running 'az spring-cloud test-endpoint enable -n {0} -g {1}'".format(service, resource_group)) # https://primary:xxxx[key]@servicename.test.azuremicrosoervice.io -> servicename.azuremicroservice.io test_url = test_keys.primary_test_endpoint @@ -795,10 +790,8 @@ def app_unset_deployment(cmd, client, resource_group, service, name): def app_append_loaded_public_certificate(cmd, client, resource_group, service, name, certificate_name, load_trust_store): - client_0901_preview = get_mgmt_service_client(cmd.cli_ctx, AppPlatformManagementClient_20210901preview) - - app_resource = client_0901_preview.apps.get(resource_group, service, name) - certificate_resource = client_0901_preview.certificates.get(resource_group, service, certificate_name) + app_resource = client.apps.get(resource_group, service, name) + certificate_resource = client.certificates.get(resource_group, service, certificate_name) certificate_resource_id = certificate_resource.id loaded_certificates = [] @@ -808,7 +801,7 @@ def app_append_loaded_public_certificate(cmd, client, resource_group, service, n for loaded_certificate in loaded_certificates: if loaded_certificate.resource_id == certificate_resource.id: - raise CLIError("This certificate has already been loaded.") + raise ClientRequestError("This certificate has already been loaded.") loaded_certificates.append(models_20210901preview. LoadedCertificate(resource_id=certificate_resource_id, @@ -817,12 +810,12 @@ def app_append_loaded_public_certificate(cmd, client, resource_group, service, n app_resource.properties.loaded_certificates = loaded_certificates logger.warning("[1/1] updating app '{}'".format(name)) - poller = client_0901_preview.apps.begin_update( + poller = client.apps.begin_update( resource_group, service, name, app_resource) while poller.done() is False: sleep(APP_CREATE_OR_UPDATE_SLEEP_INTERVAL) - app_updated = client_0901_preview.apps.get(resource_group, service, name) + app_updated = client.apps.get(resource_group, service, name) return app_updated @@ -932,9 +925,7 @@ def validate_config_server_settings(client, resource_group, name, config_server_ try: result = sdk_no_wait(False, client.begin_validate, resource_group, name, config_server_settings).result() except Exception as err: # pylint: disable=broad-except - raise CLIError( - "{0}. You may raise a support ticket if needed by the following link: https://docs.microsoft.com/azure/spring-cloud/spring-cloud-faq?pivots=programming-language-java#how-can-i-provide-feedback-and-report-issues".format( - err)) + raise CLIError("{0}. You may raise a support ticket if needed by the following link: https://docs.microsoft.com/azure/spring-cloud/spring-cloud-faq?pivots=programming-language-java#how-can-i-provide-feedback-and-report-issues".format(err)) if not result.is_valid: for item in result.details or []: @@ -1639,9 +1630,9 @@ def certificate_add(cmd, client, resource_group, service, name, only_public_cert logger.debug("attempting to read file %s as binary", public_certificate_file) content = base64.b64encode(input_file.read()).decode("utf-8") except Exception: - raise CLIError('Failed to decode file {} - unknown decoding'.format(public_certificate_file)) + raise FileOperationError('Failed to decode file {} - unknown decoding'.format(public_certificate_file)) else: - raise CLIError("public_certificate_file %s could not be found", public_certificate_file) + raise FileOperationError("public_certificate_file %s could not be found", public_certificate_file) properties = models_20210901preview.ContentCertificateProperties( type="ContentCertificate", content=content From 91182080dccfb8cc0ed4d6187b7a1f22eadb6674 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 21 Oct 2021 17:09:38 +0800 Subject: [PATCH 23/26] Add missing error import --- src/spring-cloud/azext_spring_cloud/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index eb8753a4c7a..ddfe62a9449 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -28,7 +28,7 @@ ) from knack.log import get_logger from .azure_storage_file import FileService -from azure.cli.core.azclierror import InvalidArgumentValueError, RequiredArgumentMissingError +from azure.cli.core.azclierror import ClientRequestError, FileOperationError, InvalidArgumentValueError, RequiredArgumentMissingError from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.util import get_file_json, sdk_no_wait from azure.cli.core.profiles import ResourceType, get_sdk From 6525cdd79bb5ca30927e25e10d21aa0904722c7d Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 26 Oct 2021 12:58:05 +0800 Subject: [PATCH 24/26] Update to live test --- .../test_load_public_cert_to_app.yaml | 2491 ++++++++++++++++- .../tests/latest/test_asc_scenario.py | 59 +- 2 files changed, 2467 insertions(+), 83 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml index dbfa0813941..a032cf8dc85 100644 --- a/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/recordings/test_load_public_cert_to_app.yaml @@ -1,7 +1,1036 @@ interactions: - request: - body: '{"properties": {"type": "KeyVaultCertificate", "vaultUri": "https://integration-test-prod.vault.azure.net/", - "keyVaultCertName": "cli-unittest", "excludePrivateKey": true}}' + body: '{"location": "westus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - group create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - -n -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli","name":"cli","type":"Microsoft.Resources/resourceGroups","location":"westus","properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '203' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:43:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: '{"location": "westus", "properties": {}, "sku": {"name": "S0", "tier": + "STANDARD"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + Content-Length: + - '83' + Content-Type: + - application/json + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest?api-version=2020-07-01 + response: + body: + string: '{"properties":{"provisioningState":"Creating","version":3,"serviceId":"d764708db1d14a4db96444facb58de4c"},"type":"Microsoft.AppPlatform/Spring","sku":{"name":"S0","tier":"Standard"},"location":"westus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest","name":"cli-unittest"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + cache-control: + - no-cache + content-length: + - '366' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:43:55 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationResults/0e5aee0f-84d2-4124-9822-273f78f04a75/Spring/cli-unittest?api-version=2020-07-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1199' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:44:25 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:44:36 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:44:45 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:44:56 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:45:07 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:45:17 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:45:27 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:45:37 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:45:48 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:45:59 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:46:08 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:46:20 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Running","startTime":"2021-10-26T04:43:53.9268906Z"}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:46:30 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75?api-version=2020-07-01 + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/0e5aee0f-84d2-4124-9822-273f78f04a75","name":"0e5aee0f-84d2-4124-9822-273f78f04a75","status":"Succeeded","startTime":"2021-10-26T04:43:53.9268906Z","endTime":"2021-10-26T04:46:34.7973364Z"}' + headers: + cache-control: + - no-cache + content-length: + - '356' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:46:40 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest?api-version=2020-07-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","version":3,"serviceId":"d764708db1d14a4db96444facb58de4c","networkProfile":{"outboundIPs":{"publicIPs":["137.135.42.100","137.135.52.107"]}}},"type":"Microsoft.AppPlatform/Spring","sku":{"name":"S0","tier":"Standard"},"location":"westus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest","name":"cli-unittest"}' + headers: + cache-control: + - no-cache + content-length: + - '450' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:46:40 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11997' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "web", "properties": {"Application_Type": + "web"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + Content-Length: + - '80' + Content-Type: + - application/json + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-azure-mgmt-applicationinsights/1.0.0 Python/3.8.10 + (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.Insights/components/cli-unittest?api-version=2015-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/microsoft.insights/components/cli-unittest","name":"cli-unittest","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"150200f1-0000-0200-0000-617788380000\"","properties":{"Ver":"v2","ApplicationId":"cli-unittest","AppId":"2fc993eb-8441-458f-b530-aa578b51637d","Application_Type":"web","Flow_Type":null,"Request_Source":null,"InstrumentationKey":"a5003446-85bd-454b-aaa8-07fdc84d3eff","ConnectionString":"InstrumentationKey=a5003446-85bd-454b-aaa8-07fdc84d3eff;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/","Name":"cli-unittest","CreationDate":"2021-10-26T04:46:48.7934102+00:00","TenantId":"799c12ba-353c-44a1-883d-84808ebb2216","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"IngestionMode":"ApplicationInsights","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}' + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '984' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:46:50 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525 + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1193' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"traceEnabled": true, "appInsightsInstrumentationKey": + "InstrumentationKey=a5003446-85bd-454b-aaa8-07fdc84d3eff;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + Content-Length: + - '199' + Content-Type: + - application/json + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/monitoringSettings/default?api-version=2020-11-01-preview + response: + body: + string: '{"properties":{"appInsightsSamplingRate":10.0,"appInsightsAgentVersions":{"java":"3.1.1"},"provisioningState":"Updating","traceEnabled":true,"appInsightsInstrumentationKey":"InstrumentationKey=a5003446-85bd-454b-aaa8-07fdc84d3eff;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/"},"type":"Microsoft.AppPlatform/Spring/monitoringSettings","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/monitoringSettings/default","name":"default"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/c24874c9-17d6-4dee-9d51-4d7b58bc490d?api-version=2020-11-01-preview + cache-control: + - no-cache + content-length: + - '532' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:46:51 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationResults/c24874c9-17d6-4dee-9d51-4d7b58bc490d/Spring/cli-unittest?api-version=2020-11-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 202 + message: Accepted +- request: + body: '{"properties": {"type": "ContentCertificate", "content": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURyekNDQXBlZ0F3SUJBZ0lRQ0R2Z1ZwQkNSckdoZFdySldaSEhTakFOQmdrcWhraUc5dzBCQVFVRkFEQmgKTVFzd0NRWURWUVFHRXdKVlV6RVZNQk1HQTFVRUNoTU1SR2xuYVVObGNuUWdTVzVqTVJrd0Z3WURWUVFMRXhCMwpkM2N1WkdsbmFXTmxjblF1WTI5dE1TQXdIZ1lEVlFRREV4ZEVhV2RwUTJWeWRDQkhiRzlpWVd3Z1VtOXZkQ0JEClFUQWVGdzB3TmpFeE1UQXdNREF3TURCYUZ3MHpNVEV4TVRBd01EQXdNREJhTUdFeEN6QUpCZ05WQkFZVEFsVlQKTVJVd0V3WURWUVFLRXd4RWFXZHBRMlZ5ZENCSmJtTXhHVEFYQmdOVkJBc1RFSGQzZHk1a2FXZHBZMlZ5ZEM1agpiMjB4SURBZUJnTlZCQU1URjBScFoybERaWEowSUVkc2IySmhiQ0JTYjI5MElFTkJNSUlCSWpBTkJna3Foa2lHCjl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUE0anZoRVhMZXFLVFRvMWVxVUtLUEMzZVF5YUtsN2hMT2xsc0IKQ1NETUFaT25UakMzVS9kRHhHa0FWNTNpalNMZGh3WkFBSUVKenM0Ymc3L2Z6VHR4UnVMV1pzY0ZzM1luRm85NwpuaDZWZmU2M1NLTUkydGF2ZWd3NUJtVi9TbDBmdkJmNHE3N3VLTmQwZjNwNG1WbUZhRzVjSXpKTHYwN0E2RnB0CjQzQy9keEMvL0FIMmhkbW9SQkJZTXFsMUdOWFJvcjVINGlkcTlKb3orRWtJWUl2VVg3UTZoTCtocWtwTWZUN1AKVDE5c2RsNmdTemVSbnR3aTVtM09GQnFPYXN2K3piTVVaQmZIV3ltZU1yL3k3dnJUQzBMVXE3ZEJNdG9NMU8vNApnZFc3alZnL3RSdm9TU2lpY05veEJOMzNzaGJ5VEFwT0I2anRTajFldFgramtNT3ZKd0lEQVFBQm8yTXdZVEFPCkJnTlZIUThCQWY4RUJBTUNBWVl3RHdZRFZSMFRBUUgvQkFVd0F3RUIvekFkQmdOVkhRNEVGZ1FVQTk1UU5WYlIKVEx0bThLUGlHeHZEbDdJOTBWVXdId1lEVlIwakJCZ3dGb0FVQTk1UU5WYlJUTHRtOEtQaUd4dkRsN0k5MFZVdwpEUVlKS29aSWh2Y05BUUVGQlFBRGdnRUJBTXVjTjZwSUV4SUsrdDFFbkU5U3NQVGZyZ1QxZVhrSW95UVkvRXNyCmhNQXR1ZFhIL3ZUQkgxakx1RzJjZW5Ubm1DbXJFYlhqY0tDaHpVeUltWk9Na1hEaXF3OGN2cE9wLzJQVjVBZGcKMDZPL25Wc0o4ZFdPNDFQMGptUDZQNmZidEdiZlltYlcwVzVCamZJdHRlcDNTcCtkV09JcldjQkFJKzB0S0lKRgpQbmxVa2lhWTRJQklxRGZ2OE5aNVlCYmVyT2dPelc2c1JCYzRMMG5hNFVVK0tyazJVODg2VUFiM0x1akVWMGxzCllTRVkxUVN0ZUR3c09vQnJwK3V2RlJUcDJJbkJ1VGhzNHBGc2l2OWt1WGNsVnpEQUd5U2o0ZHpwMzBkOHRiUWsKQ0FVdzdDMjlDNzlGdjFDNXFmUHJtQUVTcmNpSXhwZzBYNDBLUE1icDFaV1ZiZDQ9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate add + Connection: + - keep-alive + Content-Length: + - '1845' + Content-Type: + - application/json + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"type":"ContentCertificate","thumbprint":"a8985d3a65e5e5c4b2d7d66d40c6dd2fb19c5436","issuer":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","expirationDate":"2031-11-10T00:00:00.000+00:00","activateDate":"2006-11-10T00:00:00.000+00:00","subjectName":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","name":"digi-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '594' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:46:55 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"type": "ContentCertificate", "content": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURkekNDQWwrZ0F3SUJBZ0lFQWdBQXVUQU5CZ2txaGtpRzl3MEJBUVVGQURCYU1Rc3dDUVlEVlFRR0V3SkoKUlRFU01CQUdBMVVFQ2hNSlFtRnNkR2x0YjNKbE1STXdFUVlEVlFRTEV3cERlV0psY2xSeWRYTjBNU0l3SUFZRApWUVFERXhsQ1lXeDBhVzF2Y21VZ1EzbGlaWEpVY25WemRDQlNiMjkwTUI0WERUQXdNRFV4TWpFNE5EWXdNRm9YCkRUSTFNRFV4TWpJek5Ua3dNRm93V2pFTE1Ba0dBMVVFQmhNQ1NVVXhFakFRQmdOVkJBb1RDVUpoYkhScGJXOXkKWlRFVE1CRUdBMVVFQ3hNS1EzbGlaWEpVY25WemRERWlNQ0FHQTFVRUF4TVpRbUZzZEdsdGIzSmxJRU41WW1WeQpWSEoxYzNRZ1VtOXZkRENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dFQkFLTUV1eUtyCm1EMVg2Q1p5bXJWNTFDbmk0ZWlWZ0xHdzQxdU9LeW1hWk4raFhlMndDUVZ0MnlndXptS2lZdjYwaU5vUzZ6anIKSVozQVFTc0JVbnVJZDlNY2o4ZTZ1WWkxYWdubmMrZ1JRS2ZSek1waWpTM2xqd3VtVU5Lb1VNTW82dldySlllSwptcFljcVdlNFB3elY5L2xTRXkvQ0c5VndjUENQd0JMS0JzdWE0ZG5LTTNwMzF2anN1ZkZvUkVKSUU5TEF3cVN1ClhtRCt0cVlGL0xUZEIxa0MxRmtZbUdQMXBXUGdrQXg5WGJJR2V2T0Y2dXZVQTY1ZWhENWYveFh0YWJ6NU9UWnkKZGM5M1VrM3p5WkFzdVQzbHlTTlRQeDhrbUNGY0I1a3B2Y1k2N09kdWhqcHJsM1JqTTcxb0dESHdlSTEydi95ZQpqbDBxaHFkTmtOd25HamtDQXdFQUFhTkZNRU13SFFZRFZSME9CQllFRk9XZFdUQ0NSMWpNclBvSVZEYUdlenExCkJFM3dNQklHQTFVZEV3RUIvd1FJTUFZQkFmOENBUU13RGdZRFZSMFBBUUgvQkFRREFnRUdNQTBHQ1NxR1NJYjMKRFFFQkJRVUFBNElCQVFDRkRGMk81RzlSYUVJRm9OMjdUeWNsaEFPOTkyVDlMZGN3NDZRUUYrdmFLU20yZVQ5Mgo5aGtUSTdnUUN2bFlwTlJoY0wwRVlXb1NpaGZWQ3IzRnZEQjgxdWtNSlkyR1FFL3N6S04rT01ZM0VVL3QzV2d4CmprelNzd0YwN3I1MVhnZElHbjl3L3haY2hNQjVoYmdGL1grK1pSR2pEOEFDdFBoU056a0UxYWt4ZWhpL29DcjAKRXBuM28wV0M0enhlOVoyZXRjaWVmQzdJcEo1T0NCUkxiZjF3YldzYVk3MWs1aCszenZEeW55NjdHN2Z5VUloegprc0xpNHhhTm1qSUNxNDRZM2VrUUVlNStOYXVRcno0d2xIclFNejJuWlEvMS9JNmVZczlIUkN3Qlhic2R0VExTClI5STRMdEQrZ2R3eWFoNjE3anpWL09lQkhSbkRKRUxxWXptcAotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCgo="}}' headers: Accept: - application/json @@ -11,28 +1040,1077 @@ interactions: - spring-cloud certificate add Connection: - keep-alive - Content-Length: - - '172' - Content-Type: - - application/json + Content-Length: + - '1745' + Content-Type: + - application/json + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"type":"ContentCertificate","thumbprint":"d4de20d05e66fc53fe1a50882c78db2852cae474","issuer":"Baltimore + CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE","expirationDate":"2025-05-12T23:59:00.000+00:00","activateDate":"2000-05-12T18:46:00.000+00:00","subjectName":"Baltimore + CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","name":"balti-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '582' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:46:58 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate show + Connection: + - keep-alive + ParameterSetName: + - --name -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"type":"ContentCertificate","thumbprint":"a8985d3a65e5e5c4b2d7d66d40c6dd2fb19c5436","issuer":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","expirationDate":"2031-11-10T00:00:00.000+00:00","activateDate":"2006-11-10T00:00:00.000+00:00","subjectName":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","name":"digi-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '594' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:00 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate show + Connection: + - keep-alive + ParameterSetName: + - --name -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"type":"ContentCertificate","thumbprint":"d4de20d05e66fc53fe1a50882c78db2852cae474","issuer":"Baltimore + CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE","expirationDate":"2025-05-12T23:59:00.000+00:00","activateDate":"2000-05-12T18:46:00.000+00:00","subjectName":"Baltimore + CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","name":"balti-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '582' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:04 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate list + Connection: + - keep-alive + ParameterSetName: + - -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2021-09-01-preview + response: + body: + string: '{"value":[{"properties":{"type":"ContentCertificate","thumbprint":"a8985d3a65e5e5c4b2d7d66d40c6dd2fb19c5436","issuer":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","expirationDate":"2031-11-10T00:00:00.000+00:00","activateDate":"2006-11-10T00:00:00.000+00:00","subjectName":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","name":"digi-cert"},{"properties":{"type":"ContentCertificate","thumbprint":"d4de20d05e66fc53fe1a50882c78db2852cae474","issuer":"Baltimore + CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE","expirationDate":"2025-05-12T23:59:00.000+00:00","activateDate":"2000-05-12T18:46:00.000+00:00","subjectName":"Baltimore + CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","name":"balti-cert"}]}' + headers: + cache-control: + - no-cache + content-length: + - '1189' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:06 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps?api-version=2021-09-01-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:09 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11998' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","version":3,"serviceId":"d764708db1d14a4db96444facb58de4c","networkProfile":{"outboundIPs":{"publicIPs":["137.135.42.100","137.135.52.107"]}}},"type":"Microsoft.AppPlatform/Spring","sku":{"name":"S0","tier":"Standard"},"location":"westus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest","name":"cli-unittest"}' + headers: + cache-control: + - no-cache + content-length: + - '450' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:10 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"type":"ContentCertificate","thumbprint":"d4de20d05e66fc53fe1a50882c78db2852cae474","issuer":"Baltimore + CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE","expirationDate":"2025-05-12T23:59:00.000+00:00","activateDate":"2000-05-12T18:46:00.000+00:00","subjectName":"Baltimore + CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","name":"balti-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '582' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:10 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"httpsOnly": false, "temporaryDisk": {"sizeInGB": 5, "mountPath": + "/tmp"}, "persistentDisk": {"sizeInGB": 0, "mountPath": "/persistent"}, "enableEndToEndTLS": + false, "loadedCertificates": [{"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert", + "loadTrustStore": true}]}, "location": "westus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + Content-Length: + - '418' + Content-Type: + - application/json + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"public":false,"provisioningState":"Creating","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/test-app/operationId/b7f7906c-4e5d-4bc8-b917-ebea95537023?api-version=2021-09-01-preview + cache-control: + - no-cache + content-length: + - '664' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:11 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationResults/b7f7906c-4e5d-4bc8-b917-ebea95537023/Spring/test-app?api-version=2021-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1199' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/c24874c9-17d6-4dee-9d51-4d7b58bc490d?api-version=2020-11-01-preview + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/c24874c9-17d6-4dee-9d51-4d7b58bc490d","name":"c24874c9-17d6-4dee-9d51-4d7b58bc490d","status":"Succeeded","startTime":"2021-10-26T04:46:52.2589859Z","endTime":"2021-10-26T04:46:59.4805245Z"}' + headers: + cache-control: + - no-cache + content-length: + - '356' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:22 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/monitoringSettings/default?api-version=2020-11-01-preview + response: + body: + string: '{"properties":{"appInsightsSamplingRate":10.0,"appInsightsAgentVersions":{"java":"3.1.1"},"provisioningState":"Succeeded","traceEnabled":true,"appInsightsInstrumentationKey":"InstrumentationKey=a5003446-85bd-454b-aaa8-07fdc84d3eff;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/"},"type":"Microsoft.AppPlatform/Spring/monitoringSettings","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/monitoringSettings/default","name":"default"}' + headers: + cache-control: + - no-cache + content-length: + - '533' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:22 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/test-app/operationId/b7f7906c-4e5d-4bc8-b917-ebea95537023?api-version=2021-09-01-preview + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/test-app/operationId/b7f7906c-4e5d-4bc8-b917-ebea95537023","name":"b7f7906c-4e5d-4bc8-b917-ebea95537023","status":"Succeeded","startTime":"2021-10-26T04:47:11.1295199Z","endTime":"2021-10-26T04:47:17.6389158Z"}' + headers: + cache-control: + - no-cache + content-length: + - '352' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:41 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + headers: + cache-control: + - no-cache + content-length: + - '750' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:41 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11997' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"source": {"type": "Jar", "relativePath": ""}, + "deploymentSettings": {"resourceRequests": {"cpu": "1", "memory": "1Gi"}}}, + "sku": {"name": "S0", "tier": "STANDARD", "capacity": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + Content-Length: + - '205' + Content-Type: + - application/json + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/deployments/mock-deployment?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"source":{"type":"Jar","relativePath":""},"appName":"test-app","deploymentSettings":{"cpu":1,"memoryInGB":1,"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"runtimeVersion":"Java_8"},"provisioningState":"Creating","status":"Running","active":false,"instances":null},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/deployments/default","name":"default"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8?api-version=2021-09-01-preview + cache-control: + - no-cache + content-length: + - '603' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:49 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationResults/61f377c1-8748-4c0a-b6a0-5dfc6706abb8/Spring/default?api-version=2021-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1199' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 201 + message: Created +- request: + body: '{"properties": {"public": false, "activeDeploymentName": "default", "httpsOnly": + false, "temporaryDisk": {"sizeInGB": 5, "mountPath": "/tmp"}, "persistentDisk": + {"sizeInGB": 0, "mountPath": "/persistent"}, "enableEndToEndTLS": false, "loadedCertificates": + [{"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert", + "loadTrustStore": true}]}, "location": "westus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + Content-Length: + - '470' + Content-Type: + - application/json + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"public":false,"provisioningState":"Updating","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/test-app/operationId/cd0e4264-592e-4245-9312-bbd5af507175?api-version=2021-09-01-preview + cache-control: + - no-cache + content-length: + - '782' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:47:50 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationResults/cd0e4264-592e-4245-9312-bbd5af507175/Spring/test-app?api-version=2021-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1198' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8?api-version=2021-09-01-preview + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8","name":"61f377c1-8748-4c0a-b6a0-5dfc6706abb8","status":"Running","startTime":"2021-10-26T04:47:49.4646312Z"}' + headers: + cache-control: + - no-cache + content-length: + - '308' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:48:19 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/test-app/operationId/cd0e4264-592e-4245-9312-bbd5af507175?api-version=2021-09-01-preview + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/test-app/operationId/cd0e4264-592e-4245-9312-bbd5af507175","name":"cd0e4264-592e-4245-9312-bbd5af507175","status":"Succeeded","startTime":"2021-10-26T04:47:50.5228054Z","endTime":"2021-10-26T04:47:59.6856692Z"}' + headers: + cache-control: + - no-cache + content-length: + - '352' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:48:21 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + headers: + cache-control: + - no-cache + content-length: + - '783' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:48:21 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11996' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8?api-version=2021-09-01-preview + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8","name":"61f377c1-8748-4c0a-b6a0-5dfc6706abb8","status":"Running","startTime":"2021-10-26T04:47:49.4646312Z"}' + headers: + cache-control: + - no-cache + content-length: + - '308' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:48:30 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8?api-version=2021-09-01-preview + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8","name":"61f377c1-8748-4c0a-b6a0-5dfc6706abb8","status":"Running","startTime":"2021-10-26T04:47:49.4646312Z"}' + headers: + cache-control: + - no-cache + content-length: + - '308' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:48:40 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8?api-version=2021-09-01-preview + response: + body: + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8","name":"61f377c1-8748-4c0a-b6a0-5dfc6706abb8","status":"Running","startTime":"2021-10-26T04:47:49.4646312Z"}' + headers: + cache-control: + - no-cache + content-length: + - '308' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:48:50 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive ParameterSetName: - - --name --vault-uri --vault-certificate-name --only-public-cert -g -s + - --name -f -g -s User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8?api-version=2021-09-01-preview response: body: - string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/default/operationId/61f377c1-8748-4c0a-b6a0-5dfc6706abb8","name":"61f377c1-8748-4c0a-b6a0-5dfc6706abb8","status":"Succeeded","startTime":"2021-10-26T04:47:49.4646312Z","endTime":"2021-10-26T04:48:52.2500319Z"}' headers: cache-control: - no-cache content-length: - - '677' + - '351' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:04 GMT + - Tue, 26 Oct 2021 04:49:01 GMT expires: - '-1' pragma: @@ -49,10 +2127,60 @@ interactions: - Accept-Encoding,Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud app create + Connection: + - keep-alive + ParameterSetName: + - --name -f -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/deployments/mock-deployment?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"source":{"type":"Jar","relativePath":""},"appName":"test-app","deploymentSettings":{"cpu":1,"memoryInGB":1,"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"runtimeVersion":"Java_8"},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-app-default-8-56c8b87cd6-kjpn4","status":"Running","discoveryStatus":"UP","startTime":"2021-10-26T04:47:57Z"}]},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/deployments/default","name":"default"}' + headers: + cache-control: + - no-cache + content-length: + - '724' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:49:01 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK @@ -64,27 +2192,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - spring-cloud certificate show + - spring-cloud app create Connection: - keep-alive ParameterSetName: - - --name -g -s + - --name -f -g -s User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/deployments/mock-deployment?api-version=2021-09-01-preview response: body: - string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + string: '{"properties":{"source":{"type":"Jar","relativePath":""},"appName":"test-app","deploymentSettings":{"cpu":1,"memoryInGB":1,"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"runtimeVersion":"Java_8"},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-app-default-8-56c8b87cd6-kjpn4","status":"Running","discoveryStatus":"UP","startTime":"2021-10-26T04:47:57Z"}]},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app/deployments/default","name":"default"}' headers: cache-control: - no-cache content-length: - - '677' + - '724' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:06 GMT + - Tue, 26 Oct 2021 04:49:06 GMT expires: - '-1' pragma: @@ -101,8 +2229,10 @@ interactions: - Accept-Encoding,Accept-Encoding x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11998' x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK @@ -114,27 +2244,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - spring-cloud certificate list + - spring-cloud app create Connection: - keep-alive ParameterSetName: - - -g -s + - --name -f -g -s User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview response: body: - string: '{"value":[{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}]}' + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: cache-control: - no-cache content-length: - - '689' + - '783' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:08 GMT + - Tue, 26 Oct 2021 04:49:06 GMT expires: - '-1' pragma: @@ -151,8 +2281,10 @@ interactions: - Accept-Encoding,Accept-Encoding x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11995' x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK @@ -175,16 +2307,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview response: body: - string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: cache-control: - no-cache content-length: - - '577' + - '783' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:12 GMT + - Tue, 26 Oct 2021 04:49:09 GMT expires: - '-1' pragma: @@ -202,9 +2334,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11999' + - '11991' x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK @@ -224,19 +2356,21 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert?api-version=2021-09-01-preview response: body: - string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + string: '{"properties":{"type":"ContentCertificate","thumbprint":"a8985d3a65e5e5c4b2d7d66d40c6dd2fb19c5436","issuer":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","expirationDate":"2031-11-10T00:00:00.000+00:00","activateDate":"2006-11-10T00:00:00.000+00:00","subjectName":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","name":"digi-cert"}' headers: cache-control: - no-cache content-length: - - '677' + - '594' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:12 GMT + - Tue, 26 Oct 2021 04:49:10 GMT expires: - '-1' pragma: @@ -254,7 +2388,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK @@ -262,8 +2396,9 @@ interactions: body: '{"properties": {"public": false, "activeDeploymentName": "default", "fqdn": "cli-unittest.azuremicroservices.io", "httpsOnly": false, "temporaryDisk": {"sizeInGB": 5, "mountPath": "/tmp"}, "persistentDisk": {"sizeInGB": 0, "mountPath": "/persistent"}, - "enableEndToEndTLS": false, "loadedCertificates": [{"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert", - "loadTrustStore": true}]}, "location": "centralus"}' + "enableEndToEndTLS": false, "loadedCertificates": [{"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert", + "loadTrustStore": true}, {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert", + "loadTrustStore": true}]}, "location": "westus"}' headers: Accept: - application/json @@ -274,7 +2409,7 @@ interactions: Connection: - keep-alive Content-Length: - - '518' + - '705' Content-Type: - application/json ParameterSetName: @@ -285,22 +2420,22 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview response: body: - string: '{"properties":{"public":false,"provisioningState":"Updating","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + string: '{"properties":{"public":false,"provisioningState":"Updating","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true},{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912?api-version=2021-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/test-app/operationId/6ff9a588-8ca5-4328-bc87-098410255cf6?api-version=2021-09-01-preview cache-control: - no-cache content-length: - - '784' + - '967' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:12 GMT + - Tue, 26 Oct 2021 04:49:10 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationResults/8419645e-3d95-4123-89cf-a18887fab912/Spring/test-app?api-version=2021-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationResults/6ff9a588-8ca5-4328-bc87-098410255cf6/Spring/test-app?api-version=2021-09-01-preview pragma: - no-cache request-context: @@ -312,9 +2447,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '1199' + - '1197' x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 202 message: Accepted @@ -334,19 +2469,19 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/test-app/operationId/6ff9a588-8ca5-4328-bc87-098410255cf6?api-version=2021-09-01-preview response: body: - string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralus/operationStatus/test-app/operationId/8419645e-3d95-4123-89cf-a18887fab912","name":"8419645e-3d95-4123-89cf-a18887fab912","status":"Succeeded","startTime":"2021-10-21T05:58:13.0691854Z","endTime":"2021-10-21T05:58:19.3402253Z"}' + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/test-app/operationId/6ff9a588-8ca5-4328-bc87-098410255cf6","name":"6ff9a588-8ca5-4328-bc87-098410255cf6","status":"Succeeded","startTime":"2021-10-26T04:49:11.1941502Z","endTime":"2021-10-26T04:49:17.7100335Z"}' headers: cache-control: - no-cache content-length: - - '355' + - '352' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:43 GMT + - Tue, 26 Oct 2021 04:49:41 GMT expires: - '-1' pragma: @@ -364,7 +2499,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK @@ -387,16 +2522,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview response: body: - string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true},{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: cache-control: - no-cache content-length: - - '785' + - '968' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:43 GMT + - Tue, 26 Oct 2021 04:49:41 GMT expires: - '-1' pragma: @@ -414,9 +2549,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11998' + - '11990' x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK @@ -439,16 +2574,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app?api-version=2021-09-01-preview response: body: - string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' + string: '{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true},{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}' headers: cache-control: - no-cache content-length: - - '785' + - '968' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:45 GMT + - Tue, 26 Oct 2021 04:49:43 GMT expires: - '-1' pragma: @@ -466,9 +2601,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11997' + - '11989' x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK @@ -491,16 +2626,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps?api-version=2021-09-01-preview response: body: - string: '{"value":[{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-21T03:05:36.403Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}]}' + string: '{"value":[{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true},{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}]}' headers: cache-control: - no-cache content-length: - - '797' + - '980' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:48 GMT + - Tue, 26 Oct 2021 04:49:45 GMT expires: - '-1' pragma: @@ -518,9 +2653,113 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11996' + - '11999' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate list-reference-app + Connection: + - keep-alive + ParameterSetName: + - --name -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"type":"ContentCertificate","thumbprint":"a8985d3a65e5e5c4b2d7d66d40c6dd2fb19c5436","issuer":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","expirationDate":"2031-11-10T00:00:00.000+00:00","activateDate":"2006-11-10T00:00:00.000+00:00","subjectName":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","name":"digi-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '594' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:49:47 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud certificate list-reference-app + Connection: + - keep-alive + ParameterSetName: + - --name -g -s + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps?api-version=2021-09-01-preview + response: + body: + string: '{"value":[{"properties":{"public":false,"provisioningState":"Succeeded","activeDeploymentName":"default","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"createdTime":"2021-10-26T04:47:17.606Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"loadedCertificates":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/balti-cert","loadTrustStore":true},{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","loadTrustStore":true}],"enableEndToEndTLS":false},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-app","name":"test-app"}]}' + headers: + cache-control: + - no-cache + content-length: + - '980' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:49:50 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11990' x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK @@ -540,19 +2779,123 @@ interactions: User-Agent: - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/1.0.0b1 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert?api-version=2021-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert?api-version=2021-09-01-preview + response: + body: + string: '{"properties":{"type":"ContentCertificate","thumbprint":"a8985d3a65e5e5c4b2d7d66d40c6dd2fb19c5436","issuer":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","expirationDate":"2031-11-10T00:00:00.000+00:00","activateDate":"2006-11-10T00:00:00.000+00:00","subjectName":"DigiCert + Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US","dnsNames":[]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/digi-cert","name":"digi-cert"}' + headers: + cache-control: + - no-cache + content-length: + - '594' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Oct 2021 04:49:50 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest?api-version=2020-07-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/704ca4fe-2723-4f4a-a09c-a3dc8f49f0c7?api-version=2020-07-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 26 Oct 2021 04:49:53 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationResults/704ca4fe-2723-4f4a-a09c-a3dc8f49f0c7/Spring/cli-unittest?api-version=2020-07-01 + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + server: + - nginx/1.17.7 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-rp-server-mvid: + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring-cloud delete + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.27.0 azsdk-python-mgmt-appplatform/6.1.0 Python/3.8.10 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/704ca4fe-2723-4f4a-a09c-a3dc8f49f0c7?api-version=2020-07-01 response: body: - string: '{"properties":{"vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"7fb4a84d12c042dcaf590a8d4a8d5c99","excludePrivateKey":true,"type":"KeyVaultCertificate","thumbprint":"e1c623ea873cdc6a80f8682e0949c654fe2151db","issuer":"*.asc-test.net","expirationDate":"2022-02-24T04:52:26.000+00:00","activateDate":"2021-02-24T04:42:26.000+00:00","subjectName":"*.asc-test.net","dnsNames":["cli.asc-test.net"]},"type":"Microsoft.AppPlatform/Spring/certificates","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates/test-cert","name":"test-cert"}' + string: '{"id":"subscriptions/799c12ba-353c-44a1-883d-84808ebb2216/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/westus/operationStatus/cli-unittest/operationId/704ca4fe-2723-4f4a-a09c-a3dc8f49f0c7","name":"704ca4fe-2723-4f4a-a09c-a3dc8f49f0c7","status":"Succeeded","startTime":"2021-10-26T04:49:53.7382474Z","endTime":"2021-10-26T04:50:12.1725741Z"}' headers: cache-control: - no-cache content-length: - - '677' + - '356' content-type: - application/json; charset=utf-8 date: - - Thu, 21 Oct 2021 05:58:48 GMT + - Tue, 26 Oct 2021 04:50:23 GMT expires: - '-1' pragma: @@ -570,7 +2913,7 @@ interactions: x-content-type-options: - nosniff x-rp-server-mvid: - - 2a353e89-73a9-4f4f-af75-66a74612521b + - c98d556d-0be2-4fd7-8a47-2c7368eb00a4 status: code: 200 message: OK diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py b/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py index e478a18fd17..7c8e9048577 100644 --- a/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py @@ -70,30 +70,71 @@ def test_bind_cert_to_domain(self): class SslTests(ScenarioTest): def test_load_public_cert_to_app(self): + + py_path = os.path.abspath(os.path.dirname(__file__)) + baltiCertPath = os.path.join(py_path, 'files/BaltimoreCyberTrustRoot.crt.pem') + digiCertPath = os.path.join(py_path, 'files/DigiCertGlobalRootCA.crt.pem') + loadCertPath = os.path.join(py_path, 'files/load_certificate.json') + self.kwargs.update({ 'cert': 'test-cert', 'keyVaultUri': 'https://integration-test-prod.vault.azure.net/', 'KeyVaultCertName': 'cli-unittest', + 'baltiCert': 'balti-cert', + 'digiCert': 'digi-cert', + 'baltiCertPath': baltiCertPath, + 'digiCertPath': digiCertPath, + 'loadCertPath': loadCertPath, 'app': 'test-app', 'serviceName': 'cli-unittest', - 'rg': 'cli' + 'rg': 'cli', + 'location': 'westus' }) + + subscription_id = self.get_subscription_id() + + self.cmd('group create -n {rg} -l {location}') + self.cmd('spring-cloud create -n {serviceName} -g {rg} -l {location}') + self.cmd( - 'spring-cloud certificate add --name {cert} --vault-uri {keyVaultUri} --vault-certificate-name {KeyVaultCertName} --only-public-cert true -g {rg} -s {serviceName}', + 'spring-cloud certificate add --name {digiCert} -f {digiCertPath} -g {rg} -s {serviceName}', checks=[ - self.check('name', '{cert}') + self.check('name', '{digiCert}') ]) - self.cmd('spring-cloud certificate show --name {cert} -g {rg} -s {serviceName}', checks=[ - self.check('name', '{cert}') + self.cmd( + 'spring-cloud certificate add --name {baltiCert} -f {baltiCertPath} -g {rg} -s {serviceName}', + checks=[ + self.check('name', '{baltiCert}') + ]) + + self.cmd( + 'spring-cloud certificate show --name {digiCert} -g {rg} -s {serviceName}', checks=[ + self.check('name', '{digiCert}') + ]) + + self.cmd( + 'spring-cloud certificate show --name {baltiCert} -g {rg} -s {serviceName}', checks=[ + self.check('name', '{baltiCert}') ]) - cert_result = self.cmd('spring-cloud certificate list -g {rg} -s {serviceName}').get_output_in_json() - self.assertTrue(len(cert_result) > 0) + cert_result = self.cmd( + 'spring-cloud certificate list -g {rg} -s {serviceName}').get_output_in_json() + self.assertTrue(len(cert_result) == 2) - self.cmd('spring-cloud app append-loaded-public-certificate --name {app} --certificate-name {cert} --load-trust-store true -g {rg} -s {serviceName}') + self.cmd( + 'spring-cloud app create --name {app} -f {loadCertPath} -g {rg} -s {serviceName}') + + self.cmd( + 'spring-cloud app append-loaded-public-certificate --name {app} --certificate-name {digiCert} --load-trust-store true -g {rg} -s {serviceName}') + + app_result = self.cmd( + 'spring-cloud certificate list-reference-app --name {digiCert} -g {rg} -s {serviceName}').get_output_in_json() + self.assertTrue(len(app_result) > 0) - app_result = self.cmd('spring-cloud certificate list-reference-app --name {cert} -g {rg} -s {serviceName}').get_output_in_json() + app_result = self.cmd( + 'spring-cloud certificate list-reference-app --name {digiCert} -g {rg} -s {serviceName}').get_output_in_json() self.assertTrue(len(app_result) > 0) + self.cmd('spring-cloud delete -n {serviceName} -g {rg}') \ No newline at end of file From d29fe5b304d53113659b9953e06fed4accadb9ce Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 26 Oct 2021 13:13:27 +0800 Subject: [PATCH 25/26] Add file to help test --- .../files/BaltimoreCyberTrustRoot.crt.pem | 22 +++++++++++++++++++ .../latest/files/DigiCertGlobalRootCA.crt.pem | 22 +++++++++++++++++++ .../tests/latest/files/load_certificate.json | 8 +++++++ 3 files changed, 52 insertions(+) create mode 100755 src/spring-cloud/azext_spring_cloud/tests/latest/files/BaltimoreCyberTrustRoot.crt.pem create mode 100755 src/spring-cloud/azext_spring_cloud/tests/latest/files/DigiCertGlobalRootCA.crt.pem create mode 100755 src/spring-cloud/azext_spring_cloud/tests/latest/files/load_certificate.json diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/files/BaltimoreCyberTrustRoot.crt.pem b/src/spring-cloud/azext_spring_cloud/tests/latest/files/BaltimoreCyberTrustRoot.crt.pem new file mode 100755 index 00000000000..2bd16ebd476 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/files/BaltimoreCyberTrustRoot.crt.pem @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ +RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD +VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX +DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y +ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy +VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr +mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr +IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK +mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu +XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy +dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye +jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1 +BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3 +DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92 +9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx +jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0 +Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz +ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS +R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp +-----END CERTIFICATE----- + diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/files/DigiCertGlobalRootCA.crt.pem b/src/spring-cloud/azext_spring_cloud/tests/latest/files/DigiCertGlobalRootCA.crt.pem new file mode 100755 index 00000000000..fd4341df266 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/files/DigiCertGlobalRootCA.crt.pem @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD +QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT +MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j +b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB +CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97 +nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt +43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P +T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4 +gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO +BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR +TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw +DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr +hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg +06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF +PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls +YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/files/load_certificate.json b/src/spring-cloud/azext_spring_cloud/tests/latest/files/load_certificate.json new file mode 100755 index 00000000000..8ee2f1643a2 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/files/load_certificate.json @@ -0,0 +1,8 @@ +{ + "loadedCertificates":[ + { + "certificateName": "balti-cert", + "loadTrustStore": true + } + ] +} \ No newline at end of file From 9615643c97e6fc6d40a6f07706f7e562e5aa2aab Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 26 Oct 2021 14:18:56 +0800 Subject: [PATCH 26/26] Remove record only --- .../azext_spring_cloud/tests/latest/test_asc_scenario.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py b/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py index 7c8e9048577..1292bb06aa2 100644 --- a/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py +++ b/src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py @@ -66,11 +66,9 @@ def test_bind_cert_to_domain(self): self.cmd('spring-cloud certificate show --name {cert} -g {rg} -s {serviceName}', expect_failure=True) -@record_only() class SslTests(ScenarioTest): def test_load_public_cert_to_app(self): - py_path = os.path.abspath(os.path.dirname(__file__)) baltiCertPath = os.path.join(py_path, 'files/BaltimoreCyberTrustRoot.crt.pem') digiCertPath = os.path.join(py_path, 'files/DigiCertGlobalRootCA.crt.pem') @@ -91,9 +89,6 @@ def test_load_public_cert_to_app(self): 'location': 'westus' }) - - subscription_id = self.get_subscription_id() - self.cmd('group create -n {rg} -l {location}') self.cmd('spring-cloud create -n {serviceName} -g {rg} -l {location}')