diff --git a/src/spring-cloud/HISTORY.md b/src/spring-cloud/HISTORY.md index 8b6721c8154..17417a9698b 100644 --- a/src/spring-cloud/HISTORY.md +++ b/src/spring-cloud/HISTORY.md @@ -1,5 +1,9 @@ Release History =============== +2.0.0 +----- +* Switch api-version from 2019-05-01-preview to 2020-07-01 + 1.2.0 ----- * Add support for sovereign cloud. diff --git a/src/spring-cloud/azext_spring_cloud/_client_factory.py b/src/spring-cloud/azext_spring_cloud/_client_factory.py index 77ce5e7669c..cf8d48518b1 100644 --- a/src/spring-cloud/azext_spring_cloud/_client_factory.py +++ b/src/spring-cloud/azext_spring_cloud/_client_factory.py @@ -32,6 +32,10 @@ def cf_bindings(cli_ctx, *_): return cf_spring_cloud(cli_ctx).bindings +def cf_config_servers(cli_ctx, *_): + return cf_spring_cloud(cli_ctx).config_servers + + def cf_certificates(cli_ctx, *_): return cf_spring_cloud(cli_ctx).certificates diff --git a/src/spring-cloud/azext_spring_cloud/_help.py b/src/spring-cloud/azext_spring_cloud/_help.py index 18f28aa8586..8156ab4446e 100644 --- a/src/spring-cloud/azext_spring_cloud/_help.py +++ b/src/spring-cloud/azext_spring_cloud/_help.py @@ -21,9 +21,9 @@ text: az spring-cloud create -n MyService -g MyResourceGroup -l westus --app-insights-key MyInstrumentationKey - name: Create a new Azure Spring Cloud with distributed tracing disabled. text: az spring-cloud create -n MyService -g MyResourceGroup --disable-distributed-tracing - - name: Create a new Azure Spring Cloud with VNet-inected via giving VNet name in current resource group + - name: Create a new Azure Spring Cloud with VNet-injected via giving VNet name in current resource group text: az spring-cloud create -n MyService -g MyResourceGroup --vnet MyVNet --app-subnet MyAppSubnet --service-runtime-subnet MyServiceRuntimeSubnet - - name: Create a new Azure Spring Cloud with VNet-inected via giving subnets resource ID + - name: Create a new Azure Spring Cloud with VNet-injected via giving subnets resource ID text: az spring-cloud create -n MyService -g MyResourceGroup --app-subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyVnetRg/providers/Microsoft.Network/VirtualNetworks/test-vnet/subnets/app --service-runtime-subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyVnetRg/providers/Microsoft.Network/VirtualNetworks/test-vnet/subnets/svc --reserved-cidr-range 10.0.0.0/16,10.1.0.0/16,10.2.0.1/16 """ @@ -284,22 +284,22 @@ helps['spring-cloud config-server git repo add'] = """ type: command - short-summary: Set add a new repositry of git property of Config Server. + short-summary: Add a new repository of git property of Config Server. """ helps['spring-cloud config-server git repo remove'] = """ type: command - short-summary: Remove an existing repositry of git property of Config Server. + short-summary: Remove an existing repository of git property of Config Server. """ helps['spring-cloud config-server git repo update'] = """ type: command - short-summary: Override an existing repositry of git property of Config Server, will totally override the old one. + short-summary: Override an existing repository of git property of Config Server, will totally override the old one. """ helps['spring-cloud config-server git repo list'] = """ type: command - short-summary: List all repositries of git property of Config Server. + short-summary: List all repositories of git property of Config Server. """ helps['spring-cloud app binding'] = """ diff --git a/src/spring-cloud/azext_spring_cloud/_params.py b/src/spring-cloud/azext_spring_cloud/_params.py index 5789d73f8f0..8a21fd6f296 100644 --- a/src/spring-cloud/azext_spring_cloud/_params.py +++ b/src/spring-cloud/azext_spring_cloud/_params.py @@ -10,7 +10,8 @@ from ._validators import (validate_env, validate_cosmos_type, validate_resource_id, validate_location, validate_name, validate_app_name, validate_deployment_name, validate_log_lines, validate_log_limit, validate_log_since, validate_sku, validate_jvm_options, - validate_vnet, validate_vnet_required_parameters, validate_node_resource_group) + validate_vnet, validate_vnet_required_parameters, validate_node_resource_group, + validate_tracing_parameters, validate_instance_count) from ._utils import ApiType from .vendored_sdks.appplatform.models import RuntimeVersion, TestKeyType @@ -36,7 +37,7 @@ def load_arguments(self, _): c.argument('sku', type=str, validator=validate_sku, help='Name of SKU, the value is "Basic" or "Standard"') c.argument('reserved_cidr_range', help='Comma-separated list of IP address ranges in CIDR format. The IP ranges are reserved to host underlying Azure Spring Cloud infrastructure, which should be 3 at least /16 unused IP ranges, must not overlap with any Subnet IP ranges.', validator=validate_vnet_required_parameters) c.argument('vnet', help='The name or ID of an existing Virtual Network into which to deploy the Spring Cloud instance.', validator=validate_vnet_required_parameters) - c.argument('app_subnet', help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Cloud app. Required when deploying into a Virtual Network.', validator=validate_vnet_required_parameters) + c.argument('app_subnet', help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Cloud app. Required when deploying into a Virtual Network. Smaller subnet sizes are supported, please refer: https://aka.ms/azure-spring-cloud-smaller-subnet-vnet-docs', validator=validate_vnet_required_parameters) c.argument('service_runtime_subnet', options_list=['--service-runtime-subnet', '--svc-subnet'], help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Cloud service runtime. Required when deploying into a Virtual Network.', validator=validate_vnet) c.argument('service_runtime_network_resource_group', options_list=['--service-runtime-network-resource-group', '--svc-nrg'], help='The resource group where all network resources for Azure Spring Cloud service runtime will be created in.', validator=validate_node_resource_group) c.argument('app_network_resource_group', options_list=['--app-network-resource-group', '--app-nrg'], help='The resource group where all network resources for apps will be created in.', validator=validate_node_resource_group) @@ -47,12 +48,15 @@ def load_arguments(self, _): for scope in ['spring-cloud create', 'spring-cloud update']: with self.argument_context(scope) as c: c.argument('app_insights_key', - help="Instrumentation key of the existing Application Insights to be added for the distributed tracing") + help="Instrumentation key of the existing Application Insights to be added for the distributed tracing", + validator=validate_tracing_parameters) c.argument('app_insights', - help="Name of the existing Application Insights in the same Resource Group. Or Resource ID of the existing Application Insights in a different Resource Group.") + help="Name of the existing Application Insights in the same Resource Group. Or Resource ID of the existing Application Insights in a different Resource Group.", + validator=validate_tracing_parameters) c.argument('disable_distributed_tracing', arg_type=get_three_state_flag(), - help="Disable distributed tracing, if not disabled and no existing Application Insights specified with --app-insights-key or --app-insights, will create a new Application Insights instance in the same resource group.") + help="Disable distributed tracing, if not disabled and no existing Application Insights specified with --app-insights-key or --app-insights, will create a new Application Insights instance in the same resource group.", + validator=validate_tracing_parameters) c.argument('tags', arg_type=tags_type) with self.argument_context('spring-cloud test-endpoint renew-key') as c: @@ -73,7 +77,7 @@ def load_arguments(self, _): c.argument('memory', type=int, default=1, help='Number of GB of memory per instance.') c.argument('instance_count', type=int, - default=1, help='Number of instance.') + default=1, help='Number of instance.', validator=validate_instance_count) with self.argument_context('spring-cloud app update') as c: c.argument('is_public', arg_type=get_three_state_flag(), help='If true, assign endpoint') @@ -124,7 +128,7 @@ def load_arguments(self, _): with self.argument_context('spring-cloud app scale') as c: c.argument('cpu', type=int, help='Number of virtual cpu cores per instance.') c.argument('memory', type=int, help='Number of GB of memory per instance.') - c.argument('instance_count', type=int, help='Number of instance.') + c.argument('instance_count', type=int, help='Number of instance.', validator=validate_instance_count) for scope in ['spring-cloud app deploy', 'spring-cloud app deployment create']: with self.argument_context(scope) as c: @@ -144,7 +148,7 @@ def load_arguments(self, _): action='store_true') c.argument('cpu', type=int, help='Number of virtual cpu cores per instance.') c.argument('memory', type=int, help='Number of GB of memory per instance.') - c.argument('instance_count', type=int, help='Number of instance.') + c.argument('instance_count', type=int, help='Number of instance.', validator=validate_instance_count) with self.argument_context('spring-cloud app deployment') as c: c.argument('app', app_name_type, help='Name of app.', @@ -207,7 +211,7 @@ def load_arguments(self, _): for scope in ['spring-cloud config-server git repo add', 'spring-cloud config-server git repo update', 'spring-cloud config-server git repo remove']: with self.argument_context(scope) as c: - c.argument('repo_name', help='Uri of the repo.') + c.argument('repo_name', help='Name of the repo.') for scope in ['spring-cloud config-server git repo add', 'spring-cloud config-server git repo update']: with self.argument_context(scope) as c: diff --git a/src/spring-cloud/azext_spring_cloud/_transformers.py b/src/spring-cloud/azext_spring_cloud/_transformers.py index c9ac8bbfb7b..bb0d8f8fb9e 100644 --- a/src/spring-cloud/azext_spring_cloud/_transformers.py +++ b/src/spring-cloud/azext_spring_cloud/_transformers.py @@ -32,7 +32,7 @@ def transform_app_table_output(result): if 'activeDeployment' in item['properties']: isStarted = item['properties']['activeDeployment']['properties']['status'].upper() == "RUNNING" - instance_count = item['properties']['activeDeployment']['properties']['deploymentSettings']['instanceCount'] + instance_count = item['properties']['activeDeployment']['sku']['capacity'] instances = item['properties']['activeDeployment']['properties']['instances'] if instances is None: instances = [] @@ -61,7 +61,7 @@ def transform_spring_cloud_deployment_output(result): for item in result: isStarted = item['properties']['status'].upper() == "RUNNING" - instance_count = item['properties']['deploymentSettings']['instanceCount'] + instance_count = item['sku']['capacity'] instances = item['properties']['instances'] if instances is None: instances = [] diff --git a/src/spring-cloud/azext_spring_cloud/_validators.py b/src/spring-cloud/azext_spring_cloud/_validators.py index 43613925959..2131bf62543 100644 --- a/src/spring-cloud/azext_spring_cloud/_validators.py +++ b/src/spring-cloud/azext_spring_cloud/_validators.py @@ -43,6 +43,12 @@ def validate_sku(namespace): raise CLIError("The pricing tier only accepts value [Basic, Standard]") +def validate_instance_count(namespace): + if namespace.instance_count is not None: + if namespace.instance_count < 1: + raise CLIError("--instance-count must be greater than 0") + + def validate_name(namespace): namespace.name = namespace.name.lower() matchObj = match(r'^[a-z][a-z0-9-]{2,30}[a-z0-9]$', namespace.name) @@ -145,6 +151,14 @@ def validate_jvm_options(namespace): namespace.jvm_options = namespace.jvm_options.strip('\'') +def validate_tracing_parameters(namespace): + if (namespace.app_insights or namespace.app_insights_key) and namespace.disable_distributed_tracing: + raise CLIError("Conflict detected: '--app-insights' or '--app-insights-key'" + "can not be set with '--disable-distributed-tracing'.") + if namespace.app_insights and namespace.app_insights_key: + raise CLIError("Conflict detected: '--app-insights' and '--app-insights-key' can not be set at the same time.") + + def validate_vnet(cmd, namespace): if not namespace.vnet and not namespace.app_subnet and \ not namespace.service_runtime_subnet and not namespace.reserved_cidr_range: @@ -206,14 +220,15 @@ def _validate_subnet(namespace, subnet): limit = 32 if subnet.id.lower() == namespace.app_subnet.lower(): name = 'app-subnet' - limit = 24 + limit = 28 elif subnet.id.lower() == namespace.service_runtime_subnet.lower(): name = 'service-runtime-subnet' limit = 28 else: return if subnet.route_table: - raise CLIError('--{} should not associate with any route table.'.format(name)) + raise CLIError('--{} with existing route table is not supported. Please remove route table from the subnet,' + ' or select another subnet.'.format(name)) if subnet.ip_configurations: raise CLIError('--{} should not have connected device.'.format(name)) address = ip_network(subnet.address_prefix, strict=False) diff --git a/src/spring-cloud/azext_spring_cloud/commands.py b/src/spring-cloud/azext_spring_cloud/commands.py index 690780f9a2b..ac5cfcf41df 100644 --- a/src/spring-cloud/azext_spring_cloud/commands.py +++ b/src/spring-cloud/azext_spring_cloud/commands.py @@ -1,103 +1,103 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -# pylint: disable=line-too-long -from ._client_factory import (cf_app_services, cf_spring_cloud, cf_bindings) -from ._transformers import (transform_spring_cloud_table_output, - transform_app_table_output, - transform_spring_cloud_deployment_output, - transform_spring_cloud_certificate_output, - transform_spring_cloud_custom_domain_output) - - -# pylint: disable=too-many-statements -def load_command_table(self, _): - with self.command_group('spring-cloud', client_factory=cf_app_services) as g: - g.custom_command('create', 'spring_cloud_create', supports_no_wait=True) - g.custom_command('update', 'spring_cloud_update', supports_no_wait=True) - g.custom_command('delete', 'spring_cloud_delete', supports_no_wait=True) - g.custom_command('list', 'spring_cloud_list', table_transformer=transform_spring_cloud_table_output) - g.custom_show_command('show', 'spring_cloud_get', table_transformer=transform_spring_cloud_table_output) - - with self.command_group('spring-cloud test-endpoint', client_factory=cf_spring_cloud) as g: - g.custom_command('enable ', 'enable_test_endpoint') - g.custom_show_command('disable ', 'disable_test_endpoint') - g.custom_command('renew-key', 'regenerate_keys') - g.custom_command('list', 'list_keys') - - with self.command_group('spring-cloud config-server', client_factory=cf_app_services) as g: - g.custom_command('set', 'config_set', supports_no_wait=True) - g.custom_command('clear', 'config_delete') - g.custom_show_command('show', 'config_get') - - with self.command_group('spring-cloud config-server git', client_factory=cf_app_services, - supports_local_cache=True) as g: - g.custom_command('set', 'config_git_set') - g.custom_command('repo add', 'config_repo_add') - g.custom_command('repo remove', 'config_repo_delete') - 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) as g: - g.custom_command('create', 'app_create') - g.custom_command('update', 'app_update') - g.custom_command('deploy', 'app_deploy', supports_no_wait=True) - g.custom_command('scale', 'app_scale', supports_no_wait=True) - g.custom_command('show-deploy-log', 'app_get_build_log') - g.custom_command('set-deployment', 'app_set_deployment', - supports_no_wait=True) - g.custom_command('delete', 'app_delete') - g.custom_command('list', 'app_list', - table_transformer=transform_app_table_output) - g.custom_show_command( - 'show', 'app_get', table_transformer=transform_app_table_output) - g.custom_command('start', 'app_start', supports_no_wait=True) - 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') - - with self.command_group('spring-cloud app identity', client_factory=cf_spring_cloud) as g: - g.custom_command('assign', 'app_identity_assign') - g.custom_command('remove', 'app_identity_remove') - g.custom_show_command('show', 'app_identity_show') - - with self.command_group('spring-cloud app log', client_factory=cf_spring_cloud, - deprecate_info=g.deprecate(redirect='az spring-cloud app logs', hide=True)) as g: - g.custom_command('tail', 'app_tail_log') - - with self.command_group('spring-cloud app deployment', client_factory=cf_spring_cloud) as g: - g.custom_command('create', 'deployment_create', supports_no_wait=True) - g.custom_command('list', 'deployment_list', - table_transformer=transform_spring_cloud_deployment_output) - g.custom_show_command( - 'show', 'deployment_get', table_transformer=transform_spring_cloud_deployment_output) - g.custom_command('delete', 'deployment_delete') - - with self.command_group('spring-cloud app binding', client_factory=cf_bindings) as g: - g.custom_command('list', 'binding_list') - g.custom_show_command('show', 'binding_get') - g.custom_command('cosmos add', 'binding_cosmos_add') - g.custom_command('cosmos update', 'binding_cosmos_update') - g.custom_command('mysql add', 'binding_mysql_add') - g.custom_command('mysql update', 'binding_mysql_update') - g.custom_command('redis add', 'binding_redis_add') - 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) as g: - g.custom_command('add', 'certificate_add') - 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') - - with self.command_group('spring-cloud app custom-domain', client_factory=cf_spring_cloud) as g: - g.custom_command('bind', 'domain_bind') - g.custom_show_command('show', 'domain_show', table_transformer=transform_spring_cloud_custom_domain_output) - g.custom_command('list', 'domain_list', table_transformer=transform_spring_cloud_custom_domain_output) - g.custom_command('update', 'domain_update') - g.custom_command('unbind', 'domain_unbind') - - with self.command_group('spring-cloud'): - pass +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +from ._client_factory import (cf_app_services, cf_spring_cloud, cf_bindings, cf_config_servers) +from ._transformers import (transform_spring_cloud_table_output, + transform_app_table_output, + transform_spring_cloud_deployment_output, + transform_spring_cloud_certificate_output, + transform_spring_cloud_custom_domain_output) + + +# pylint: disable=too-many-statements +def load_command_table(self, _): + with self.command_group('spring-cloud', client_factory=cf_app_services) as g: + g.custom_command('create', 'spring_cloud_create', supports_no_wait=True, client_factory=cf_spring_cloud) + g.custom_command('update', 'spring_cloud_update', supports_no_wait=True, client_factory=cf_spring_cloud) + g.custom_command('delete', 'spring_cloud_delete', supports_no_wait=True) + g.custom_command('list', 'spring_cloud_list', table_transformer=transform_spring_cloud_table_output) + g.custom_show_command('show', 'spring_cloud_get', table_transformer=transform_spring_cloud_table_output) + + with self.command_group('spring-cloud test-endpoint', client_factory=cf_spring_cloud) as g: + g.custom_command('enable ', 'enable_test_endpoint') + g.custom_show_command('disable ', 'disable_test_endpoint') + g.custom_command('renew-key', 'regenerate_keys') + g.custom_command('list', 'list_keys') + + with self.command_group('spring-cloud config-server', client_factory=cf_config_servers) as g: + g.custom_command('set', 'config_set', supports_no_wait=True) + g.custom_command('clear', 'config_delete') + g.custom_show_command('show', 'config_get') + + with self.command_group('spring-cloud config-server git', client_factory=cf_config_servers, + supports_local_cache=True) as g: + g.custom_command('set', 'config_git_set') + g.custom_command('repo add', 'config_repo_add') + g.custom_command('repo remove', 'config_repo_delete') + 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) as g: + g.custom_command('create', 'app_create') + g.custom_command('update', 'app_update') + g.custom_command('deploy', 'app_deploy', supports_no_wait=True) + g.custom_command('scale', 'app_scale', supports_no_wait=True) + g.custom_command('show-deploy-log', 'app_get_build_log') + g.custom_command('set-deployment', 'app_set_deployment', + supports_no_wait=True) + g.custom_command('delete', 'app_delete') + g.custom_command('list', 'app_list', + table_transformer=transform_app_table_output) + g.custom_show_command( + 'show', 'app_get', table_transformer=transform_app_table_output) + g.custom_command('start', 'app_start', supports_no_wait=True) + 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') + + with self.command_group('spring-cloud app identity', client_factory=cf_spring_cloud) as g: + g.custom_command('assign', 'app_identity_assign') + g.custom_command('remove', 'app_identity_remove') + g.custom_show_command('show', 'app_identity_show') + + with self.command_group('spring-cloud app log', client_factory=cf_spring_cloud, + deprecate_info=g.deprecate(redirect='az spring-cloud app logs', hide=True)) as g: + g.custom_command('tail', 'app_tail_log') + + with self.command_group('spring-cloud app deployment', client_factory=cf_spring_cloud) as g: + g.custom_command('create', 'deployment_create', supports_no_wait=True) + g.custom_command('list', 'deployment_list', + table_transformer=transform_spring_cloud_deployment_output) + g.custom_show_command( + 'show', 'deployment_get', table_transformer=transform_spring_cloud_deployment_output) + g.custom_command('delete', 'deployment_delete') + + with self.command_group('spring-cloud app binding', client_factory=cf_bindings) as g: + g.custom_command('list', 'binding_list') + g.custom_show_command('show', 'binding_get') + g.custom_command('cosmos add', 'binding_cosmos_add') + g.custom_command('cosmos update', 'binding_cosmos_update') + g.custom_command('mysql add', 'binding_mysql_add') + g.custom_command('mysql update', 'binding_mysql_update') + g.custom_command('redis add', 'binding_redis_add') + 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) as g: + g.custom_command('add', 'certificate_add') + 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') + + with self.command_group('spring-cloud app custom-domain', client_factory=cf_spring_cloud) as g: + g.custom_command('bind', 'domain_bind') + g.custom_show_command('show', 'domain_show', table_transformer=transform_spring_cloud_custom_domain_output) + g.custom_command('list', 'domain_list', table_transformer=transform_spring_cloud_custom_domain_output) + g.custom_command('update', 'domain_update') + g.custom_command('unbind', 'domain_unbind') + + with self.command_group('spring-cloud'): + pass diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index a0f25047090..95800358ab9 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -44,12 +44,11 @@ def spring_cloud_create(cmd, client, resource_group, name, location=None, app_insights_key=None, app_insights=None, vnet=None, service_runtime_subnet=None, app_subnet=None, reserved_cidr_range=None, service_runtime_network_resource_group=None, app_network_resource_group=None, - disable_distributed_tracing=None, sku=None, tags=None, no_wait=False): + disable_distributed_tracing=None, sku='Standard', tags=None, no_wait=False): rg_location = _get_rg_location(cmd.cli_ctx, resource_group) if location is None: location = rg_location properties = models.ClusterResourceProperties() - resource = models.ServiceResource(location=location, properties=properties) if service_runtime_subnet or app_subnet or reserved_cidr_range: properties.network_profile = models.NetworkProfile( @@ -60,16 +59,23 @@ def spring_cloud_create(cmd, client, resource_group, name, location=None, app_in service_runtime_network_resource_group=service_runtime_network_resource_group ) - if sku is None: - sku = "Standard" full_sku = models.Sku(name=_get_sku_name(sku), tier=sku) - check_tracing_parameters(app_insights_key, app_insights, disable_distributed_tracing) - update_tracing_config(cmd, resource_group, name, location, properties, - app_insights_key, app_insights, disable_distributed_tracing) - resource = models.ServiceResource(location=location, sku=full_sku, properties=properties, tags=tags) - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name=resource_group, service_name=name, resource=resource) + + poller = client.services.create_or_update( + resource_group, name, resource) + logger.warning(" - Creating Service ..") + while poller.done() is False: + sleep(5) + if disable_distributed_tracing is not True: + logger.warning("Start configure distributed tracing") + trace_properties = update_tracing_config(cmd, resource_group, name, location, app_insights_key, app_insights, + disable_distributed_tracing) + if trace_properties is not None: + sdk_no_wait(no_wait, client.monitoring_settings.update_put, + resource_group_name=resource_group, service_name=name, properties=trace_properties) + return poller def spring_cloud_update(cmd, client, resource_group, name, app_insights_key=None, app_insights=None, @@ -85,46 +91,47 @@ def spring_cloud_update(cmd, client, resource_group, name, app_insights_key=None updated_resource.sku = full_sku update_service_sku = True - resource = client.get(resource_group, name) + resource = client.services.get(resource_group, name) location = resource.location - resource_properties = resource.properties updated_resource_properties = models.ClusterResourceProperties() + trace_properties = client.monitoring_settings.get(resource_group, name).properties + trace_enabled = trace_properties.trace_enabled if trace_properties is not None else False - check_tracing_parameters(app_insights_key, app_insights, disable_distributed_tracing) app_insights_target_status = False - if app_insights is not None or app_insights_key is not None or disable_distributed_tracing is False: + if app_insights or app_insights_key or disable_distributed_tracing is False: app_insights_target_status = True - if resource_properties.trace.enabled is False: + if trace_enabled is False: update_app_insights = True - elif app_insights_key != resource_properties.trace.app_insight_instrumentation_key: + elif app_insights or (app_insights_key and app_insights_key != trace_properties.app_insights_instrumentation_key): update_app_insights = True elif disable_distributed_tracing is True: app_insights_target_status = False - if resource_properties.trace.enabled is True: + if trace_enabled is True: update_app_insights = True # update application insights if update_app_insights is True: if app_insights_target_status is False: - resource_properties.trace.enabled = app_insights_target_status - elif resource_properties.trace.app_insight_instrumentation_key is not None \ - and app_insights is None and app_insights_key is None: - resource_properties.trace.enabled = app_insights_target_status + trace_properties.trace_enabled = app_insights_target_status + elif trace_properties.app_insights_instrumentation_key and not app_insights and not app_insights_key: + trace_properties.trace_enabled = app_insights_target_status else: - update_tracing_config(cmd, resource_group, name, location, resource_properties, app_insights_key, - app_insights, disable_distributed_tracing) - updated_resource_properties.trace = resource_properties.trace + trace_properties = update_tracing_config(cmd, resource_group, name, location, + app_insights_key, app_insights, disable_distributed_tracing) + if trace_properties is not None: + sdk_no_wait(no_wait, client.monitoring_settings.update_put, + resource_group_name=resource_group, service_name=name, properties=trace_properties) # update service tags if tags is not None: updated_resource.tags = tags update_service_tags = True - if update_app_insights is False and update_service_tags is False and update_service_sku is False: + if update_service_tags is False and update_service_sku is False: return resource updated_resource.properties = updated_resource_properties - return sdk_no_wait(no_wait, client.update, + return sdk_no_wait(no_wait, client.services.update, resource_group_name=resource_group, service_name=name, resource=updated_resource) @@ -192,11 +199,12 @@ def app_create(cmd, client, resource_group, service, name, size_in_gb=5, mount_path="/tmp") resource = client.services.get(resource_group, service) - location = resource.location + + _validate_instance_count(resource.sku.tier, instance_count) app_resource = models.AppResource() app_resource.properties = properties - app_resource.location = location + app_resource.location = resource.location if assign_identity is True: app_resource.identity = models.ManagedIdentityProperties(type="systemassigned") @@ -208,7 +216,6 @@ def app_create(cmd, client, resource_group, service, name, deployment_settings = models.DeploymentSettings( cpu=cpu, memory_in_gb=memory, - instance_count=instance_count, environment_variables=env, jvm_options=jvm_options, net_core_main_entry_path=None, @@ -225,8 +232,9 @@ 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)) - poller = client.deployments.create_or_update( - resource_group, service, name, DEFAULT_DEPLOYMENT_NAME, properties) + poller = client.deployments.create_or_update(resource_group, service, name, DEFAULT_DEPLOYMENT_NAME, + properties=properties, + sku=models.Sku(name="S0", tier="STANDARD", capacity=instance_count)) logger.warning("[3/4] Setting default deployment to production") properties = models.AppResourceProperties( @@ -240,7 +248,7 @@ def app_create(cmd, client, resource_group, service, name, size_in_gb=0, mount_path="/persistent") app_resource.properties = properties - app_resource.location = location + app_resource.location = resource.location app_poller = client.apps.update(resource_group, service, name, app_resource) logger.warning( @@ -300,7 +308,6 @@ def app_update(cmd, client, resource_group, service, name, deployment_settings = models.DeploymentSettings( cpu=None, memory_in_gb=None, - instance_count=None, environment_variables=env, jvm_options=jvm_options, net_core_main_entry_path=main_entry, @@ -452,14 +459,18 @@ def app_scale(cmd, client, resource_group, service, name, resource_group, service, name).properties.active_deployment_name if deployment is None: raise CLIError(NO_PRODUCTION_DEPLOYMENT_ERROR) + + resource = client.services.get(resource_group, service) + _validate_instance_count(resource.sku.tier, instance_count) + deployment_settings = models.DeploymentSettings( cpu=cpu, - memory_in_gb=memory, - instance_count=instance_count,) + memory_in_gb=memory) properties = models.DeploymentResourceProperties( deployment_settings=deployment_settings) + sku = models.Sku(name="S0", tier="STANDARD", capacity=instance_count) return sdk_no_wait(no_wait, client.deployments.update, - resource_group, service, name, deployment, properties) + resource_group, service, name, deployment, properties=properties, sku=sku) def app_get_build_log(cmd, client, resource_group, service, name, deployment=None): @@ -633,15 +644,21 @@ def deployment_create(cmd, client, resource_group, service, app, name, if name in deployments: raise CLIError("Deployment " + name + " already exists") + resource = client.services.get(resource_group, service) + _validate_instance_count(resource.sku.tier, instance_count) + if not skip_clone_settings: active_deployment_name = client.apps.get( resource_group, service, app).properties.active_deployment_name + if not active_deployment_name: + raise CLIError("No production deployment found, use --skip-clone-settings to skip copying settings from " + "production deployment.") active_deployment = client.deployments.get( resource_group, service, app, active_deployment_name) if active_deployment: cpu = cpu or active_deployment.properties.deployment_settings.cpu memory = memory or active_deployment.properties.deployment_settings.memory_in_gb - instance_count = instance_count or active_deployment.properties.deployment_settings.instance_count + instance_count = instance_count or active_deployment.sku.capacity jvm_options = jvm_options or active_deployment.properties.deployment_settings.jvm_options env = env or active_deployment.properties.deployment_settings.environment_variables else: @@ -663,6 +680,19 @@ def deployment_create(cmd, client, resource_group, service, app, name, file_type) +def _validate_instance_count(sku, instance_count=None): + if instance_count is not None: + sku = sku.upper() + if sku == "STANDARD": + if instance_count > 500: + raise CLIError( + "Standard SKU can have at most 500 app instances in total, but got '{}'".format(instance_count)) + if sku == "BASIC": + if instance_count > 25: + raise CLIError( + "Basic SKU can have at most 25 app instances in total, but got '{}'".format(instance_count)) + + def deployment_list(cmd, client, resource_group, service, app): return client.deployments.list(resource_group, service, app) @@ -676,6 +706,35 @@ def deployment_delete(cmd, client, resource_group, service, app, name): return client.deployments.delete(resource_group, service, app, name) +def is_valid_git_uri(uri): + return uri.startswith("https://") or uri.startswith("git@") + + +def validate_config_server_settings(client, resource_group, name, git_property): + error_msg = "Git URI should start with \"https://\" or \"git@\"" + if git_property: + if not is_valid_git_uri(git_property.uri): + raise CLIError(error_msg) + if git_property.repositories: + for repository in git_property.repositories: + if not is_valid_git_uri(repository.uri): + raise CLIError(error_msg) + + try: + result = sdk_no_wait(False, client.validate, resource_group, name, git_property).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)) + + if not result.is_valid: + for item in result.details or []: + if not item.name: + logger.error("Default repository with URI \"%s\" meets error:", item.uri) + else: + logger.error("Repository named \"%s\" with URI \"%s\" meets error:", item.name, item.uri) + logger.error("\n".join(item.messages)) + raise CLIError("Config Server settings contain error.") + + def config_set(cmd, client, resource_group, name, config_file, no_wait=False): def standardization(dic): new_dic = {} @@ -713,36 +772,27 @@ def standardization(dic): del config_property['repos'] config_property['repositories'] = repositories - git_property = client._deserialize( - 'ConfigServerGitProperty', config_property) - config_server_settings = models.ConfigServerSettings( - git_property=git_property) - config_server_properties = models.ConfigServerProperties( - config_server=config_server_settings) - cluster_esource_properties = models.ClusterResourceProperties( - config_server_properties=config_server_properties) - service_resource = models.ServiceResource( - properties=cluster_esource_properties) - return sdk_no_wait(no_wait, client.update, - resource_group, name, service_resource) + git_property = client._deserialize('ConfigServerGitProperty', config_property) + config_server_settings = models.ConfigServerSettings(git_property=git_property) + config_server_properties = models.ConfigServerProperties(config_server=config_server_settings) + + logger.warning("[1/2] Validating config server settings") + validate_config_server_settings(client, resource_group, name, git_property) + logger.warning("[2/2] Updating config server settings, (this operation can take a while to complete)") + return sdk_no_wait(no_wait, client.update_put, resource_group, name, config_server_properties) def config_get(cmd, client, resource_group, name): - resource = client.get(resource_group, name) - config_server = resource.properties.config_server_properties.config_server - if not config_server: + config_server_resource = client.get(resource_group, name) + + if not config_server_resource.properties.config_server: raise CLIError("Config server not set.") - return config_server.git_property + return config_server_resource def config_delete(cmd, client, resource_group, name): - config_server_properties = models.ConfigServerProperties( - config_server=models.ConfigServerSettings()) - properties = models.ClusterResourceProperties( - config_server_properties=config_server_properties) - appResource = models.ServiceResource(properties=properties) - - return client.update(resource_group, name, appResource) + config_server_properties = models.ConfigServerProperties() + return client.update_put(resource_group, name, config_server_properties) def config_git_set(cmd, client, resource_group, name, uri, @@ -754,33 +804,27 @@ def config_git_set(cmd, client, resource_group, name, uri, host_key_algorithm=None, private_key=None, strict_host_key_checking=None): - resource = client.get(resource_group, name) - config_server = resource.properties.config_server_properties.config_server - config = models.ConfigServerGitProperty( - uri=uri) if not config_server else config_server.git_property + git_property = models.ConfigServerGitProperty(uri=uri) if search_paths: search_paths = search_paths.split(",") - config.uri = uri - config.label = label - config.search_paths = search_paths - config.username = username - config.password = password - config.host_key = host_key - config.host_key_algorithm = host_key_algorithm - config.private_key = private_key - config.strict_host_key_checking = strict_host_key_checking - - config_server = models.ConfigServerSettings(git_property=config) - config_server_properties = models.ConfigServerProperties( - config_server=config_server) - cluster_esource_properties = models.ClusterResourceProperties( - config_server_properties=config_server_properties) - service_resource = models.ServiceResource( - properties=cluster_esource_properties) + git_property.label = label + git_property.search_paths = search_paths + git_property.username = username + git_property.password = password + git_property.host_key = host_key + git_property.host_key_algorithm = host_key_algorithm + git_property.private_key = private_key + git_property.strict_host_key_checking = strict_host_key_checking + + config_server_settings = models.ConfigServerSettings(git_property=git_property) + config_server_properties = models.ConfigServerProperties(config_server=config_server_settings) - return cached_put(cmd, client.update, service_resource, resource_group, name).result() + logger.warning("[1/2] Validating config server settings") + validate_config_server_settings(client, resource_group, name, git_property) + logger.warning("[2/2] Updating config server settings, (this operation can take a while to complete)") + return cached_put(cmd, client.update_put, config_server_properties, resource_group, name).result() def config_repo_add(cmd, client, resource_group, name, uri, repo_name, @@ -793,24 +837,27 @@ def config_repo_add(cmd, client, resource_group, name, uri, repo_name, host_key_algorithm=None, private_key=None, strict_host_key_checking=None): - resource = client.get(resource_group, name) - config_server = resource.properties.config_server_properties.config_server - config = models.ConfigServerGitProperty( - uri=uri) if not config_server else config_server.git_property + config_server_resource = client.get(resource_group, name) + config_server = config_server_resource.properties.config_server + git_property = models.ConfigServerGitProperty(uri=uri) if not config_server else config_server.git_property if search_paths: search_paths = search_paths.split(",") - if config.repositories: - repos = [repo for repo in config.repositories if repo.name == repo_name] + if pattern: + pattern = pattern.split(",") + + if git_property.repositories: + repos = [repo for repo in git_property.repositories if repo.name == repo_name] if repos: - raise CLIError("Repo '{}' already exiests.".format(repo_name)) + raise CLIError("Repo '{}' already exists.".format(repo_name)) else: - config.repositories = [] + git_property.repositories = [] repository = models.GitPatternRepository( uri=uri, name=repo_name, + pattern=pattern, label=label, search_paths=search_paths, username=username, @@ -820,40 +867,38 @@ def config_repo_add(cmd, client, resource_group, name, uri, repo_name, private_key=private_key, strict_host_key_checking=strict_host_key_checking) - config.repositories.append(repository) - config_server_settings = models.ConfigServerSettings(git_property=config) + git_property.repositories.append(repository) + config_server_settings = models.ConfigServerSettings(git_property=git_property) config_server_properties = models.ConfigServerProperties( config_server=config_server_settings) - cluster_resource_properties = models.ClusterResourceProperties( - config_server_properties=config_server_properties) - service_resource = models.ServiceResource( - properties=cluster_resource_properties) - return cached_put(cmd, client.update, service_resource, resource_group, name).result() + + logger.warning("[1/2] Validating config server settings") + validate_config_server_settings(client, resource_group, name, git_property) + logger.warning("[2/2] Adding config server settings repo, (this operation can take a while to complete)") + return cached_put(cmd, client.update_patch, config_server_properties, resource_group, name).result() def config_repo_delete(cmd, client, resource_group, name, repo_name): - resource = client.get(resource_group, name) - config_server = resource.properties.config_server_properties.config_server - if not config_server or not config_server.config or not config_server.config.repositories: + config_server_resource = client.get(resource_group, name) + config_server = config_server_resource.properties.config_server + if not config_server or not config_server.git_property or not config_server.git_property.repositories: raise CLIError("Repo '{}' not found.".format(repo_name)) - config = config_server.git_property - repository = [ - repo for repo in config.repositories if repo.name == repo_name] + git_property = config_server.git_property + repository = [repo for repo in git_property.repositories if repo.name == repo_name] if not repository: raise CLIError("Repo '{}' not found.".format(repo_name)) - config.repositories.remove(repository[0]) + git_property.repositories.remove(repository[0]) - config_server_settings = models.ConfigServerSettings(git_property=config) + config_server_settings = models.ConfigServerSettings(git_property=git_property) config_server_properties = models.ConfigServerProperties( config_server=config_server_settings) - cluster_esource_properties = models.ClusterResourceProperties( - config_server_properties=config_server_properties) - service_resource = models.ServiceResource( - properties=cluster_esource_properties) - return cached_put(cmd, client.update, service_resource, resource_group, name).result() + logger.warning("[1/2] Validating config server settings") + validate_config_server_settings(client, resource_group, name, git_property) + logger.warning("[2/2] Deleting config server settings repo, (this operation can take a while to complete)") + return cached_put(cmd, client.update_patch, config_server_properties, resource_group, name).result() def config_repo_update(cmd, client, resource_group, name, repo_name, @@ -867,13 +912,12 @@ def config_repo_update(cmd, client, resource_group, name, repo_name, host_key_algorithm=None, private_key=None, strict_host_key_checking=None): - resource = client.get(resource_group, name) - config_server = resource.properties.config_server_properties.config_server + config_server_resource = client.get(resource_group, name) + config_server = config_server_resource.properties.config_server if not config_server or not config_server.git_property or not config_server.git_property.repositories: raise CLIError("Repo '{}' not found.".format(repo_name)) - config = config_server.git_property - repository = [ - repo for repo in config.repositories if repo.name == repo_name] + git_property = config_server.git_property + repository = [repo for repo in git_property.repositories if repo.name == repo_name] if not repository: raise CLIError("Repo '{}' not found.".format(repo_name)) @@ -883,33 +927,39 @@ def config_repo_update(cmd, client, resource_group, name, repo_name, if pattern: pattern = pattern.split(",") - repository = repository[0] - repository = models.GitPatternRepository() - repository.uri = uri or repository.uri - repository.label = label or repository.label - repository.search_paths = search_paths or repository.search_paths - repository.username = username or repository.username - repository.password = password or repository.password - repository.host_key = host_key or repository.host_key - repository.host_key_algorithm = host_key_algorithm or repository.host_key_algorithm - repository.private_key = private_key or repository.private_key - repository.strict_host_key_checking = strict_host_key_checking or repository.strict_host_key_checking - - config_server_settings = models.ConfigServerSettings(git_property=config) - config_server_properties = models.ConfigServerProperties( - config_server=config_server_settings) - cluster_esource_properties = models.ClusterResourceProperties( - config_server_properties=config_server_properties) - service_resource = models.ServiceResource( - properties=cluster_esource_properties) + old_repository = repository[0] + git_property.repositories.remove(old_repository) + + repository = models.GitPatternRepository(name=old_repository.name, uri=uri or old_repository.uri) + repository.pattern = pattern or old_repository.pattern + repository.label = label or old_repository.label + repository.search_paths = search_paths or old_repository.search_paths + repository.username = username or old_repository.username + repository.password = password or old_repository.password + repository.host_key = host_key or old_repository.host_key + repository.host_key_algorithm = host_key_algorithm or old_repository.host_key_algorithm + repository.private_key = private_key or old_repository.private_key + repository.strict_host_key_checking = strict_host_key_checking or old_repository.strict_host_key_checking + + git_property.repositories.append(repository) - return cached_put(cmd, client.update, service_resource, resource_group, name).result() + config_server_settings = models.ConfigServerSettings(git_property=git_property) + config_server_properties = models.ConfigServerProperties(config_server=config_server_settings) + + logger.warning("[1/2] Validating config server settings") + validate_config_server_settings(client, resource_group, name, git_property) + logger.warning("[2/2] Updating config server settings repo, (this operation can take a while to complete)") + return cached_put(cmd, client.update_patch, config_server_properties, resource_group, name).result() def config_repo_list(cmd, client, resource_group, name): - resource = client.get(resource_group, name) - config = resource.properties.config_server_properties.config_server.git_property - return config.repositories + config_server_resource = client.get(resource_group, name) + config_server = config_server_resource.properties.config_server + + if not config_server or not config_server.git_property or not config_server.git_property.repositories: + raise CLIError("Repos not found.") + + return config_server.git_property.repositories def binding_list(cmd, client, resource_group, service, app): @@ -1158,8 +1208,8 @@ def _app_deploy(client, resource_group, service, app, name, version, path, runti environment_variables=env, jvm_options=jvm_options, net_core_main_entry_path=main_entry, - runtime_version=runtime_version, - instance_count=instance_count,) + runtime_version=runtime_version) + sku = models.Sku(name="S0", tier="STANDARD", capacity=instance_count) user_source_info = models.UserSourceInfo( version=version, relative_path=relative_path, @@ -1212,10 +1262,10 @@ def get_logs_loop(): "[3/3] Updating deployment in app '{}' (this operation can take a while to complete)".format(app)) if update: return sdk_no_wait(no_wait, client.deployments.update, - resource_group, service, app, name, properties) + resource_group, service, app, name, properties=properties, sku=sku) return sdk_no_wait(no_wait, client.deployments.create_or_update, - resource_group, service, app, name, properties) + resource_group, service, app, name, properties=properties, sku=sku) def _get_app_log(url, user_name, password, exceptions): @@ -1302,44 +1352,40 @@ def get_app_insights_key(cli_ctx, resource_group, name): return appinsights.instrumentation_key -def check_tracing_parameters(app_insights_key, app_insights, disable_distributed_tracing): - if (app_insights is not None or app_insights_key is not None) and disable_distributed_tracing is True: - raise CLIError("Conflict detected: '--app-insights' or '--app-insights-key' can not be set with '--disable-distributed-tracing true'.") - if app_insights is not None and app_insights_key is not None: - raise CLIError("Conflict detected: '--app-insights' and '--app-insights-key' can not be set at the same time.") - - -def update_tracing_config(cmd, resource_group, service_name, location, resource_properties, app_insights_key, +def update_tracing_config(cmd, resource_group, service_name, location, app_insights_key, app_insights, disable_distributed_tracing): create_app_insights = False - - if app_insights_key is not None: - resource_properties.trace = models.TraceProperties( - enabled=True, app_insight_instrumentation_key=app_insights_key) - elif app_insights is not None: + trace_properties = None + if app_insights_key: + trace_properties = models.MonitoringSettingProperties( + trace_enabled=True, app_insights_instrumentation_key=app_insights_key) + elif app_insights: if is_valid_resource_id(app_insights): resource_id_dict = parse_resource_id(app_insights) instrumentation_key = get_app_insights_key(cmd.cli_ctx, resource_id_dict['resource_group'], resource_id_dict['resource_name']) - resource_properties.trace = models.TraceProperties( - enabled=True, app_insight_instrumentation_key=instrumentation_key) + trace_properties = models.MonitoringSettingProperties( + trace_enabled=True, app_insights_instrumentation_key=instrumentation_key) else: instrumentation_key = get_app_insights_key(cmd.cli_ctx, resource_group, app_insights) - resource_properties.trace = models.TraceProperties( - enabled=True, app_insight_instrumentation_key=instrumentation_key) + trace_properties = models.MonitoringSettingProperties( + trace_enabled=True, app_insights_instrumentation_key=instrumentation_key) elif disable_distributed_tracing is not True: create_app_insights = True if create_app_insights is True: try: instrumentation_key = try_create_application_insights(cmd, resource_group, service_name, location) - if instrumentation_key is not None: - resource_properties.trace = models.TraceProperties( - enabled=True, app_insight_instrumentation_key=instrumentation_key) + if instrumentation_key: + trace_properties = models.MonitoringSettingProperties() + trace_properties.trace_enabled = True + trace_properties.app_insights_instrumentation_key = instrumentation_key except Exception: # pylint: disable=broad-except logger.warning( 'Error while trying to create and configure an Application Insights for the Azure Spring Cloud. ' 'Please use the Azure Portal to create and configure the Application Insights, if needed.') + return None + return trace_properties def try_create_application_insights(cmd, resource_group, name, location): 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 836cff0af32..c783b29681d 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 @@ -23,7 +23,7 @@ interactions: accept-language: - en-US 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=2019-05-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=2020-07-01 response: body: string: '{"properties":{"thumbprint":"839dbe007ebc9aeb7150d58b1474dd955e684f18","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"210525ac4b3d4a0d8431ab7e64cd11f8","issuer":"*.asc-test.net","expirationDate":"2021-05-08T04:54:02.000+0000","activateDate":"2020-05-08T04:44:02.000+0000","subjectName":"CN=*.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"}' @@ -76,7 +76,7 @@ interactions: accept-language: - en-US 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=2019-05-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=2020-07-01 response: body: string: '{"properties":{"thumbprint":"839dbe007ebc9aeb7150d58b1474dd955e684f18","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"210525ac4b3d4a0d8431ab7e64cd11f8","issuer":"*.asc-test.net","expirationDate":"2021-05-08T04:54:02.000+0000","activateDate":"2020-05-08T04:44:02.000+0000","subjectName":"CN=*.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"}' @@ -125,7 +125,7 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/certificates?api-version=2019-05-01-preview + 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 response: body: string: '{"value":[{"properties":{"thumbprint":"839dbe007ebc9aeb7150d58b1474dd955e684f18","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"210525ac4b3d4a0d8431ab7e64cd11f8","issuer":"*.asc-test.net","expirationDate":"2021-05-08T04:54:02.000+0000","activateDate":"2020-05-08T04:44:02.000+0000","subjectName":"CN=*.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"}]}' @@ -180,7 +180,7 @@ interactions: accept-language: - en-US 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=2019-05-01-preview + 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"}' @@ -233,7 +233,7 @@ interactions: accept-language: - en-US 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=2019-05-01-preview + 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"}' @@ -284,7 +284,7 @@ interactions: accept-language: - en-US 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=2019-05-01-preview + 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"}]}' @@ -335,7 +335,7 @@ interactions: accept-language: - en-US 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=2019-05-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=2020-07-01 response: body: string: '{"properties":{"thumbprint":"839dbe007ebc9aeb7150d58b1474dd955e684f18","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"210525ac4b3d4a0d8431ab7e64cd11f8","issuer":"*.asc-test.net","expirationDate":"2021-05-08T04:54:02.000+0000","activateDate":"2020-05-08T04:44:02.000+0000","subjectName":"CN=*.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"}' @@ -391,7 +391,7 @@ interactions: accept-language: - en-US 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=2019-05-01-preview + 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":"839dbe007ebc9aeb7150d58b1474dd955e684f18","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"}' @@ -444,7 +444,7 @@ interactions: accept-language: - en-US 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=2019-05-01-preview + 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":"839dbe007ebc9aeb7150d58b1474dd955e684f18","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"}' @@ -497,7 +497,7 @@ interactions: accept-language: - en-US 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=2019-05-01-preview + 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: '' @@ -544,7 +544,7 @@ interactions: accept-language: - en-US 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=2019-05-01-preview + 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 with name @@ -594,7 +594,7 @@ interactions: accept-language: - en-US 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=2019-05-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=2020-07-01 response: body: string: '{"properties":{"thumbprint":"839dbe007ebc9aeb7150d58b1474dd955e684f18","vaultUri":"https://integration-test-prod.vault.azure.net/","keyVaultCertName":"cli-unittest","certVersion":"210525ac4b3d4a0d8431ab7e64cd11f8","issuer":"*.asc-test.net","expirationDate":"2021-05-08T04:54:02.000+0000","activateDate":"2020-05-08T04:44:02.000+0000","subjectName":"CN=*.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"}' @@ -647,7 +647,7 @@ interactions: accept-language: - en-US 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=2019-05-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=2020-07-01 response: body: string: '' @@ -694,7 +694,7 @@ interactions: accept-language: - en-US 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=2019-05-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=2020-07-01 response: body: string: '{"error":{"code":"EntityNotFound","message":"CertificateName ''test-cert'' 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 index a0ff01ceabf..ca5a03e81bd 100644 --- 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 @@ -14,6 +14,8 @@ 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 CertificatesOperations @@ -21,7 +23,7 @@ from .operations import DeploymentsOperations from .operations import Operations from .operations import RuntimeVersionsOperations -from .operations import SkuOperations +from .operations import SkusOperations from . import models @@ -32,23 +34,27 @@ class AppPlatformManagementClient(SDKClient): :vartype config: AppPlatformManagementClientConfiguration :ivar services: Services operations - :vartype services: azure.mgmt.appplatform.v2019_05_01_preview.operations.ServicesOperations + :vartype services: azure.mgmt.appplatform.v2020_07_01.operations.ServicesOperations + :ivar config_servers: ConfigServers operations + :vartype config_servers: azure.mgmt.appplatform.v2020_07_01.operations.ConfigServersOperations + :ivar monitoring_settings: MonitoringSettings operations + :vartype monitoring_settings: azure.mgmt.appplatform.v2020_07_01.operations.MonitoringSettingsOperations :ivar apps: Apps operations - :vartype apps: azure.mgmt.appplatform.v2019_05_01_preview.operations.AppsOperations + :vartype apps: azure.mgmt.appplatform.v2020_07_01.operations.AppsOperations :ivar bindings: Bindings operations - :vartype bindings: azure.mgmt.appplatform.v2019_05_01_preview.operations.BindingsOperations + :vartype bindings: azure.mgmt.appplatform.v2020_07_01.operations.BindingsOperations :ivar certificates: Certificates operations - :vartype certificates: azure.mgmt.appplatform.v2019_05_01_preview.operations.CertificatesOperations + :vartype certificates: azure.mgmt.appplatform.v2020_07_01.operations.CertificatesOperations :ivar custom_domains: CustomDomains operations - :vartype custom_domains: azure.mgmt.appplatform.v2019_05_01_preview.operations.CustomDomainsOperations + :vartype custom_domains: azure.mgmt.appplatform.v2020_07_01.operations.CustomDomainsOperations :ivar deployments: Deployments operations - :vartype deployments: azure.mgmt.appplatform.v2019_05_01_preview.operations.DeploymentsOperations + :vartype deployments: azure.mgmt.appplatform.v2020_07_01.operations.DeploymentsOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.appplatform.v2019_05_01_preview.operations.Operations + :vartype operations: azure.mgmt.appplatform.v2020_07_01.operations.Operations :ivar runtime_versions: RuntimeVersions operations - :vartype runtime_versions: azure.mgmt.appplatform.v2019_05_01_preview.operations.RuntimeVersionsOperations - :ivar sku: Sku operations - :vartype sku: azure.mgmt.appplatform.v2019_05_01_preview.operations.SkuOperations + :vartype runtime_versions: azure.mgmt.appplatform.v2020_07_01.operations.RuntimeVersionsOperations + :ivar skus: Skus operations + :vartype skus: azure.mgmt.appplatform.v2020_07_01.operations.SkusOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -67,12 +73,16 @@ def __init__( super(AppPlatformManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-05-01-preview' + self.api_version = '2020-07-01' self._serialize = Serializer(client_models) 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( @@ -87,5 +97,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.runtime_versions = RuntimeVersionsOperations( self._client, self.config, self._serialize, self._deserialize) - self.sku = SkuOperations( + self.skus = SkusOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/__init__.py index 05307b382a4..4ce60886aab 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/__init__.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/__init__.py @@ -20,7 +20,10 @@ 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 CustomDomainProperties from ._models_py3 import CustomDomainResource from ._models_py3 import CustomDomainValidatePayload @@ -36,6 +39,8 @@ 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 @@ -61,7 +66,6 @@ from ._models_py3 import SupportedRuntimeVersion from ._models_py3 import TemporaryDisk from ._models_py3 import TestKeys - from ._models_py3 import TraceProperties from ._models_py3 import TrackedResource from ._models_py3 import UserSourceInfo except (SyntaxError, ImportError): @@ -75,7 +79,10 @@ from ._models import ClusterResourceProperties from ._models import ConfigServerGitProperty from ._models import ConfigServerProperties + from ._models import ConfigServerResource from ._models import ConfigServerSettings + from ._models import ConfigServerSettingsErrorRecord + from ._models import ConfigServerSettingsValidateResult from ._models import CustomDomainProperties from ._models import CustomDomainResource from ._models import CustomDomainValidatePayload @@ -91,6 +98,8 @@ from ._models import ManagedIdentityProperties from ._models import MetricDimension from ._models import MetricSpecification + from ._models import MonitoringSettingProperties + from ._models import MonitoringSettingResource from ._models import NameAvailability from ._models import NameAvailabilityParameters from ._models import NetworkProfile @@ -116,7 +125,6 @@ from ._models import SupportedRuntimeVersion from ._models import TemporaryDisk from ._models import TestKeys - from ._models import TraceProperties from ._models import TrackedResource from ._models import UserSourceInfo from ._paged_models import AppResourcePaged @@ -129,9 +137,9 @@ from ._paged_models import ServiceResourcePaged from ._app_platform_management_client_enums import ( ProvisioningState, - ConfigServerState, - TraceProxyState, ManagedIdentityType, + ConfigServerState, + MonitoringSettingState, TestKeyType, AppResourceProvisioningState, UserSourceType, @@ -156,7 +164,10 @@ 'ClusterResourceProperties', 'ConfigServerGitProperty', 'ConfigServerProperties', + 'ConfigServerResource', 'ConfigServerSettings', + 'ConfigServerSettingsErrorRecord', + 'ConfigServerSettingsValidateResult', 'CustomDomainProperties', 'CustomDomainResource', 'CustomDomainValidatePayload', @@ -172,6 +183,8 @@ 'ManagedIdentityProperties', 'MetricDimension', 'MetricSpecification', + 'MonitoringSettingProperties', + 'MonitoringSettingResource', 'NameAvailability', 'NameAvailabilityParameters', 'NetworkProfile', @@ -197,7 +210,6 @@ 'SupportedRuntimeVersion', 'TemporaryDisk', 'TestKeys', - 'TraceProperties', 'TrackedResource', 'UserSourceInfo', 'ServiceResourcePaged', @@ -209,9 +221,9 @@ 'OperationDetailPaged', 'ResourceSkuPaged', 'ProvisioningState', - 'ConfigServerState', - 'TraceProxyState', 'ManagedIdentityType', + 'ConfigServerState', + 'MonitoringSettingState', 'TestKeyType', 'AppResourceProvisioningState', 'UserSourceType', diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_app_platform_management_client_enums.py index 39cfc85a61a..b24c6101642 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_app_platform_management_client_enums.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_app_platform_management_client_enums.py @@ -25,6 +25,14 @@ class ProvisioningState(str, Enum): move_failed = "MoveFailed" +class ManagedIdentityType(str, Enum): + + none = "None" + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned,UserAssigned" + + class ConfigServerState(str, Enum): not_available = "NotAvailable" @@ -34,7 +42,7 @@ class ConfigServerState(str, Enum): updating = "Updating" -class TraceProxyState(str, Enum): +class MonitoringSettingState(str, Enum): not_available = "NotAvailable" failed = "Failed" @@ -42,14 +50,6 @@ class TraceProxyState(str, Enum): updating = "Updating" -class ManagedIdentityType(str, Enum): - - none = "None" - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - system_assigned_user_assigned = "SystemAssigned,UserAssigned" - - class TestKeyType(str, Enum): primary = "Primary" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models.py index 08f58d3ef8f..899625f1fad 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models.py @@ -91,10 +91,10 @@ class AppResource(ProxyResource): :vartype type: str :param properties: Properties of the App resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.AppResourceProperties :param identity: The Managed Identity type of the app resource :type identity: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ManagedIdentityProperties + ~azure.mgmt.appplatform.v2020_07_01.models.ManagedIdentityProperties :param location: The GEO location of the application, always the same with its parent resource :type location: str @@ -135,7 +135,7 @@ class AppResourceProperties(Model): :ivar provisioning_state: Provisioning state of the App. Possible values include: 'Succeeded', 'Failed', 'Creating', 'Updating' :vartype provisioning_state: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResourceProvisioningState + ~azure.mgmt.appplatform.v2020_07_01.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. @@ -146,10 +146,10 @@ class AppResourceProperties(Model): :vartype created_time: datetime :param temporary_disk: Temporary disk settings :type temporary_disk: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.TemporaryDisk + ~azure.mgmt.appplatform.v2020_07_01.models.TemporaryDisk :param persistent_disk: Persistent disk settings :type persistent_disk: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.PersistentDisk + ~azure.mgmt.appplatform.v2020_07_01.models.PersistentDisk """ _validation = { @@ -191,7 +191,7 @@ class AvailableRuntimeVersions(Model): :ivar value: A list of all supported runtime versions. :vartype value: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.SupportedRuntimeVersion] + list[~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimeVersion] """ _validation = { @@ -221,7 +221,7 @@ class BindingResource(ProxyResource): :vartype type: str :param properties: Properties of the Binding resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.BindingResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.BindingResourceProperties """ _validation = { @@ -382,7 +382,7 @@ class CertificateResource(ProxyResource): :vartype type: str :param properties: Properties of the certificate resource payload. :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CertificateProperties + ~azure.mgmt.appplatform.v2020_07_01.models.CertificateProperties """ _validation = { @@ -406,9 +406,8 @@ def __init__(self, **kwargs): class CloudError(Model): """An error response from the service. - :param error: - :type error: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CloudErrorBody + :param error: An error response from the service. + :type error: ~azure.mgmt.appplatform.v2020_07_01.models.CloudErrorBody """ _attribute_map = { @@ -446,7 +445,7 @@ class CloudErrorBody(Model): :type target: str :param details: A list of additional details about the error. :type details: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.CloudErrorBody] + list[~azure.mgmt.appplatform.v2020_07_01.models.CloudErrorBody] """ _attribute_map = { @@ -474,17 +473,10 @@ class ClusterResourceProperties(Model): values include: 'Creating', 'Updating', 'Deleting', 'Deleted', 'Succeeded', 'Failed', 'Moving', 'Moved', 'MoveFailed' :vartype provisioning_state: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ProvisioningState - :param config_server_properties: Config server git properties of the - Service - :type config_server_properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ConfigServerProperties - :param trace: Trace properties of the Service - :type trace: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.TraceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.ProvisioningState :param network_profile: Network profile of the Service :type network_profile: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfile + ~azure.mgmt.appplatform.v2020_07_01.models.NetworkProfile :ivar version: Version of the Service :vartype version: int :ivar service_id: ServiceInstanceEntity GUID which uniquely identifies a @@ -500,8 +492,6 @@ class ClusterResourceProperties(Model): _attribute_map = { 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'config_server_properties': {'key': 'configServerProperties', 'type': 'ConfigServerProperties'}, - 'trace': {'key': 'trace', 'type': 'TraceProperties'}, 'network_profile': {'key': 'networkProfile', 'type': 'NetworkProfile'}, 'version': {'key': 'version', 'type': 'int'}, 'service_id': {'key': 'serviceId', 'type': 'str'}, @@ -510,8 +500,6 @@ class ClusterResourceProperties(Model): def __init__(self, **kwargs): super(ClusterResourceProperties, self).__init__(**kwargs) self.provisioning_state = None - self.config_server_properties = kwargs.get('config_server_properties', None) - self.trace = kwargs.get('trace', None) self.network_profile = kwargs.get('network_profile', None) self.version = None self.service_id = None @@ -524,7 +512,7 @@ class ConfigServerGitProperty(Model): :param repositories: Repositories of git. :type repositories: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.GitPatternRepository] + list[~azure.mgmt.appplatform.v2020_07_01.models.GitPatternRepository] :param uri: Required. URI of the repository :type uri: str :param label: Label of the repository @@ -582,40 +570,75 @@ class ConfigServerProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar state: State of the config server. Possible values include: - 'NotAvailable', 'Deleted', 'Failed', 'Succeeded', 'Updating' - :vartype state: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ConfigServerState + :ivar provisioning_state: State of the config server. Possible values + include: 'NotAvailable', 'Deleted', 'Failed', 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerState :param error: Error when apply config server settings. - :type error: ~azure.mgmt.appplatform.v2019_05_01_preview.models.Error + :type error: ~azure.mgmt.appplatform.v2020_07_01.models.Error :param config_server: Settings of config server. :type config_server: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ConfigServerSettings + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerSettings """ _validation = { - 'state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, + '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.state = None + 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.v2020_07_01.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(Model): """The settings of config server. :param git_property: Property of git environment. :type git_property: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ConfigServerGitProperty + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerGitProperty """ _attribute_map = { @@ -627,6 +650,51 @@ def __init__(self, **kwargs): self.git_property = kwargs.get('git_property', None) +class ConfigServerSettingsErrorRecord(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(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.v2020_07_01.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 CustomDomainProperties(Model): """Custom domain of app resource payload. @@ -672,7 +740,7 @@ class CustomDomainResource(ProxyResource): :vartype type: str :param properties: Properties of the custom domain resource. :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainProperties + ~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainProperties """ _validation = { @@ -792,7 +860,9 @@ class DeploymentResource(ProxyResource): :vartype type: str :param properties: Properties of the Deployment resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource + :type sku: ~azure.mgmt.appplatform.v2020_07_01.models.Sku """ _validation = { @@ -806,11 +876,13 @@ class DeploymentResource(ProxyResource): '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 DeploymentResourceProperties(Model): @@ -820,29 +892,28 @@ class DeploymentResourceProperties(Model): sending a request. :param source: Uploaded source information of the deployment. - :type source: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.UserSourceInfo + :type source: ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.DeploymentSettings + ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.DeploymentResourceProvisioningState + ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.DeploymentResourceStatus + ~azure.mgmt.appplatform.v2020_07_01.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 :ivar instances: Collection of instances belong to the Deployment :vartype instances: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentInstance] + list[~azure.mgmt.appplatform.v2020_07_01.models.DeploymentInstance] """ _validation = { @@ -891,15 +962,12 @@ class DeploymentSettings(Model): :param net_core_main_entry_path: The path to the .NET executable relative to zip root :type net_core_main_entry_path: str - :param instance_count: Instance count, basic tier should be in range (1, - 25), standard tier should be in range (1, 500). Default value: 1 . - :type instance_count: int :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' :type runtime_version: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.RuntimeVersion + ~azure.mgmt.appplatform.v2020_07_01.models.RuntimeVersion """ _attribute_map = { @@ -907,7 +975,6 @@ class DeploymentSettings(Model): 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, } @@ -918,7 +985,6 @@ def __init__(self, **kwargs): self.memory_in_gb = kwargs.get('memory_in_gb', 1) self.jvm_options = kwargs.get('jvm_options', None) self.net_core_main_entry_path = kwargs.get('net_core_main_entry_path', None) - self.instance_count = kwargs.get('instance_count', 1) self.environment_variables = kwargs.get('environment_variables', None) self.runtime_version = kwargs.get('runtime_version', None) @@ -1055,13 +1121,13 @@ def __init__(self, **kwargs): class ManagedIdentityProperties(Model): """Managed identity properties retrieved from ARM request headers. - :param type: Possible values include: 'None', 'SystemAssigned', - 'UserAssigned', 'SystemAssigned,UserAssigned' + :param type: Type of the managed identity. Possible values include: + 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned' :type type: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ManagedIdentityType - :param principal_id: + ~azure.mgmt.appplatform.v2020_07_01.models.ManagedIdentityType + :param principal_id: Principal Id :type principal_id: str - :param tenant_id: + :param tenant_id: Tenant Id :type tenant_id: str """ @@ -1124,7 +1190,7 @@ class MetricSpecification(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] + list[~azure.mgmt.appplatform.v2020_07_01.models.MetricDimension] """ _attribute_map = { @@ -1154,6 +1220,79 @@ def __init__(self, **kwargs): self.dimensions = kwargs.get('dimensions', None) +class MonitoringSettingProperties(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.v2020_07_01.models.MonitoringSettingState + :param error: Error when apply Monitoring Setting changes. + :type error: ~azure.mgmt.appplatform.v2020_07_01.models.Error + :param trace_enabled: Indicates whether enable the trace functionality + :type trace_enabled: bool + :param app_insights_instrumentation_key: Target application insight + instrumentation key + :type app_insights_instrumentation_key: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _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'}, + } + + 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) + + +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.v2020_07_01.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(Model): """Name availability result payload. @@ -1228,7 +1367,7 @@ class NetworkProfile(Model): :ivar outbound_ips: Desired outbound IP resources for Azure Spring Cloud instance. :vartype outbound_ips: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfileOutboundIPs + ~azure.mgmt.appplatform.v2020_07_01.models.NetworkProfileOutboundIPs """ _validation = { @@ -1285,13 +1424,12 @@ class OperationDetail(Model): :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.v2019_05_01_preview.models.OperationDisplay + :type display: ~azure.mgmt.appplatform.v2020_07_01.models.OperationDisplay :param origin: Origin of the operation :type origin: str :param properties: Properties of the operation :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.OperationProperties + ~azure.mgmt.appplatform.v2020_07_01.models.OperationProperties """ _attribute_map = { @@ -1344,7 +1482,7 @@ class OperationProperties(Model): :param service_specification: Service specifications of the operation :type service_specification: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceSpecification + ~azure.mgmt.appplatform.v2020_07_01.models.ServiceSpecification """ _attribute_map = { @@ -1396,7 +1534,7 @@ class RegenerateTestKeyRequestPayload(Model): :param key_type: Required. Type of the test key. Possible values include: 'Primary', 'Secondary' :type key_type: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.TestKeyType + ~azure.mgmt.appplatform.v2020_07_01.models.TestKeyType """ _validation = { @@ -1422,19 +1560,18 @@ class ResourceSku(Model): :param tier: Gets the tier of SKU. :type tier: str :param capacity: Gets the capacity of SKU. - :type capacity: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.SkuCapacity + :type capacity: ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.ResourceSkuLocationInfo] + list[~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.ResourceSkuRestrictions] + list[~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuRestrictions] """ _attribute_map = { @@ -1479,7 +1616,7 @@ def __init__(self, **kwargs): class ResourceSkuLocationInfo(Model): - """ResourceSkuLocationInfo. + """Locations and availability zones where the SKU is available. :param location: Gets location of the SKU :type location: str @@ -1488,7 +1625,7 @@ class ResourceSkuLocationInfo(Model): :param zone_details: Gets details of capabilities available to a SKU in specific zones. :type zone_details: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuZoneDetails] + list[~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuZoneDetails] """ _attribute_map = { @@ -1505,7 +1642,7 @@ def __init__(self, **kwargs): class ResourceSkuRestrictionInfo(Model): - """ResourceSkuRestrictionInfo. + """Information about the restriction where the SKU cannot be used. :param locations: Gets locations where the SKU is restricted :type locations: list[str] @@ -1525,12 +1662,12 @@ def __init__(self, **kwargs): class ResourceSkuRestrictions(Model): - """ResourceSkuRestrictions. + """Restrictions where the SKU cannot be used. :param type: Gets the type of restrictions. Possible values include: 'Location', 'Zone' :type type: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuRestrictionsType + ~azure.mgmt.appplatform.v2020_07_01.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. @@ -1538,11 +1675,11 @@ class ResourceSkuRestrictions(Model): :param restriction_info: Gets the information about the restriction where the SKU cannot be used. :type restriction_info: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuRestrictionInfo + ~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuRestrictionInfo :param reason_code: Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription' :type reason_code: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuRestrictionsReasonCode + ~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuRestrictionsReasonCode """ _attribute_map = { @@ -1561,7 +1698,7 @@ def __init__(self, **kwargs): class ResourceSkuZoneDetails(Model): - """ResourceSkuZoneDetails. + """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. @@ -1570,7 +1707,7 @@ class ResourceSkuZoneDetails(Model): the SKU in the specified list of zones. :type capabilities: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuCapabilities] + list[~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuCapabilities] """ _attribute_map = { @@ -1662,9 +1799,9 @@ class ServiceResource(TrackedResource): :type tags: dict[str, str] :param properties: Properties of the Service resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ClusterResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.ClusterResourceProperties :param sku: Sku of the Service resource - :type sku: ~azure.mgmt.appplatform.v2019_05_01_preview.models.Sku + :type sku: ~azure.mgmt.appplatform.v2020_07_01.models.Sku """ _validation = { @@ -1694,11 +1831,11 @@ class ServiceSpecification(Model): :param log_specifications: Specifications of the Log for Azure Monitoring :type log_specifications: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.LogSpecification] + list[~azure.mgmt.appplatform.v2020_07_01.models.LogSpecification] :param metric_specifications: Specifications of the Metrics for Azure Monitoring :type metric_specifications: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.MetricSpecification] + list[~azure.mgmt.appplatform.v2020_07_01.models.MetricSpecification] """ _attribute_map = { @@ -1750,7 +1887,7 @@ class SkuCapacity(Model): :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.v2019_05_01_preview.models.SkuScaleType + ~azure.mgmt.appplatform.v2020_07_01.models.SkuScaleType """ _validation = { @@ -1778,11 +1915,11 @@ class SupportedRuntimeVersion(Model): :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.v2019_05_01_preview.models.SupportedRuntimeValue + ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.SupportedRuntimePlatform + ~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimePlatform :param version: The detailed version (major.minor) of the platform. :type version: str """ @@ -1856,51 +1993,13 @@ def __init__(self, **kwargs): self.enabled = kwargs.get('enabled', None) -class TraceProperties(Model): - """Trace properties payload. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar state: State of the trace proxy. Possible values include: - 'NotAvailable', 'Failed', 'Succeeded', 'Updating' - :vartype state: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.TraceProxyState - :param error: Error when apply trace proxy changes. - :type error: ~azure.mgmt.appplatform.v2019_05_01_preview.models.Error - :param enabled: Indicates whether enable the tracing functionality - :type enabled: bool - :param app_insight_instrumentation_key: Target application insight - instrumentation key - :type app_insight_instrumentation_key: str - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'app_insight_instrumentation_key': {'key': 'appInsightInstrumentationKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TraceProperties, self).__init__(**kwargs) - self.state = None - self.error = kwargs.get('error', None) - self.enabled = kwargs.get('enabled', None) - self.app_insight_instrumentation_key = kwargs.get('app_insight_instrumentation_key', None) - - class UserSourceInfo(Model): """Source information for a deployment. :param type: Type of the source uploaded. Possible values include: 'Jar', 'NetCoreZip', 'Source' :type type: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.UserSourceType + ~azure.mgmt.appplatform.v2020_07_01.models.UserSourceType :param relative_path: Relative path of the storage which stores the source :type relative_path: str :param version: Version of the source diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models_py3.py index b5b8edb6c82..261e7655946 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models_py3.py @@ -91,10 +91,10 @@ class AppResource(ProxyResource): :vartype type: str :param properties: Properties of the App resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.AppResourceProperties :param identity: The Managed Identity type of the app resource :type identity: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ManagedIdentityProperties + ~azure.mgmt.appplatform.v2020_07_01.models.ManagedIdentityProperties :param location: The GEO location of the application, always the same with its parent resource :type location: str @@ -135,7 +135,7 @@ class AppResourceProperties(Model): :ivar provisioning_state: Provisioning state of the App. Possible values include: 'Succeeded', 'Failed', 'Creating', 'Updating' :vartype provisioning_state: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResourceProvisioningState + ~azure.mgmt.appplatform.v2020_07_01.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. @@ -146,10 +146,10 @@ class AppResourceProperties(Model): :vartype created_time: datetime :param temporary_disk: Temporary disk settings :type temporary_disk: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.TemporaryDisk + ~azure.mgmt.appplatform.v2020_07_01.models.TemporaryDisk :param persistent_disk: Persistent disk settings :type persistent_disk: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.PersistentDisk + ~azure.mgmt.appplatform.v2020_07_01.models.PersistentDisk """ _validation = { @@ -191,7 +191,7 @@ class AvailableRuntimeVersions(Model): :ivar value: A list of all supported runtime versions. :vartype value: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.SupportedRuntimeVersion] + list[~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimeVersion] """ _validation = { @@ -221,7 +221,7 @@ class BindingResource(ProxyResource): :vartype type: str :param properties: Properties of the Binding resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.BindingResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.BindingResourceProperties """ _validation = { @@ -382,7 +382,7 @@ class CertificateResource(ProxyResource): :vartype type: str :param properties: Properties of the certificate resource payload. :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CertificateProperties + ~azure.mgmt.appplatform.v2020_07_01.models.CertificateProperties """ _validation = { @@ -406,9 +406,8 @@ def __init__(self, *, properties=None, **kwargs) -> None: class CloudError(Model): """An error response from the service. - :param error: - :type error: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CloudErrorBody + :param error: An error response from the service. + :type error: ~azure.mgmt.appplatform.v2020_07_01.models.CloudErrorBody """ _attribute_map = { @@ -446,7 +445,7 @@ class CloudErrorBody(Model): :type target: str :param details: A list of additional details about the error. :type details: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.CloudErrorBody] + list[~azure.mgmt.appplatform.v2020_07_01.models.CloudErrorBody] """ _attribute_map = { @@ -474,17 +473,10 @@ class ClusterResourceProperties(Model): values include: 'Creating', 'Updating', 'Deleting', 'Deleted', 'Succeeded', 'Failed', 'Moving', 'Moved', 'MoveFailed' :vartype provisioning_state: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ProvisioningState - :param config_server_properties: Config server git properties of the - Service - :type config_server_properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ConfigServerProperties - :param trace: Trace properties of the Service - :type trace: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.TraceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.ProvisioningState :param network_profile: Network profile of the Service :type network_profile: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfile + ~azure.mgmt.appplatform.v2020_07_01.models.NetworkProfile :ivar version: Version of the Service :vartype version: int :ivar service_id: ServiceInstanceEntity GUID which uniquely identifies a @@ -500,18 +492,14 @@ class ClusterResourceProperties(Model): _attribute_map = { 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'config_server_properties': {'key': 'configServerProperties', 'type': 'ConfigServerProperties'}, - 'trace': {'key': 'trace', 'type': 'TraceProperties'}, 'network_profile': {'key': 'networkProfile', 'type': 'NetworkProfile'}, 'version': {'key': 'version', 'type': 'int'}, 'service_id': {'key': 'serviceId', 'type': 'str'}, } - def __init__(self, *, config_server_properties=None, trace=None, network_profile=None, **kwargs) -> None: + def __init__(self, *, network_profile=None, **kwargs) -> None: super(ClusterResourceProperties, self).__init__(**kwargs) self.provisioning_state = None - self.config_server_properties = config_server_properties - self.trace = trace self.network_profile = network_profile self.version = None self.service_id = None @@ -524,7 +512,7 @@ class ConfigServerGitProperty(Model): :param repositories: Repositories of git. :type repositories: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.GitPatternRepository] + list[~azure.mgmt.appplatform.v2020_07_01.models.GitPatternRepository] :param uri: Required. URI of the repository :type uri: str :param label: Label of the repository @@ -582,40 +570,75 @@ class ConfigServerProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar state: State of the config server. Possible values include: - 'NotAvailable', 'Deleted', 'Failed', 'Succeeded', 'Updating' - :vartype state: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ConfigServerState + :ivar provisioning_state: State of the config server. Possible values + include: 'NotAvailable', 'Deleted', 'Failed', 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerState :param error: Error when apply config server settings. - :type error: ~azure.mgmt.appplatform.v2019_05_01_preview.models.Error + :type error: ~azure.mgmt.appplatform.v2020_07_01.models.Error :param config_server: Settings of config server. :type config_server: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ConfigServerSettings + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerSettings """ _validation = { - 'state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'error': {'key': 'error', 'type': 'Error'}, 'config_server': {'key': 'configServer', 'type': 'ConfigServerSettings'}, } def __init__(self, *, error=None, config_server=None, **kwargs) -> None: super(ConfigServerProperties, self).__init__(**kwargs) - self.state = None + 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.v2020_07_01.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=None, **kwargs) -> None: + super(ConfigServerResource, self).__init__(**kwargs) + self.properties = properties + + class ConfigServerSettings(Model): """The settings of config server. :param git_property: Property of git environment. :type git_property: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ConfigServerGitProperty + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerGitProperty """ _attribute_map = { @@ -627,6 +650,51 @@ def __init__(self, *, git_property=None, **kwargs) -> None: self.git_property = git_property +class ConfigServerSettingsErrorRecord(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: str=None, uri: str=None, messages=None, **kwargs) -> None: + super(ConfigServerSettingsErrorRecord, self).__init__(**kwargs) + self.name = name + self.uri = uri + self.messages = messages + + +class ConfigServerSettingsValidateResult(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.v2020_07_01.models.ConfigServerSettingsErrorRecord] + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'details': {'key': 'details', 'type': '[ConfigServerSettingsErrorRecord]'}, + } + + def __init__(self, *, is_valid: bool=None, details=None, **kwargs) -> None: + super(ConfigServerSettingsValidateResult, self).__init__(**kwargs) + self.is_valid = is_valid + self.details = details + + class CustomDomainProperties(Model): """Custom domain of app resource payload. @@ -672,7 +740,7 @@ class CustomDomainResource(ProxyResource): :vartype type: str :param properties: Properties of the custom domain resource. :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainProperties + ~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainProperties """ _validation = { @@ -792,7 +860,9 @@ class DeploymentResource(ProxyResource): :vartype type: str :param properties: Properties of the Deployment resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource + :type sku: ~azure.mgmt.appplatform.v2020_07_01.models.Sku """ _validation = { @@ -806,11 +876,13 @@ class DeploymentResource(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DeploymentResourceProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, *, properties=None, **kwargs) -> None: + def __init__(self, *, properties=None, sku=None, **kwargs) -> None: super(DeploymentResource, self).__init__(**kwargs) self.properties = properties + self.sku = sku class DeploymentResourceProperties(Model): @@ -820,29 +892,28 @@ class DeploymentResourceProperties(Model): sending a request. :param source: Uploaded source information of the deployment. - :type source: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.UserSourceInfo + :type source: ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.DeploymentSettings + ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.DeploymentResourceProvisioningState + ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.DeploymentResourceStatus + ~azure.mgmt.appplatform.v2020_07_01.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 :ivar instances: Collection of instances belong to the Deployment :vartype instances: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentInstance] + list[~azure.mgmt.appplatform.v2020_07_01.models.DeploymentInstance] """ _validation = { @@ -891,15 +962,12 @@ class DeploymentSettings(Model): :param net_core_main_entry_path: The path to the .NET executable relative to zip root :type net_core_main_entry_path: str - :param instance_count: Instance count, basic tier should be in range (1, - 25), standard tier should be in range (1, 500). Default value: 1 . - :type instance_count: int :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' :type runtime_version: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.RuntimeVersion + ~azure.mgmt.appplatform.v2020_07_01.models.RuntimeVersion """ _attribute_map = { @@ -907,18 +975,16 @@ class DeploymentSettings(Model): 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, } - def __init__(self, *, cpu: int=1, memory_in_gb: int=1, jvm_options: str=None, net_core_main_entry_path: str=None, instance_count: int=1, environment_variables=None, runtime_version=None, **kwargs) -> None: + def __init__(self, *, cpu: int=1, memory_in_gb: int=1, jvm_options: str=None, net_core_main_entry_path: str=None, environment_variables=None, runtime_version=None, **kwargs) -> None: super(DeploymentSettings, self).__init__(**kwargs) self.cpu = cpu self.memory_in_gb = memory_in_gb self.jvm_options = jvm_options self.net_core_main_entry_path = net_core_main_entry_path - self.instance_count = instance_count self.environment_variables = environment_variables self.runtime_version = runtime_version @@ -1055,13 +1121,13 @@ def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str class ManagedIdentityProperties(Model): """Managed identity properties retrieved from ARM request headers. - :param type: Possible values include: 'None', 'SystemAssigned', - 'UserAssigned', 'SystemAssigned,UserAssigned' + :param type: Type of the managed identity. Possible values include: + 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned' :type type: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ManagedIdentityType - :param principal_id: + ~azure.mgmt.appplatform.v2020_07_01.models.ManagedIdentityType + :param principal_id: Principal Id :type principal_id: str - :param tenant_id: + :param tenant_id: Tenant Id :type tenant_id: str """ @@ -1124,7 +1190,7 @@ class MetricSpecification(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] + list[~azure.mgmt.appplatform.v2020_07_01.models.MetricDimension] """ _attribute_map = { @@ -1154,6 +1220,79 @@ def __init__(self, *, name: str=None, display_name: str=None, display_descriptio self.dimensions = dimensions +class MonitoringSettingProperties(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.v2020_07_01.models.MonitoringSettingState + :param error: Error when apply Monitoring Setting changes. + :type error: ~azure.mgmt.appplatform.v2020_07_01.models.Error + :param trace_enabled: Indicates whether enable the trace functionality + :type trace_enabled: bool + :param app_insights_instrumentation_key: Target application insight + instrumentation key + :type app_insights_instrumentation_key: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _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'}, + } + + def __init__(self, *, error=None, trace_enabled: bool=None, app_insights_instrumentation_key: str=None, **kwargs) -> None: + 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 + + +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.v2020_07_01.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=None, **kwargs) -> None: + super(MonitoringSettingResource, self).__init__(**kwargs) + self.properties = properties + + class NameAvailability(Model): """Name availability result payload. @@ -1228,7 +1367,7 @@ class NetworkProfile(Model): :ivar outbound_ips: Desired outbound IP resources for Azure Spring Cloud instance. :vartype outbound_ips: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfileOutboundIPs + ~azure.mgmt.appplatform.v2020_07_01.models.NetworkProfileOutboundIPs """ _validation = { @@ -1285,13 +1424,12 @@ class OperationDetail(Model): :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.v2019_05_01_preview.models.OperationDisplay + :type display: ~azure.mgmt.appplatform.v2020_07_01.models.OperationDisplay :param origin: Origin of the operation :type origin: str :param properties: Properties of the operation :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.OperationProperties + ~azure.mgmt.appplatform.v2020_07_01.models.OperationProperties """ _attribute_map = { @@ -1344,7 +1482,7 @@ class OperationProperties(Model): :param service_specification: Service specifications of the operation :type service_specification: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceSpecification + ~azure.mgmt.appplatform.v2020_07_01.models.ServiceSpecification """ _attribute_map = { @@ -1396,7 +1534,7 @@ class RegenerateTestKeyRequestPayload(Model): :param key_type: Required. Type of the test key. Possible values include: 'Primary', 'Secondary' :type key_type: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.TestKeyType + ~azure.mgmt.appplatform.v2020_07_01.models.TestKeyType """ _validation = { @@ -1422,19 +1560,18 @@ class ResourceSku(Model): :param tier: Gets the tier of SKU. :type tier: str :param capacity: Gets the capacity of SKU. - :type capacity: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.SkuCapacity + :type capacity: ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.ResourceSkuLocationInfo] + list[~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.ResourceSkuRestrictions] + list[~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuRestrictions] """ _attribute_map = { @@ -1479,7 +1616,7 @@ def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: class ResourceSkuLocationInfo(Model): - """ResourceSkuLocationInfo. + """Locations and availability zones where the SKU is available. :param location: Gets location of the SKU :type location: str @@ -1488,7 +1625,7 @@ class ResourceSkuLocationInfo(Model): :param zone_details: Gets details of capabilities available to a SKU in specific zones. :type zone_details: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuZoneDetails] + list[~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuZoneDetails] """ _attribute_map = { @@ -1505,7 +1642,7 @@ def __init__(self, *, location: str=None, zones=None, zone_details=None, **kwarg class ResourceSkuRestrictionInfo(Model): - """ResourceSkuRestrictionInfo. + """Information about the restriction where the SKU cannot be used. :param locations: Gets locations where the SKU is restricted :type locations: list[str] @@ -1525,12 +1662,12 @@ def __init__(self, *, locations=None, zones=None, **kwargs) -> None: class ResourceSkuRestrictions(Model): - """ResourceSkuRestrictions. + """Restrictions where the SKU cannot be used. :param type: Gets the type of restrictions. Possible values include: 'Location', 'Zone' :type type: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuRestrictionsType + ~azure.mgmt.appplatform.v2020_07_01.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. @@ -1538,11 +1675,11 @@ class ResourceSkuRestrictions(Model): :param restriction_info: Gets the information about the restriction where the SKU cannot be used. :type restriction_info: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuRestrictionInfo + ~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuRestrictionInfo :param reason_code: Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription' :type reason_code: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuRestrictionsReasonCode + ~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuRestrictionsReasonCode """ _attribute_map = { @@ -1561,7 +1698,7 @@ def __init__(self, *, type=None, values=None, restriction_info=None, reason_code class ResourceSkuZoneDetails(Model): - """ResourceSkuZoneDetails. + """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. @@ -1570,7 +1707,7 @@ class ResourceSkuZoneDetails(Model): the SKU in the specified list of zones. :type capabilities: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuCapabilities] + list[~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuCapabilities] """ _attribute_map = { @@ -1662,9 +1799,9 @@ class ServiceResource(TrackedResource): :type tags: dict[str, str] :param properties: Properties of the Service resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ClusterResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.ClusterResourceProperties :param sku: Sku of the Service resource - :type sku: ~azure.mgmt.appplatform.v2019_05_01_preview.models.Sku + :type sku: ~azure.mgmt.appplatform.v2020_07_01.models.Sku """ _validation = { @@ -1694,11 +1831,11 @@ class ServiceSpecification(Model): :param log_specifications: Specifications of the Log for Azure Monitoring :type log_specifications: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.LogSpecification] + list[~azure.mgmt.appplatform.v2020_07_01.models.LogSpecification] :param metric_specifications: Specifications of the Metrics for Azure Monitoring :type metric_specifications: - list[~azure.mgmt.appplatform.v2019_05_01_preview.models.MetricSpecification] + list[~azure.mgmt.appplatform.v2020_07_01.models.MetricSpecification] """ _attribute_map = { @@ -1750,7 +1887,7 @@ class SkuCapacity(Model): :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.v2019_05_01_preview.models.SkuScaleType + ~azure.mgmt.appplatform.v2020_07_01.models.SkuScaleType """ _validation = { @@ -1778,11 +1915,11 @@ class SupportedRuntimeVersion(Model): :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.v2019_05_01_preview.models.SupportedRuntimeValue + ~azure.mgmt.appplatform.v2020_07_01.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.v2019_05_01_preview.models.SupportedRuntimePlatform + ~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimePlatform :param version: The detailed version (major.minor) of the platform. :type version: str """ @@ -1856,51 +1993,13 @@ def __init__(self, *, primary_key: str=None, secondary_key: str=None, primary_te self.enabled = enabled -class TraceProperties(Model): - """Trace properties payload. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar state: State of the trace proxy. Possible values include: - 'NotAvailable', 'Failed', 'Succeeded', 'Updating' - :vartype state: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.TraceProxyState - :param error: Error when apply trace proxy changes. - :type error: ~azure.mgmt.appplatform.v2019_05_01_preview.models.Error - :param enabled: Indicates whether enable the tracing functionality - :type enabled: bool - :param app_insight_instrumentation_key: Target application insight - instrumentation key - :type app_insight_instrumentation_key: str - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'app_insight_instrumentation_key': {'key': 'appInsightInstrumentationKey', 'type': 'str'}, - } - - def __init__(self, *, error=None, enabled: bool=None, app_insight_instrumentation_key: str=None, **kwargs) -> None: - super(TraceProperties, self).__init__(**kwargs) - self.state = None - self.error = error - self.enabled = enabled - self.app_insight_instrumentation_key = app_insight_instrumentation_key - - class UserSourceInfo(Model): """Source information for a deployment. :param type: Type of the source uploaded. Possible values include: 'Jar', 'NetCoreZip', 'Source' :type type: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.UserSourceType + ~azure.mgmt.appplatform.v2020_07_01.models.UserSourceType :param relative_path: Relative path of the storage which stores the source :type relative_path: str :param version: Version of the source diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_paged_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_paged_models.py index 3338dac377b..e7bdca927d0 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_paged_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_paged_models.py @@ -14,7 +14,7 @@ class ServiceResourcePaged(Paged): """ - A paging container for iterating over a list of :class:`ServiceResource ` object + A paging container for iterating over a list of :class:`ServiceResource ` object """ _attribute_map = { @@ -27,7 +27,7 @@ def __init__(self, *args, **kwargs): super(ServiceResourcePaged, self).__init__(*args, **kwargs) class AppResourcePaged(Paged): """ - A paging container for iterating over a list of :class:`AppResource ` object + A paging container for iterating over a list of :class:`AppResource ` object """ _attribute_map = { @@ -40,7 +40,7 @@ def __init__(self, *args, **kwargs): super(AppResourcePaged, self).__init__(*args, **kwargs) class BindingResourcePaged(Paged): """ - A paging container for iterating over a list of :class:`BindingResource ` object + A paging container for iterating over a list of :class:`BindingResource ` object """ _attribute_map = { @@ -53,7 +53,7 @@ def __init__(self, *args, **kwargs): super(BindingResourcePaged, self).__init__(*args, **kwargs) class CertificateResourcePaged(Paged): """ - A paging container for iterating over a list of :class:`CertificateResource ` object + A paging container for iterating over a list of :class:`CertificateResource ` object """ _attribute_map = { @@ -66,7 +66,7 @@ def __init__(self, *args, **kwargs): super(CertificateResourcePaged, self).__init__(*args, **kwargs) class CustomDomainResourcePaged(Paged): """ - A paging container for iterating over a list of :class:`CustomDomainResource ` object + A paging container for iterating over a list of :class:`CustomDomainResource ` object """ _attribute_map = { @@ -79,7 +79,7 @@ def __init__(self, *args, **kwargs): super(CustomDomainResourcePaged, self).__init__(*args, **kwargs) class DeploymentResourcePaged(Paged): """ - A paging container for iterating over a list of :class:`DeploymentResource ` object + A paging container for iterating over a list of :class:`DeploymentResource ` object """ _attribute_map = { @@ -92,7 +92,7 @@ def __init__(self, *args, **kwargs): super(DeploymentResourcePaged, self).__init__(*args, **kwargs) class OperationDetailPaged(Paged): """ - A paging container for iterating over a list of :class:`OperationDetail ` object + A paging container for iterating over a list of :class:`OperationDetail ` object """ _attribute_map = { @@ -105,7 +105,7 @@ def __init__(self, *args, **kwargs): super(OperationDetailPaged, self).__init__(*args, **kwargs) class ResourceSkuPaged(Paged): """ - A paging container for iterating over a list of :class:`ResourceSku ` object + A paging container for iterating over a list of :class:`ResourceSku ` object """ _attribute_map = { diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/__init__.py index de8f71f38f0..0a24a9df9f9 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/__init__.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/__init__.py @@ -10,6 +10,8 @@ # -------------------------------------------------------------------------- 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 ._certificates_operations import CertificatesOperations @@ -17,10 +19,12 @@ from ._deployments_operations import DeploymentsOperations from ._operations import Operations from ._runtime_versions_operations import RuntimeVersionsOperations -from ._sku_operations import SkuOperations +from ._skus_operations import SkusOperations __all__ = [ 'ServicesOperations', + 'ConfigServersOperations', + 'MonitoringSettingsOperations', 'AppsOperations', 'BindingsOperations', 'CertificatesOperations', @@ -28,5 +32,5 @@ 'DeploymentsOperations', 'Operations', 'RuntimeVersionsOperations', - 'SkuOperations', + 'SkusOperations', ] diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_apps_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_apps_operations.py index 9ae13765156..16c38b6374b 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_apps_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_apps_operations.py @@ -27,7 +27,7 @@ class AppsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2020-07-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01-preview" + self.api_version = "2020-07-01" self.config = config @@ -61,8 +61,8 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: AppResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource - or ~msrest.pipeline.ClientRawResponse + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.AppResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -146,7 +146,7 @@ def _create_or_update_initial( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -157,6 +157,8 @@ def _create_or_update_initial( deserialized = self._deserialize('AppResource', response) if response.status_code == 201: deserialized = self._deserialize('AppResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -178,7 +180,7 @@ def create_or_update( :type app_name: str :param app_resource: Parameters for the create or update operation :type app_resource: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource + ~azure.mgmt.appplatform.v2020_07_01.models.AppResource :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -187,9 +189,9 @@ def create_or_update( :return: An instance of LROPoller that returns AppResource or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.AppResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.AppResource]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -220,27 +222,9 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} - def delete( - self, resource_group_name, service_name, app_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, service_name, app_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -268,7 +252,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -276,6 +260,51 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, resource_group_name, service_name, app_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} @@ -345,7 +374,7 @@ def update( :type app_name: str :param app_resource: Parameters for the update operation :type app_resource: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource + ~azure.mgmt.appplatform.v2020_07_01.models.AppResource :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -354,9 +383,9 @@ def update( :return: An instance of LROPoller that returns AppResource or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.AppResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.AppResource]] :raises: :class:`CloudError` """ raw_result = self._update_initial( @@ -404,7 +433,7 @@ def list( overrides`. :return: An iterator like instance of AppResource :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResourcePaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource] + ~azure.mgmt.appplatform.v2020_07_01.models.AppResourcePaged[~azure.mgmt.appplatform.v2020_07_01.models.AppResource] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -481,8 +510,8 @@ def get_resource_upload_url( overrides`. :return: ResourceUploadDefinition or ClientRawResponse if raw=true :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceUploadDefinition - or ~msrest.pipeline.ClientRawResponse + ~azure.mgmt.appplatform.v2020_07_01.models.ResourceUploadDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -528,3 +557,78 @@ def get_resource_upload_url( return deserialized get_resource_upload_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl'} + + def validate_domain( + self, resource_group_name, service_name, app_name, name, custom_headers=None, raw=False, **operation_config): + """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 name: Name to be validated + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomDomainValidateResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainValidateResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + validate_payload = models.CustomDomainValidatePayload(name=name) + + # Construct URL + url = self.validate_domain.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_payload, 'CustomDomainValidatePayload') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomDomainValidateResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/validateDomain'} diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_bindings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_bindings_operations.py index 83ebe124109..c421428f63b 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_bindings_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_bindings_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +27,7 @@ class BindingsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2020-07-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01-preview" + self.api_version = "2020-07-01" self.config = config @@ -59,8 +61,7 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: BindingResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.BindingResource or + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.BindingResource or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -109,34 +110,9 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} - def create_or_update( - self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, **operation_config): - """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 properties: Properties of the Binding resource - :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.BindingResourceProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BindingResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.BindingResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, **operation_config): binding_resource = models.BindingResource(properties=properties) # Construct URL @@ -172,25 +148,29 @@ def create_or_update( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None + if response.status_code == 200: deserialized = self._deserialize('BindingResource', response) + if response.status_code == 201: + deserialized = self._deserialize('BindingResource', response) + if response.status_code == 202: + deserialized = self._deserialize('BindingResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} - def delete( - self, resource_group_name, service_name, app_name, binding_name, custom_headers=None, raw=False, **operation_config): - """Operation to delete a Binding. + def create_or_update( + self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 @@ -202,15 +182,54 @@ def delete( :type app_name: str :param binding_name: The name of the Binding resource. :type binding_name: str + :param properties: Properties of the Binding resource + :type properties: + ~azure.mgmt.appplatform.v2020_07_01.models.BindingResourceProperties :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns BindingResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.BindingResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.BindingResource]] :raises: :class:`CloudError` """ + 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, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BindingResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} + + + def _delete_initial( + self, resource_group_name, service_name, app_name, binding_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -239,7 +258,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -247,11 +266,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} - def update( - self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, **operation_config): - """Operation to update an exiting Binding. + def delete( + self, resource_group_name, service_name, app_name, binding_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 @@ -263,20 +281,44 @@ def update( :type app_name: str :param binding_name: The name of the Binding resource. :type binding_name: str - :param properties: Properties of the Binding resource - :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.BindingResourceProperties :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BindingResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.BindingResource or - ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} + + + def _update_initial( + self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, **operation_config): binding_resource = models.BindingResource(properties=properties) # Construct URL @@ -312,20 +354,81 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None + if response.status_code == 200: deserialized = self._deserialize('BindingResource', response) + if response.status_code == 202: + deserialized = self._deserialize('BindingResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + + def update( + self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 properties: Properties of the Binding resource + :type properties: + ~azure.mgmt.appplatform.v2020_07_01.models.BindingResourceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns BindingResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.BindingResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.BindingResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BindingResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} def list( @@ -347,7 +450,7 @@ def list( overrides`. :return: An iterator like instance of BindingResource :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.BindingResourcePaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.BindingResource] + ~azure.mgmt.appplatform.v2020_07_01.models.BindingResourcePaged[~azure.mgmt.appplatform.v2020_07_01.models.BindingResource] :raises: :class:`CloudError` """ def prepare_request(next_link=None): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_certificates_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_certificates_operations.py index fc34fb799ec..d1ae6a62566 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_certificates_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_certificates_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +27,7 @@ class CertificatesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2020-07-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01-preview" + self.api_version = "2020-07-01" self.config = config @@ -57,8 +59,7 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: CertificateResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CertificateResource + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.CertificateResource or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -106,32 +107,9 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} - def create_or_update( - self, resource_group_name, service_name, certificate_name, properties=None, custom_headers=None, raw=False, **operation_config): - """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 properties: Properties of the certificate resource payload. - :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CertificateProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CertificateResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CertificateResource - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, service_name, certificate_name, properties=None, custom_headers=None, raw=False, **operation_config): certificate_resource = models.CertificateResource(properties=properties) # Construct URL @@ -166,25 +144,29 @@ def create_or_update( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None + if response.status_code == 200: deserialized = self._deserialize('CertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('CertificateResource', response) + if response.status_code == 202: + deserialized = self._deserialize('CertificateResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} - def delete( - self, resource_group_name, service_name, certificate_name, custom_headers=None, raw=False, **operation_config): - """Delete the certificate resource. + def create_or_update( + self, resource_group_name, service_name, certificate_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 @@ -194,15 +176,53 @@ def delete( :type service_name: str :param certificate_name: The name of the certificate resource. :type certificate_name: str + :param properties: Properties of the certificate resource payload. + :type properties: + ~azure.mgmt.appplatform.v2020_07_01.models.CertificateProperties :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns CertificateResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.CertificateResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.CertificateResource]] :raises: :class:`CloudError` """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_name=certificate_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('CertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} + + + def _delete_initial( + self, resource_group_name, service_name, certificate_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -230,7 +250,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -238,6 +258,51 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, resource_group_name, service_name, certificate_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_name=certificate_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} def list( @@ -257,7 +322,7 @@ def list( overrides`. :return: An iterator like instance of CertificateResource :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CertificateResourcePaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.CertificateResource] + ~azure.mgmt.appplatform.v2020_07_01.models.CertificateResourcePaged[~azure.mgmt.appplatform.v2020_07_01.models.CertificateResource] :raises: :class:`CloudError` """ def prepare_request(next_link=None): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_config_servers_operations.py new file mode 100644 index 00000000000..c5c72fd3eaf --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_config_servers_operations.py @@ -0,0 +1,428 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ConfigServersOperations(object): + """ConfigServersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2020-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-07-01" + + self.config = config + + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConfigServerResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} + + + def _update_put_initial( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, **operation_config): + config_server_resource = models.ConfigServerResource(properties=properties) + + # Construct URL + url = self.update_put.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(config_server_resource, 'ConfigServerResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', response) + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_put( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 properties: Properties of the Config Server resource + :type properties: + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ConfigServerResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_put_initial( + resource_group_name=resource_group_name, + service_name=service_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} + + + def _update_patch_initial( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, **operation_config): + config_server_resource = models.ConfigServerResource(properties=properties) + + # Construct URL + url = self.update_patch.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(config_server_resource, 'ConfigServerResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', response) + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_patch( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 properties: Properties of the Config Server resource + :type properties: + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ConfigServerResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_patch_initial( + resource_group_name=resource_group_name, + service_name=service_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} + + + def _validate_initial( + self, resource_group_name, service_name, git_property=None, custom_headers=None, raw=False, **operation_config): + config_server_settings = models.ConfigServerSettings(git_property=git_property) + + # Construct URL + url = self.validate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(config_server_settings, 'ConfigServerSettings') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerSettingsValidateResult', response) + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerSettingsValidateResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def validate( + self, resource_group_name, service_name, git_property=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 git_property: Property of git environment. + :type git_property: + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerGitProperty + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ConfigServerSettingsValidateResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerSettingsValidateResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerSettingsValidateResult]] + :raises: :class:`CloudError` + """ + raw_result = self._validate_initial( + resource_group_name=resource_group_name, + service_name=service_name, + git_property=git_property, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConfigServerSettingsValidateResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate'} diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_custom_domains_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_custom_domains_operations.py index aeec8066df5..232b3730ad7 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_custom_domains_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_custom_domains_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +27,7 @@ class CustomDomainsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2020-07-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01-preview" + self.api_version = "2020-07-01" self.config = config @@ -60,8 +62,8 @@ def get( overrides`. :return: CustomDomainResource or ClientRawResponse if raw=true :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainResource - or ~msrest.pipeline.ClientRawResponse + ~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -109,34 +111,9 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} - def create_or_update( - self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, **operation_config): - """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 properties: Properties of the custom domain resource. - :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomDomainResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainResource - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, **operation_config): domain_resource = models.CustomDomainResource(properties=properties) # Construct URL @@ -172,25 +149,29 @@ def create_or_update( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None + if response.status_code == 200: deserialized = self._deserialize('CustomDomainResource', response) + if response.status_code == 201: + deserialized = self._deserialize('CustomDomainResource', response) + if response.status_code == 202: + deserialized = self._deserialize('CustomDomainResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} - def delete( - self, resource_group_name, service_name, app_name, domain_name, custom_headers=None, raw=False, **operation_config): - """Delete the custom domain of one lifecycle application. + def create_or_update( + self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 @@ -202,15 +183,54 @@ def delete( :type app_name: str :param domain_name: The name of the custom domain resource. :type domain_name: str + :param properties: Properties of the custom domain resource. + :type properties: + ~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainProperties :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns CustomDomainResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainResource]] :raises: :class:`CloudError` """ + 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, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('CustomDomainResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} + + + def _delete_initial( + self, resource_group_name, service_name, app_name, domain_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -239,7 +259,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -247,11 +267,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} - def patch( - self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, **operation_config): - """Update custom domain of one lifecycle application. + def delete( + self, resource_group_name, service_name, app_name, domain_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 @@ -263,24 +282,48 @@ def patch( :type app_name: str :param domain_name: The name of the custom domain resource. :type domain_name: str - :param properties: Properties of the custom domain resource. - :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainProperties :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomDomainResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainResource - or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} + + + def _update_initial( + self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, **operation_config): domain_resource = models.CustomDomainResource(properties=properties) # Construct URL - url = self.patch.metadata['url'] + url = self.update.metadata['url'] 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'), @@ -312,21 +355,82 @@ def patch( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None + if response.status_code == 200: deserialized = self._deserialize('CustomDomainResource', response) + if response.status_code == 202: + deserialized = self._deserialize('CustomDomainResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} + + def update( + self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 properties: Properties of the custom domain resource. + :type properties: + ~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns CustomDomainResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('CustomDomainResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} def list( self, resource_group_name, service_name, app_name, custom_headers=None, raw=False, **operation_config): @@ -347,7 +451,7 @@ def list( overrides`. :return: An iterator like instance of CustomDomainResource :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainResourcePaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainResource] + ~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainResourcePaged[~azure.mgmt.appplatform.v2020_07_01.models.CustomDomainResource] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -404,78 +508,3 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains'} - - def validate( - self, resource_group_name, service_name, app_name, name, custom_headers=None, raw=False, **operation_config): - """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 name: Name to be validated - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomDomainValidateResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.CustomDomainValidateResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - validate_payload = models.CustomDomainValidatePayload(name=name) - - # Construct URL - url = self.validate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate_payload, 'CustomDomainValidatePayload') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomDomainValidateResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/validate'} diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_deployments_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_deployments_operations.py index 05f24f854b5..9dd25f8c12d 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_deployments_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_deployments_operations.py @@ -27,7 +27,7 @@ class DeploymentsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2020-07-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01-preview" + self.api_version = "2020-07-01" self.config = config @@ -61,8 +61,7 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: DeploymentResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResource + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResource or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -113,8 +112,8 @@ def get( def _create_or_update_initial( - self, resource_group_name, service_name, app_name, deployment_name, properties=None, custom_headers=None, raw=False, **operation_config): - deployment_resource = models.DeploymentResource(properties=properties) + self, resource_group_name, service_name, app_name, deployment_name, properties=None, sku=None, custom_headers=None, raw=False, **operation_config): + deployment_resource = models.DeploymentResource(properties=properties, sku=sku) # Construct URL url = self.create_or_update.metadata['url'] @@ -149,7 +148,7 @@ def _create_or_update_initial( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -160,6 +159,8 @@ def _create_or_update_initial( deserialized = self._deserialize('DeploymentResource', response) if response.status_code == 201: deserialized = self._deserialize('DeploymentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('DeploymentResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -168,7 +169,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, service_name, app_name, deployment_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, service_name, app_name, deployment_name, properties=None, sku=None, custom_headers=None, raw=False, polling=True, **operation_config): """Create a new Deployment or update an exiting Deployment. :param resource_group_name: The name of the resource group that @@ -183,7 +184,9 @@ def create_or_update( :type deployment_name: str :param properties: Properties of the Deployment resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource + :type sku: ~azure.mgmt.appplatform.v2020_07_01.models.Sku :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -192,9 +195,9 @@ def create_or_update( :return: An instance of LROPoller that returns DeploymentResource or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResource] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResource]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResource]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -203,6 +206,7 @@ def create_or_update( app_name=app_name, deployment_name=deployment_name, properties=properties, + sku=sku, custom_headers=custom_headers, raw=True, **operation_config @@ -226,29 +230,9 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} - def delete( - self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -277,7 +261,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -285,12 +269,60 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} def _update_initial( - self, resource_group_name, service_name, app_name, deployment_name, properties=None, custom_headers=None, raw=False, **operation_config): - deployment_resource = models.DeploymentResource(properties=properties) + self, resource_group_name, service_name, app_name, deployment_name, properties=None, sku=None, custom_headers=None, raw=False, **operation_config): + deployment_resource = models.DeploymentResource(properties=properties, sku=sku) # Construct URL url = self.update.metadata['url'] @@ -344,7 +376,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, service_name, app_name, deployment_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, service_name, app_name, deployment_name, properties=None, sku=None, custom_headers=None, raw=False, polling=True, **operation_config): """Operation to update an exiting Deployment. :param resource_group_name: The name of the resource group that @@ -359,7 +391,9 @@ def update( :type deployment_name: str :param properties: Properties of the Deployment resource :type properties: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResourceProperties + ~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource + :type sku: ~azure.mgmt.appplatform.v2020_07_01.models.Sku :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -368,9 +402,9 @@ def update( :return: An instance of LROPoller that returns DeploymentResource or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResource] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResource]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResource]] :raises: :class:`CloudError` """ raw_result = self._update_initial( @@ -379,6 +413,7 @@ def update( app_name=app_name, deployment_name=deployment_name, properties=properties, + sku=sku, custom_headers=custom_headers, raw=True, **operation_config @@ -423,7 +458,7 @@ def list( overrides`. :return: An iterator like instance of DeploymentResource :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResourcePaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResource] + ~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResourcePaged[~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResource] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -483,7 +518,7 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments'} - def list_cluster_all_deployments( + def list_for_cluster( self, resource_group_name, service_name, version=None, custom_headers=None, raw=False, **operation_config): """List deployments for a certain service. @@ -502,13 +537,13 @@ def list_cluster_all_deployments( overrides`. :return: An iterator like instance of DeploymentResource :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResourcePaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.DeploymentResource] + ~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResourcePaged[~azure.mgmt.appplatform.v2020_07_01.models.DeploymentResource] :raises: :class:`CloudError` """ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_cluster_all_deployments.metadata['url'] + url = self.list_for_cluster.metadata['url'] 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'), @@ -559,7 +594,7 @@ def internal_paging(next_link=None): deserialized = models.DeploymentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_cluster_all_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments'} + list_for_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments'} def _start_initial( @@ -848,8 +883,7 @@ def get_log_file_url( :param operation_config: :ref:`Operation configuration overrides`. :return: LogFileUrlResponse or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.LogFileUrlResponse + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.LogFileUrlResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_monitoring_settings_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_monitoring_settings_operations.py new file mode 100644 index 00000000000..8758bc8463b --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_monitoring_settings_operations.py @@ -0,0 +1,322 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class MonitoringSettingsOperations(object): + """MonitoringSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2020-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-07-01" + + self.config = config + + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MonitoringSettingResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2020_07_01.models.MonitoringSettingResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MonitoringSettingResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} + + + def _update_put_initial( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, **operation_config): + monitoring_setting_resource = models.MonitoringSettingResource(properties=properties) + + # Construct URL + url = self.update_put.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(monitoring_setting_resource, 'MonitoringSettingResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MonitoringSettingResource', response) + if response.status_code == 202: + deserialized = self._deserialize('MonitoringSettingResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_put( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 properties: Properties of the Monitoring Setting resource + :type properties: + ~azure.mgmt.appplatform.v2020_07_01.models.MonitoringSettingProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + MonitoringSettingResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.MonitoringSettingResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.MonitoringSettingResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_put_initial( + resource_group_name=resource_group_name, + service_name=service_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MonitoringSettingResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} + + + def _update_patch_initial( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, **operation_config): + monitoring_setting_resource = models.MonitoringSettingResource(properties=properties) + + # Construct URL + url = self.update_patch.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(monitoring_setting_resource, 'MonitoringSettingResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MonitoringSettingResource', response) + if response.status_code == 202: + deserialized = self._deserialize('MonitoringSettingResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_patch( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 properties: Properties of the Monitoring Setting resource + :type properties: + ~azure.mgmt.appplatform.v2020_07_01.models.MonitoringSettingProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + MonitoringSettingResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.MonitoringSettingResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.MonitoringSettingResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_patch_initial( + resource_group_name=resource_group_name, + service_name=service_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MonitoringSettingResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_operations.py index 8c2898d9179..90798831cfa 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2020-07-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01-preview" + self.api_version = "2020-07-01" self.config = config @@ -51,7 +51,7 @@ def list( overrides`. :return: An iterator like instance of OperationDetail :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.OperationDetailPaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.OperationDetail] + ~azure.mgmt.appplatform.v2020_07_01.models.OperationDetailPaged[~azure.mgmt.appplatform.v2020_07_01.models.OperationDetail] :raises: :class:`CloudError` """ def prepare_request(next_link=None): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_runtime_versions_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_runtime_versions_operations.py index d3eaac0f5b0..d7dfdef53fc 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_runtime_versions_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_runtime_versions_operations.py @@ -25,7 +25,7 @@ class RuntimeVersionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2020-07-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01-preview" + self.api_version = "2020-07-01" self.config = config @@ -51,8 +51,8 @@ def list_runtime_versions( overrides`. :return: AvailableRuntimeVersions or ClientRawResponse if raw=true :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.AvailableRuntimeVersions - or ~msrest.pipeline.ClientRawResponse + ~azure.mgmt.appplatform.v2020_07_01.models.AvailableRuntimeVersions or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_services_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_services_operations.py index b545584a020..e9c2b47709a 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_services_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_services_operations.py @@ -27,7 +27,7 @@ class ServicesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2020-07-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01-preview" + self.api_version = "2020-07-01" self.config = config @@ -57,8 +57,7 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: ServiceResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResource or + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.ServiceResource or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -139,7 +138,7 @@ def _create_or_update_initial( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -150,6 +149,8 @@ def _create_or_update_initial( deserialized = self._deserialize('ServiceResource', response) if response.status_code == 201: deserialized = self._deserialize('ServiceResource', response) + if response.status_code == 202: + deserialized = self._deserialize('ServiceResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -169,7 +170,7 @@ def create_or_update( :type service_name: str :param resource: Parameters for the create or update operation :type resource: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResource + ~azure.mgmt.appplatform.v2020_07_01.models.ServiceResource :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -178,9 +179,9 @@ def create_or_update( :return: An instance of LROPoller that returns ServiceResource or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResource] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.ServiceResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResource]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.ServiceResource]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -355,7 +356,7 @@ def update( :type service_name: str :param resource: Parameters for the update operation :type resource: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResource + ~azure.mgmt.appplatform.v2020_07_01.models.ServiceResource :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -364,9 +365,9 @@ def update( :return: An instance of LROPoller that returns ServiceResource or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResource] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.ServiceResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResource]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.ServiceResource]] :raises: :class:`CloudError` """ raw_result = self._update_initial( @@ -412,7 +413,7 @@ def list_test_keys( :param operation_config: :ref:`Operation configuration overrides`. :return: TestKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.appplatform.v2019_05_01_preview.models.TestKeys or + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.TestKeys or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -472,14 +473,14 @@ def regenerate_test_key( :param key_type: Type of the test key. Possible values include: 'Primary', 'Secondary' :type key_type: str or - ~azure.mgmt.appplatform.v2019_05_01_preview.models.TestKeyType + ~azure.mgmt.appplatform.v2020_07_01.models.TestKeyType :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: TestKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.appplatform.v2019_05_01_preview.models.TestKeys or + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.TestKeys or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -534,7 +535,7 @@ def regenerate_test_key( def disable_test_endpoint( self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """ + """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 @@ -589,7 +590,7 @@ def disable_test_endpoint( def enable_test_endpoint( self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """ + """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 @@ -603,7 +604,7 @@ def enable_test_endpoint( :param operation_config: :ref:`Operation configuration overrides`. :return: TestKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.appplatform.v2019_05_01_preview.models.TestKeys or + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.TestKeys or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -666,8 +667,7 @@ def check_name_availability( :param operation_config: :ref:`Operation configuration overrides`. :return: NameAvailability or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.NameAvailability or + :rtype: ~azure.mgmt.appplatform.v2020_07_01.models.NameAvailability or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -730,7 +730,7 @@ def list_by_subscription( overrides`. :return: An iterator like instance of ServiceResource :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResourcePaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResource] + ~azure.mgmt.appplatform.v2020_07_01.models.ServiceResourcePaged[~azure.mgmt.appplatform.v2020_07_01.models.ServiceResource] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -800,7 +800,7 @@ def list( overrides`. :return: An iterator like instance of ServiceResource :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResourcePaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.ServiceResource] + ~azure.mgmt.appplatform.v2020_07_01.models.ServiceResourcePaged[~azure.mgmt.appplatform.v2020_07_01.models.ServiceResource] :raises: :class:`CloudError` """ def prepare_request(next_link=None): diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_sku_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_skus_operations.py similarity index 90% rename from src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_sku_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_skus_operations.py index a67afa4c3c2..5c967e6a1a2 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_sku_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/operations/_skus_operations.py @@ -16,8 +16,8 @@ from .. import models -class SkuOperations(object): - """SkuOperations operations. +class SkusOperations(object): + """SkusOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -25,7 +25,7 @@ class SkuOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2020-07-01". """ models = models @@ -35,13 +35,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01-preview" + self.api_version = "2020-07-01" self.config = config def list( self, custom_headers=None, raw=False, **operation_config): - """ + """Lists all of the available skus of the Microsoft.AppPlatform provider. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -50,7 +50,7 @@ def list( overrides`. :return: An iterator like instance of ResourceSku :rtype: - ~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSkuPaged[~azure.mgmt.appplatform.v2019_05_01_preview.models.ResourceSku] + ~azure.mgmt.appplatform.v2020_07_01.models.ResourceSkuPaged[~azure.mgmt.appplatform.v2020_07_01.models.ResourceSku] :raises: :class:`CloudError` """ def prepare_request(next_link=None): 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 index 91d3d3040ed..e001913245a 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2019-05-01-preview" +VERSION = "2020-07-01" diff --git a/src/spring-cloud/setup.py b/src/spring-cloud/setup.py index a353f6a2ff0..cbdf3aba269 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 = '1.2.0' +VERSION = '2.0.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers